mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
merge ipaddress fix from esp8266-react
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <IPAddress.h>
|
||||
#include <IPUtils.h>
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
class JsonUtils {
|
||||
@@ -20,7 +21,7 @@ class JsonUtils {
|
||||
}
|
||||
}
|
||||
static void writeIP(JsonObject & root, const String & key, const IPAddress & ip) {
|
||||
if (ip != INADDR_NONE) {
|
||||
if (IPUtils::isSet(ip)) {
|
||||
root[key] = ip.toString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user