A stack which works with or without an Mbed os library. Provides IPv4 or IPv6 with a full 1500 byte buffer.
Dependents: oldheating gps motorhome heating
Diff: udp/dns/dnsquery.cpp
- Revision:
- 43:bc028d5a6424
- Parent:
- 38:cc8945857a0d
- Child:
- 47:73af5c0b0dc2
diff -r 222a4f45f916 -r bc028d5a6424 udp/dns/dnsquery.cpp --- a/udp/dns/dnsquery.cpp Sun Oct 15 17:54:09 2017 +0000 +++ b/udp/dns/dnsquery.cpp Thu Oct 19 20:56:58 2017 +0000 @@ -1,5 +1,6 @@ #include "mbed.h" #include "log.h" +#include "clock.h" #include "net.h" #include "action.h" #include "ip4.h" @@ -57,10 +58,13 @@ DnsQueryRecordType = DNS_RECORD_NONE; } } -void DnsQueryTick() +void DnsQueryMain() { - elapsed++; - reap(); + if (ClockTicked) + { + elapsed++; + reap(); + } } void DnsQueryIp4FromName(char * name, int protocol) { @@ -106,6 +110,7 @@ { char text[60]; DnsProtocolToString(DnsQueryProtocol, sizeof(text), text); + if (NetTraceNewLine) Log("\r\n"); LogTimeF("DnsQuery sent %s request for ", text); DnsRecordTypeToString(DnsQueryRecordType, sizeof(text), text); LogF("%s ", text);