From 7faf1add34e72defdd8a2a76f5783224180501be Mon Sep 17 00:00:00 2001 From: CommanderRedYT Date: Sat, 23 Sep 2023 10:09:02 +0200 Subject: [PATCH] Add missing ifdefs --- src/esphttpdutils.cpp | 2 ++ src/esphttpdutils.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/esphttpdutils.cpp b/src/esphttpdutils.cpp index f8e82b2..bbbd342 100644 --- a/src/esphttpdutils.cpp +++ b/src/esphttpdutils.cpp @@ -97,6 +97,7 @@ std::expected webserver_get_query(httpd_req_t *req) return query; } +#ifdef CONFIG_HTTPD_WS_SUPPORT std::string toString(httpd_ws_type_t val) { switch (val) @@ -111,6 +112,7 @@ std::string toString(httpd_ws_type_t val) ESP_LOGW(TAG, "Unknown httpd_ws_type_t(%i)", std::to_underlying(val)); return fmt::format("Unknown httpd_ws_type_t({})", std::to_underlying(val)); } +#endif // CONFIG_HTTPD_WS_SUPPORT } // namespace esphttpdutils diff --git a/src/esphttpdutils.h b/src/esphttpdutils.h index 3307df9..514c984 100644 --- a/src/esphttpdutils.h +++ b/src/esphttpdutils.h @@ -26,6 +26,8 @@ esp_err_t webserver_resp_send(httpd_req_t *req, ResponseStatus error, const char std::expected webserver_get_query(httpd_req_t *req); +#ifdef CONFIG_HTTPD_WS_SUPPORT std::string toString(httpd_ws_type_t val); +#endif // CONFIG_HTTPD_WS_SUPPORT } // namespace esphttpdutils -- 2.50.1