Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: oldheating gps motorhome heating
Diff: udp/dns/dnsserver.cpp
- Revision:
- 43:bc028d5a6424
- Parent:
- 37:793b39683406
- Child:
- 44:83ce5ace337b
--- a/udp/dns/dnsserver.cpp Sun Oct 15 17:54:09 2017 +0000 +++ b/udp/dns/dnsserver.cpp Thu Oct 19 20:56:58 2017 +0000 @@ -105,18 +105,7 @@ //Count the number of answers DnsHdrAncount++; - - //Log what we are doing - if (DnsServerTrace) - { - switch (questionTypes[q]) - { - case DNS_RECORD_A: Log(" replied with my IPv4 address\r\n"); break; - case DNS_RECORD_AAAA: Log(" replied with my IPv6 address\r\n"); break; - case DNS_RECORD_PTR: Log(" replied with my name\r\n"); break; - } - } - + //Encode the node name switch (questionTypes[q]) { @@ -166,7 +155,12 @@ { if (*pSize > 512) { - if (DnsServerTrace) LogTimeF("DnsServerHandleQuery length %d too long\r\n", *pSize ); + if (DnsServerTrace) + { + if (NetTraceNewLine) Log("\r\n"); + LogTimeF("DnsServer length %d too long\r\n", *pSize ); + if (NetTraceStack) traceback(); + } return DO_NOTHING; } @@ -177,8 +171,9 @@ if (DnsServerTrace) { + if (NetTraceNewLine) Log("\r\n"); LogTimeF("DnsServer received query\r\n"); - if (NetTraceBack) traceback(); + if (NetTraceStack) traceback(); DnsHdrLog(dnsProtocol); } @@ -197,5 +192,5 @@ if (dnsProtocol == DNS_PROTOCOL_MDNS && !mdnsUnicastReply) dest = MULTICAST_MDNS; else dest = UNICAST; - return ActionMakeFromDestAndTrace(dest, NetTraceForward && DnsServerTrace); + return ActionMakeFromDestAndTrace(dest, NetTraceStack && DnsServerTrace); }