From 97e016ca4da09be9be5f17e66564bf47124a2c34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Sun, 22 Jan 2017 19:24:00 +0100 Subject: [PATCH] Updated to latest libesphttpd --- Makefile | 4 +--- libesphttpd | 2 +- user/cgi-test.c | 2 +- user/cgi-test.h | 4 ++-- user/cgi.c | 6 +++--- user/cgi.h | 8 ++++---- 6 files changed, 12 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 98c894f..c0a05fe 100644 --- a/Makefile +++ b/Makefile @@ -187,9 +187,7 @@ endef all: checkdirs $(TARGET_OUT) $(FW_BASE) libesphttpd/Makefile: - $(Q) echo "No libesphttpd submodule found. Using git to fetch it..." - $(Q) git submodule init - $(Q) git submodule update + $(Q) [[ -e "libesphttpd/Makefile" ]] || echo -e "\e[31mlibesphttpd submodule missing.\nIf build fails, run \"git submodule init\" and \"git submodule update\".\e[0m" libesphttpd: libesphttpd/Makefile $(Q) make -C libesphttpd USE_OPENSDK=$(USE_OPENSDK) diff --git a/libesphttpd b/libesphttpd index 7ab3b8c..896caa5 160000 --- a/libesphttpd +++ b/libesphttpd @@ -1 +1 @@ -Subproject commit 7ab3b8c4b88116ad491bce496b594a593b760efb +Subproject commit 896caa5f82ccd5c441ad30b2558cd4d032b07b30 diff --git a/user/cgi-test.c b/user/cgi-test.c index a7e3ef5..8817c7a 100644 --- a/user/cgi-test.c +++ b/user/cgi-test.c @@ -22,7 +22,7 @@ typedef struct { } TestbedState; -int ICACHE_FLASH_ATTR cgiTestbed(HttpdConnData *connData) { +httpd_cgi_state ICACHE_FLASH_ATTR cgiTestbed(HttpdConnData *connData) { char buff[1024]; int first=0; int l, x; diff --git a/user/cgi-test.h b/user/cgi-test.h index ba78edc..501e6f3 100644 --- a/user/cgi-test.h +++ b/user/cgi-test.h @@ -3,6 +3,6 @@ #include "httpd.h" -int cgiTestbed(HttpdConnData *connData); +httpd_cgi_state cgiTestbed(HttpdConnData *connData); -#endif \ No newline at end of file +#endif diff --git a/user/cgi.c b/user/cgi.c index ad6a2bc..c73b3ff 100644 --- a/user/cgi.c +++ b/user/cgi.c @@ -22,7 +22,7 @@ flash as a binary. Also handles the hit counter on the main page. static char currLedState=0; //Cgi that turns the LED on or off according to the 'led' param in the POST data -int ICACHE_FLASH_ATTR cgiLed(HttpdConnData *connData) { +httpd_cgi_state ICACHE_FLASH_ATTR cgiLed(HttpdConnData *connData) { int len; char buff[1024]; @@ -44,7 +44,7 @@ int ICACHE_FLASH_ATTR cgiLed(HttpdConnData *connData) { //Template code for the led page. -int ICACHE_FLASH_ATTR tplLed(HttpdConnData *connData, char *token, void **arg) { +httpd_cgi_state ICACHE_FLASH_ATTR tplLed(HttpdConnData *connData, char *token, void **arg) { char buff[128]; if (token==NULL) return HTTPD_CGI_DONE; @@ -63,7 +63,7 @@ int ICACHE_FLASH_ATTR tplLed(HttpdConnData *connData, char *token, void **arg) { static long hitCounter=0; //Template code for the counter on the index page. -int ICACHE_FLASH_ATTR tplCounter(HttpdConnData *connData, char *token, void **arg) { +httpd_cgi_state ICACHE_FLASH_ATTR tplCounter(HttpdConnData *connData, char *token, void **arg) { char buff[128]; if (token==NULL) return HTTPD_CGI_DONE; diff --git a/user/cgi.h b/user/cgi.h index 4ae5d6d..7ba2a77 100644 --- a/user/cgi.h +++ b/user/cgi.h @@ -3,8 +3,8 @@ #include "httpd.h" -int cgiLed(HttpdConnData *connData); -int tplLed(HttpdConnData *connData, char *token, void **arg); -int tplCounter(HttpdConnData *connData, char *token, void **arg); +httpd_cgi_state cgiLed(HttpdConnData *connData); +httpd_cgi_state tplLed(HttpdConnData *connData, char *token, void **arg); +httpd_cgi_state tplCounter(HttpdConnData *connData, char *token, void **arg); -#endif \ No newline at end of file +#endif