Turn off mdnsresponder debugging by default
Currently mdnsresponder outputs debug info by default. Make this optional by defining: #define MDNS_RESPONDER_DEBUGGING=1
This commit is contained in:
parent
a16997dee1
commit
fdd3b6e20c
2 changed files with 11 additions and 0 deletions
|
@ -38,9 +38,11 @@
|
||||||
#error "LWIP_IGMP needs to be defined in lwipopts.h"
|
#error "LWIP_IGMP needs to be defined in lwipopts.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if MDNS_RESPONDER_DEBUGGING
|
||||||
#define qDebugLog // Log activity generally
|
#define qDebugLog // Log activity generally
|
||||||
#define qLogIncoming // Log all arriving multicast packets
|
#define qLogIncoming // Log all arriving multicast packets
|
||||||
#define qLogAllTraffic // Log and decode all mDNS 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
|
// Sanity checks on size
|
||||||
if (plen > MDNS_RESPONDER_REPLY_SIZE) {
|
if (plen > MDNS_RESPONDER_REPLY_SIZE) {
|
||||||
|
#ifdef qDebugLog
|
||||||
printf(">>> mdns_recv: pbuf too big\n");
|
printf(">>> mdns_recv: pbuf too big\n");
|
||||||
|
#endif
|
||||||
} else if (plen < (SIZEOF_DNS_HDR + SIZEOF_DNS_QUERY + 1 + SIZEOF_DNS_ANSWER + 1)) {
|
} else if (plen < (SIZEOF_DNS_HDR + SIZEOF_DNS_QUERY + 1 + SIZEOF_DNS_ANSWER + 1)) {
|
||||||
|
#ifdef qDebugLog
|
||||||
printf(">>> mdns_recv: pbuf too small\n");
|
printf(">>> mdns_recv: pbuf too small\n");
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
mdns_payload = malloc(plen);
|
mdns_payload = malloc(plen);
|
||||||
if (!mdns_payload) {
|
if (!mdns_payload) {
|
||||||
|
|
|
@ -21,6 +21,11 @@
|
||||||
#define MDNS_RESPONDER_REPLY_SIZE 320
|
#define MDNS_RESPONDER_REPLY_SIZE 320
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef MDNS_RESPONDER_DEBUGGING
|
||||||
|
#define MDNS_RESPONDER_DEBUGGING 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// Starts the mDNS responder task, call first
|
// Starts the mDNS responder task, call first
|
||||||
void mdns_init();
|
void mdns_init();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue