From f99562f9bccea4fd27ef510481706914df61e569 Mon Sep 17 00:00:00 2001 From: CommanderRedYT Date: Wed, 8 Dec 2021 22:29:01 +0100 Subject: [PATCH] Lets not speak about that... --- main/dnsannounce.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main/dnsannounce.cpp b/main/dnsannounce.cpp index 1cce74c..e98479e 100644 --- a/main/dnsannounce.cpp +++ b/main/dnsannounce.cpp @@ -17,12 +17,13 @@ void handle_dns_announce() const auto randDNSName = cpputils::randomNumber(espcpputils::esp_random_device{}); if (staStatus == wifi_stack::WiFiStaStatus::CONNECTED) { - EVERY_N_SECONDS ( 2 ) { + EVERY_N_SECONDS ( 2 ) + { // Get IPv4 if (const auto result = wifi_stack::get_ip_info(TCPIP_ADAPTER_IF_STA); result) { std::string curIpAddress = wifi_stack::toString(result->ip); - if (curIpAddress == "0.0.0.0") + if (curIpAddress != "0.0.0.0") { if (dns_lastIpAddress_v4 != curIpAddress) {