|
@@ -19,8 +19,10 @@
|
|
|
#include "bt6710_fs/fsdata.c"
|
|
|
#elif HARDWARE_BT6711
|
|
|
#include "bt6711_fs/fsdata.c"
|
|
|
-#include "ftp.h"
|
|
|
#endif
|
|
|
+#ifdef FTP_ENABLE
|
|
|
+#include "ftp.h"
|
|
|
+#endif // FTP_ENABLE
|
|
|
#include "settings_api.h"
|
|
|
#include "netconf.h"
|
|
|
|
|
@@ -191,10 +193,10 @@ web_func_handler_t process_web_funcs[] = {
|
|
|
{ "GET /reboot.cgi", 15, COMMON_ANSWER, TIME_ACCESS, HTTP_Reboot },
|
|
|
{ "GET /confirm.cgi", 16, COMMON_ANSWER, TIME_ACCESS, HTTP_Confirm },
|
|
|
{ "GET /fw_update.cgi", 18, COMMON_ANSWER, TIME_ACCESS, HTTP_ConfirmBootPwd },
|
|
|
-#ifdef HARDWARE_BT6711
|
|
|
+#ifdef FTP_ENABLE
|
|
|
{ X("POST /ftp_fw_update.cgi"), COMMON_ANSWER, TIME_ACCESS, HTTP_FTPFWUpdate },
|
|
|
{ X("GET /fw_dl_state.cgi"), COMMON_ANSWER, TIME_ACCESS, HTTP_FTPFWState },
|
|
|
-#endif // HARDWARE_BT6711
|
|
|
+#endif // FTP_ENABLE
|
|
|
{ "GET", 3, COMMON_ANSWER, ALL_ACCESS, HTTP_GetRequest },
|
|
|
{ "", 0, COMMON_ANSWER, ALL_ACCESS, HTTP_NoFound },
|
|
|
{ "", 0, 0, 0, NULL }
|
|
@@ -1392,7 +1394,7 @@ char *HTTP_ConfirmBootPwd(uint32_t reqNum, char *bufIn, char *bufOut, uint16_t l
|
|
|
return bufOut;
|
|
|
}
|
|
|
|
|
|
-#ifdef HARDWARE_BT6711
|
|
|
+#ifdef FTP_ENABLE
|
|
|
// Download the firmware via FTP, put it on the SPI flash, verify it and reboot the controller
|
|
|
static char *HTTP_FTPFWUpdate(uint32_t reqNum, char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut)
|
|
|
{
|
|
@@ -1449,7 +1451,7 @@ static char *HTTP_FTPFWState(uint32_t reqNum, char *bufIn, char *bufOut, uint16_
|
|
|
*lenBufOut = sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Type:text/plain\r\n\r\n%s", progress);
|
|
|
return bufOut;
|
|
|
}
|
|
|
-#endif // HARDWARE_BT6711
|
|
|
+#endif // FTP_ENABLE
|
|
|
|
|
|
#ifdef HTTP_AUTH_ENABLE
|
|
|
|