For cleaner understanding rename to WebServerSetup

pull/193/head
cskarai 8 years ago committed by Thorsten von Eicken
parent c7ccfa33a0
commit 6e01a07459
  1. 6
      esp-link/cgiwebserversetup.c
  2. 2
      esp-link/cgiwebserversetup.h
  3. 4
      esp-link/main.c

@ -16,7 +16,7 @@ const char * HTML_HEADER = "<!doctype html><html><head><title>esp-link</title>
"<meta name=viewport content=\"width=device-width, initial-scale=1\"><script src=\"/ui.js\">" "<meta name=viewport content=\"width=device-width, initial-scale=1\"><script src=\"/ui.js\">"
"</script><script src=\"/userpage.js\"></script></head><body><div id=layout> "; "</script><script src=\"/userpage.js\"></script></head><body><div id=layout> ";
int ICACHE_FLASH_ATTR webServerMultipartCallback(MultipartCmd cmd, char *data, int dataLen, int position) int ICACHE_FLASH_ATTR webServerSetupMultipartCallback(MultipartCmd cmd, char *data, int dataLen, int position)
{ {
switch(cmd) switch(cmd)
{ {
@ -141,10 +141,10 @@ int ICACHE_FLASH_ATTR webServerMultipartCallback(MultipartCmd cmd, char *data, i
MultipartCtx * webServerContext = NULL; MultipartCtx * webServerContext = NULL;
int ICACHE_FLASH_ATTR cgiWebServerUpload(HttpdConnData *connData) int ICACHE_FLASH_ATTR cgiWebServerSetupUpload(HttpdConnData *connData)
{ {
if( webServerContext == NULL ) if( webServerContext == NULL )
webServerContext = multipartCreateContext( webServerMultipartCallback ); webServerContext = multipartCreateContext( webServerSetupMultipartCallback );
return multipartProcess(webServerContext, connData); return multipartProcess(webServerContext, connData);
} }

@ -3,6 +3,6 @@
#include <httpd.h> #include <httpd.h>
int ICACHE_FLASH_ATTR cgiWebServerUpload(HttpdConnData *connData); int ICACHE_FLASH_ATTR cgiWebServerSetupUpload(HttpdConnData *connData);
#endif /* CGIWEBSERVER_H */ #endif /* CGIWEBSERVER_H */

@ -19,7 +19,7 @@
#include "cgimqtt.h" #include "cgimqtt.h"
#include "cgiflash.h" #include "cgiflash.h"
#include "cgioptiboot.h" #include "cgioptiboot.h"
#include "cgiwebserver.h" #include "cgiwebserversetup.h"
#include "auth.h" #include "auth.h"
#include "espfs.h" #include "espfs.h"
#include "uart.h" #include "uart.h"
@ -99,7 +99,7 @@ HttpdBuiltInUrl builtInUrls[] = {
#ifdef MQTT #ifdef MQTT
{ "/mqtt", cgiMqtt, NULL }, { "/mqtt", cgiMqtt, NULL },
#endif #endif
{ "/web-server/upload", cgiWebServerUpload, NULL }, { "/web-server/upload", cgiWebServerSetupUpload, NULL },
{ "*.json", WEB_CgiJsonHook, NULL }, //Catch-all cgi JSON queries { "*.json", WEB_CgiJsonHook, NULL }, //Catch-all cgi JSON queries
{ "*", cgiEspFsHook, NULL }, //Catch-all cgi function for the filesystem { "*", cgiEspFsHook, NULL }, //Catch-all cgi function for the filesystem
{ NULL, NULL, NULL } { NULL, NULL, NULL }

Loading…
Cancel
Save