Merge pull request #15 from pcniatic/fix_wifi_settings

Improving readIP function
This commit is contained in:
rjwats 2019-04-27 07:40:44 +01:00 committed by GitHub
commit 0f7eefea99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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].isNull() || !_ip.fromString(root[key].as<String>())){ if ( !root[key].is<String>() || !_ip.fromString(root[key].as<String>())){
_ip = INADDR_NONE; _ip = INADDR_NONE;
} }
} }