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\">"
"</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)
{
@ -141,10 +141,10 @@ int ICACHE_FLASH_ATTR webServerMultipartCallback(MultipartCmd cmd, char *data, i
MultipartCtx * webServerContext = NULL;
int ICACHE_FLASH_ATTR cgiWebServerUpload(HttpdConnData *connData)
int ICACHE_FLASH_ATTR cgiWebServerSetupUpload(HttpdConnData *connData)
{
if( webServerContext == NULL )
webServerContext = multipartCreateContext( webServerMultipartCallback );
webServerContext = multipartCreateContext( webServerSetupMultipartCallback );
return multipartProcess(webServerContext, connData);
}

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

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

Loading…
Cancel
Save