Merge pull request #639 from joostn/jnsilentmdns1

Turn off mdnsresponder debugging by default
This commit is contained in:
Ruslan V. Uss 2018-06-11 08:26:22 +05:00 committed by GitHub
commit c4fbd770ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View file

@ -38,9 +38,11 @@
#error "LWIP_IGMP needs to be defined in lwipopts.h"
#endif
#if MDNS_RESPONDER_DEBUGGING
#define qDebugLog // Log activity generally
#define qLogIncoming // Log all arriving multicast packets
#define qLogAllTraffic // Log and decode all mDNS packets
#endif
//-------------------------------------------------------------------
@ -776,9 +778,13 @@ static void mdns_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_a
// Sanity checks on size
if (plen > MDNS_RESPONDER_REPLY_SIZE) {
#ifdef qDebugLog
printf(">>> mdns_recv: pbuf too big\n");
#endif
} else if (plen < (SIZEOF_DNS_HDR + SIZEOF_DNS_QUERY + 1 + SIZEOF_DNS_ANSWER + 1)) {
#ifdef qDebugLog
printf(">>> mdns_recv: pbuf too small\n");
#endif
} else {
mdns_payload = malloc(plen);
if (!mdns_payload) {

View file

@ -21,6 +21,11 @@
#define MDNS_RESPONDER_REPLY_SIZE 320
#endif
#ifndef MDNS_RESPONDER_DEBUGGING
#define MDNS_RESPONDER_DEBUGGING 0
#endif
// Starts the mDNS responder task, call first
void mdns_init();