From 730b6d38a5bab5aa516bf54275e4e7ba8ae3f1d8 Mon Sep 17 00:00:00 2001 From: Sebastien Date: Mon, 10 Feb 2020 19:17:16 -0500 Subject: [PATCH] HTTPd WIP --- Makefile | 2 +- components/telnet/telnet.c | 1 + components/wifi-manager/http_server_handlers.c | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index e3948648..f209bfed 100644 --- a/Makefile +++ b/Makefile @@ -15,5 +15,5 @@ PROJECT_NAME?=squeezelite include $(IDF_PATH)/make/project.mk -CFLAGS += -Wno-error=format-overflow -Wno-error=stringop-truncation +# for future gcc version, this could be needed: CPPFLAGS+= -Wno-error=format-overflow -Wno-error=stringop-truncation CPPFLAGS+= -Wno-error=maybe-uninitialized diff --git a/components/telnet/telnet.c b/components/telnet/telnet.c index 5f455694..b90d594b 100644 --- a/components/telnet/telnet.c +++ b/components/telnet/telnet.c @@ -362,6 +362,7 @@ static void handleLogBuffer(int partnerSocket, UBaseType_t count){ static void doTelnet(int partnerSocket) { //ESP_LOGD(tag, ">> doTelnet"); static const telnet_telopt_t my_telopts[] = { + { TELNET_TELOPT_ECHO, TELNET_WILL, TELNET_DONT }, { TELNET_TELOPT_TTYPE, TELNET_WILL, TELNET_DONT }, { TELNET_TELOPT_COMPRESS2, TELNET_WONT, TELNET_DO }, diff --git a/components/wifi-manager/http_server_handlers.c b/components/wifi-manager/http_server_handlers.c index 67c24773..a0ae6bb3 100644 --- a/components/wifi-manager/http_server_handlers.c +++ b/components/wifi-manager/http_server_handlers.c @@ -54,7 +54,7 @@ function to process requests, decode URLs, serve files, etc. etc. const char str_na[]="N/A"; #define STR_OR_NA(s) s?s:str_na /* @brief tag used for ESP serial console messages */ -static const char TAG[] = "http_server"; +static const char TAG[] = "httpd_handlers"; /* @brief task handle for the http server */ SemaphoreHandle_t http_server_config_mutex = NULL; @@ -558,7 +558,7 @@ esp_err_t config_post_handler(httpd_req_t *req){ char * root_str = cJSON_Print(root); if(root_str!=NULL){ - ESP_LOGE(TAG, "Processing config item: \n%s", root_str); + ESP_LOGD(TAG, "Processing config item: \n%s", root_str); free(root_str); }