Updated to latest libesphttpd

This commit is contained in:
2017-01-22 19:24:00 +01:00
parent 88a556805b
commit 97e016ca4d
6 changed files with 12 additions and 14 deletions
+1 -3
View File
@@ -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)
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -3,6 +3,6 @@
#include "httpd.h"
int cgiTestbed(HttpdConnData *connData);
httpd_cgi_state cgiTestbed(HttpdConnData *connData);
#endif
#endif
+3 -3
View File
@@ -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;
+4 -4
View File
@@ -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
#endif