diff --git a/wled00/wled.h b/wled00/wled.h index 9bafb49196..8771464708 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -776,8 +776,7 @@ WLED_GLOBAL byte currentPreset _INIT(0); WLED_GLOBAL byte errorFlag _INIT(0); -WLED_GLOBAL String messageHead, messageSub; -WLED_GLOBAL byte optionType; +// messageHead/messageSub/optionType are private to wled_server.cpp - see there. WLED_GLOBAL bool configNeedsWrite _INIT(false); // flag to initiate saving of config WLED_GLOBAL bool doReboot _INIT(false); // flag to initiate reboot from async handlers @@ -797,7 +796,7 @@ WLED_GLOBAL AsyncWebSocket ws _INIT_N((("/ws"))); #ifndef WLED_DISABLE_HUESYNC WLED_GLOBAL AsyncClient *hueClient _INIT(NULL); #endif -WLED_GLOBAL AsyncWebHandler *editHandler _INIT(nullptr); +// editHandler is private to wled_server.cpp - see there. // udp interface objects WLED_GLOBAL WiFiUDP notifierUdp, rgbUdp, notifier2Udp; diff --git a/wled00/wled_server.cpp b/wled00/wled_server.cpp index 94014cd08e..7d3335b12c 100644 --- a/wled00/wled_server.cpp +++ b/wled00/wled_server.cpp @@ -23,6 +23,12 @@ // forward declarations static void createEditHandler(); +// Runtime state private to this file - previously WLED_GLOBAL, a leftover from +// when all state lived in one big extern block regardless of who used it. +static AsyncWebHandler *editHandler = nullptr; +static String messageHead, messageSub; +static byte optionType; + // define flash strings once (saves flash memory) static const char s_redirecting[] PROGMEM = "Redirecting...";