fix for platformio/esp32 3.1.0 with IDF 3.2

This commit is contained in:
proddy
2021-02-27 14:43:22 +01:00
parent b2e85ee026
commit c4fc6c8cc5

View File

@@ -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;
} }