From 9d710041c43af266dc0e32703e39775bb1f4929e Mon Sep 17 00:00:00 2001 From: Tom Fifield Date: Fri, 3 Jan 2025 09:01:10 +0800 Subject: [PATCH] Add MESHTASTIC_EXCLUDE_SOCKETAPI (#5729) MESHTASTIC_EXCLUDE_SOCKETAPI disables the API Server when set. Co-authored-by: mverch67 Co-authored-by: GUVWAF --- src/mesh/eth/ethClient.cpp | 3 ++- src/mesh/wifi/WiFiAPClient.cpp | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mesh/eth/ethClient.cpp b/src/mesh/eth/ethClient.cpp index 08ecb7ce8..24c4f0db1 100644 --- a/src/mesh/eth/ethClient.cpp +++ b/src/mesh/eth/ethClient.cpp @@ -66,8 +66,9 @@ static int32_t reconnectETH() syslog.enable(); } - // initWebServer(); +#if !MESHTASTIC_EXCLUDE_SOCKETAPI initApiServer(); +#endif ethStartupComplete = true; } diff --git a/src/mesh/wifi/WiFiAPClient.cpp b/src/mesh/wifi/WiFiAPClient.cpp index 38aa2e2a2..2f8138921 100644 --- a/src/mesh/wifi/WiFiAPClient.cpp +++ b/src/mesh/wifi/WiFiAPClient.cpp @@ -106,7 +106,9 @@ static void onNetworkConnected() #if defined(ARCH_ESP32) && !MESHTASTIC_EXCLUDE_WEBSERVER initWebServer(); #endif +#if !MESHTASTIC_EXCLUDE_SOCKETAPI initApiServer(); +#endif APStartupComplete = true; }