From e9708a4e5a54797d731c8ca60ffcedbc80451299 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Fri, 17 Jun 2022 17:35:52 +0200 Subject: [PATCH] Fix resolving NTP and/or MQTT server - Fix resolving NTP and/or MQTT server names regression from v12.0.0 (#15816) - Bump version to v12.0.1.1 --- CHANGELOG.md | 8 +++++++- RELEASENOTES.md | 2 +- tasmota/include/tasmota_version.h | 2 +- tasmota/tasmota_support/support_wifi.ino | 26 +----------------------- 4 files changed, 10 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9c522d67..c74101723 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file. ## [Unreleased] - Development -## [12.0.0.1] +## [12.0.1.1] ### Added @@ -18,6 +18,12 @@ All notable changes to this project will be documented in this file. ## [Released] +## [12.0.1] 20220617 +- Release Paul + +### Fixed +- Resolving NTP and/or MQTT server names regression from v12.0.0 (#15816) + ## [12.0.0] 20220615 - Release Paul diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 972b398b3..2a55cad16 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -107,7 +107,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo [Complete list](BUILDS.md) of available feature and sensors. -## Changelog v12.0.0.1 +## Changelog v12.0.1.1 ### Added ### Breaking Changed diff --git a/tasmota/include/tasmota_version.h b/tasmota/include/tasmota_version.h index 4113c74f1..3977366ca 100644 --- a/tasmota/include/tasmota_version.h +++ b/tasmota/include/tasmota_version.h @@ -20,6 +20,6 @@ #ifndef _TASMOTA_VERSION_H_ #define _TASMOTA_VERSION_H_ -const uint32_t VERSION = 0x0C000001; // 12.0.0.1 +const uint32_t VERSION = 0x0C000101; // 12.0.1.1 #endif // _TASMOTA_VERSION_H_ diff --git a/tasmota/tasmota_support/support_wifi.ino b/tasmota/tasmota_support/support_wifi.ino index c71826c38..075072c64 100644 --- a/tasmota/tasmota_support/support_wifi.ino +++ b/tasmota/tasmota_support/support_wifi.ino @@ -729,30 +729,6 @@ void wifiKeepAlive(void) { } #endif // ESP8266 -bool WifiPollDns(void) { - // WiFi.hostByName takes over ten seconds if no DNS server found - // This function checks to find the DNS server within 1 second - // This is an alternative for ping using less resources and some DNS server do not respond to pings (ICMP) - // See https://github.com/letscontrolit/ESPEasy/issues/1494#issuecomment-397872538 - WiFiClient DnsClient; - -#ifdef ESP8266 - DnsClient.setTimeout(1000); -#else - DnsClient.setTimeout(1); -#endif - uint32_t i = 3; // Check DNS1 only (to keep blocking to a minimum of 1 second) -// for (i = 3; i < 5; i++) { // Check DNS1 and DNS2 - uint32_t dns_address = (!TasmotaGlobal.global_state.eth_down) ? Settings->eth_ipv4_address[i] : Settings->ipv4_address[i]; - if (DnsClient.connect((IPAddress)dns_address, 53)) { - DnsClient.stop(); - return true; - } -// } - AddLog(LOG_LEVEL_DEBUG, PSTR("DNS: Disconnected")); - return false; -} - int WifiHostByName(const char* aHostname, IPAddress& aResult) { // Use this instead of WiFi.hostByName or connect(host_name,.. to block less if DNS server is not found aResult = (uint32_t)(0); @@ -760,7 +736,7 @@ int WifiHostByName(const char* aHostname, IPAddress& aResult) { // Host name is already an IP address so use it! return 1; } - else if (WifiPollDns() && WiFi.hostByName(aHostname, aResult)) { + else if (WiFi.hostByName(aHostname, aResult)) { // Host name resolved if (0xFFFFFFFF != (uint32_t)aResult) { return 1;