mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
fix for platformio/esp32 3.1.0 with IDF 3.2
This commit is contained in:
@@ -71,7 +71,7 @@ class NetworkSettings {
|
|||||||
JsonUtils::readIP(root, "dns_ip_2", settings.dnsIP2);
|
JsonUtils::readIP(root, "dns_ip_2", settings.dnsIP2);
|
||||||
|
|
||||||
// Swap around the dns servers if 2 is populated but 1 is not
|
// Swap around the dns servers if 2 is populated but 1 is not
|
||||||
if (settings.dnsIP1 == INADDR_NONE && settings.dnsIP2 != INADDR_NONE) {
|
if (settings.dnsIP1 == (IPAddress)INADDR_NONE && settings.dnsIP2 != INADDR_NONE) {
|
||||||
settings.dnsIP1 = settings.dnsIP2;
|
settings.dnsIP1 = settings.dnsIP2;
|
||||||
settings.dnsIP2 = INADDR_NONE;
|
settings.dnsIP2 = INADDR_NONE;
|
||||||
}
|
}
|
||||||
@@ -79,7 +79,7 @@ class NetworkSettings {
|
|||||||
// Turning off static ip config if we don't meet the minimum requirements
|
// Turning off static ip config if we don't meet the minimum requirements
|
||||||
// of ipAddress, gateway and subnet. This may change to static ip only
|
// of ipAddress, gateway and subnet. This may change to static ip only
|
||||||
// as sensible defaults can be assumed for gateway and subnet
|
// as sensible defaults can be assumed for gateway and subnet
|
||||||
if (settings.staticIPConfig && (settings.localIP == INADDR_NONE || settings.gatewayIP == INADDR_NONE || settings.subnetMask == INADDR_NONE)) {
|
if (settings.staticIPConfig && (settings.localIP == (IPAddress)INADDR_NONE || settings.gatewayIP == (IPAddress)INADDR_NONE || settings.subnetMask == (IPAddress)INADDR_NONE)) {
|
||||||
settings.staticIPConfig = false;
|
settings.staticIPConfig = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user