From fa81a986c7ece76f36761896ba303c2fd44dddf2 Mon Sep 17 00:00:00 2001
From: Tester23 <85486843+openshwprojects@users.noreply.github.com>
Date: Tue, 7 Jan 2025 00:07:35 +0100
Subject: [PATCH] tre
---
src/httpserver/http_fns.c | 106 +++++---------------------------------
src/httpserver/new_http.c | 7 +++
2 files changed, 20 insertions(+), 93 deletions(-)
diff --git a/src/httpserver/http_fns.c b/src/httpserver/http_fns.c
index 6b45c93b9..2b0f110ad 100644
--- a/src/httpserver/http_fns.c
+++ b/src/httpserver/http_fns.c
@@ -1146,6 +1146,7 @@ int http_fn_cfg_mqtt_set(http_request_t* request) {
return 0;
}
+#if ENABLE_HTTP_WEBAPP
int http_fn_cfg_webapp(http_request_t* request) {
http_setup(request, httpMimeTypeHTML);
http_html_start(request, "Set Webapp");
@@ -1177,11 +1178,12 @@ int http_fn_cfg_webapp_set(http_request_t* request) {
poststr(request, NULL);
return 0;
}
+#endif
-
+#if ENABLE_HTTP_PING
int http_fn_cfg_ping(http_request_t* request) {
char tmpA[128];
int bChanged;
@@ -1238,6 +1240,7 @@ int http_fn_cfg_ping(http_request_t* request) {
poststr(request, NULL);
return 0;
}
+#endif
int http_fn_cfg_wifi(http_request_t* request) {
// for a test, show password as well...
char tmpA[128];
@@ -1367,6 +1370,7 @@ int http_fn_cfg_wifi(http_request_t* request) {
poststr(request, NULL);
return 0;
}
+#if ENABLE_HTTP_NAMES
int http_fn_cfg_name(http_request_t* request) {
// for a test, show password as well...
char tmpA[128];
@@ -1404,7 +1408,7 @@ int http_fn_cfg_name(http_request_t* request) {
poststr(request, NULL);
return 0;
}
-
+#endif
int http_fn_cfg_wifi_set(http_request_t* request) {
char tmpA[128];
int bChanged;
@@ -1536,97 +1540,7 @@ int http_fn_cfg_mac(http_request_t* request) {
return 0;
}
#endif
-//
-//int http_fn_flash_read_tool(http_request_t* request) {
-// int len = 16;
-// int ofs = 1970176;
-// int res;
-// int rem;
-// int now;
-// int nowOfs;
-// int hex;
-// int i;
-// char tmpA[128];
-// char tmpB[64];
-//
-// http_setup(request, httpMimeTypeHTML);
-// http_html_start(request, "Flash read");
-// poststr_h4(request, "Flash Read Tool");
-// if (http_getArg(request->url, "hex", tmpA, sizeof(tmpA))) {
-// hex = atoi(tmpA);
-// }
-// else {
-// hex = 0;
-// }
-//
-// if (http_getArg(request->url, "offset", tmpA, sizeof(tmpA)) &&
-// http_getArg(request->url, "len", tmpB, sizeof(tmpB))) {
-// unsigned char buffer[128];
-// len = atoi(tmpB);
-// ofs = atoi(tmpA);
-// hprintf255(request, "Memory at %i with len %i reads: ", ofs, len);
-// poststr(request, "
");
-//
-// ///res = bekken_hal_flash_read (ofs, buffer,len);
-// //sprintf(tmpA,"Result %i",res);
-// // strcat(outbuf,tmpA);
-// /// strcat(outbuf,"
");
-//
-// nowOfs = ofs;
-// rem = len;
-// while (1) {
-// if (rem > sizeof(buffer)) {
-// now = sizeof(buffer);
-// }
-// else {
-// now = rem;
-// }
-//#if PLATFORM_XR809
-// //uint32_t flash_read(uint32_t flash, uint32_t addr,void *buf, uint32_t size)
-//#define FLASH_INDEX_XR809 0
-// res = flash_read(FLASH_INDEX_XR809, nowOfs, buffer, now);
-//#elif PLATFORM_BL602
-//
-//#elif PLATFORM_W600 || PLATFORM_W800
-//
-//#else
-// res = bekken_hal_flash_read(nowOfs, buffer, now);
-//#endif
-// for (i = 0; i < now; i++) {
-// unsigned char val = buffer[i];
-// if (!hex && isprint(val)) {
-// hprintf255(request, "'%c' ", val);
-// }
-// else {
-// hprintf255(request, "%02X ", val);
-// }
-// }
-// rem -= now;
-// nowOfs += now;
-// if (rem <= 0) {
-// break;
-// }
-// }
-//
-// poststr(request, "
");
-// }
-// poststr(request, "