Skip to content

Commit 055748f

Browse files
authored
Fix debug provision for DNSServer (#5329)
1 parent e948ad1 commit 055748f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

libraries/DNSServer/src/DNSServer.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
#include <lwip/def.h>
33
#include <Arduino.h>
44

5+
#ifdef DEBUG_ESP_PORT
6+
#define DEBUG_OUTPUT DEBUG_ESP_PORT
7+
#else
8+
#define DEBUG_OUTPUT Serial
9+
#endif
510

611
DNSServer::DNSServer()
712
{
@@ -165,7 +170,7 @@ void DNSServer::replyWithIP(uint8_t* buffer, size_t packetSize)
165170
_udp.endPacket();
166171

167172
#ifdef DEBUG_ESP_DNS
168-
DEBUG_ESP_PORT.printf("DNS responds: %s for %s\n",
173+
DEBUG_OUTPUT.printf("DNS responds: %s for %s\n",
169174
IPAddress(_resolvedIP).toString().c_str(), getDomainNameWithoutWwwPrefix(buffer, packetSize).c_str() );
170175
#endif
171176
}

0 commit comments

Comments
 (0)