Corrected issues while enabling static IP on web.

For some reason root[key] is false and it always sets INADDR_NONE to _ip.
This commit is contained in:
Mauro De Lucca 2019-04-21 21:55:43 -04:00
parent 22605bf1af
commit 5b0c3e29a1

View File

@ -77,7 +77,7 @@ void WiFiSettingsService::reconfigureWiFiConnection() {
} }
void WiFiSettingsService::readIP(JsonObject& root, String key, IPAddress& _ip){ void WiFiSettingsService::readIP(JsonObject& root, String key, IPAddress& _ip){
if (!root[key] || !_ip.fromString(root[key].as<String>())){ if ( root[key].isNull() || !_ip.fromString(root[key].as<String>())){
_ip = INADDR_NONE; _ip = INADDR_NONE;
} }
} }