From 263f7a7542302903a418045cbe53a234bfbd65d6 Mon Sep 17 00:00:00 2001 From: 2ndacc Date: Thu, 20 Feb 2020 09:46:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8A=82=E7=BA=A6=E4=B8=80=E7=82=B9=E5=86=85?= =?UTF-8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TC1/http_server/app_httpd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TC1/http_server/app_httpd.c b/TC1/http_server/app_httpd.c index 306abf3..e25b312 100644 --- a/TC1/http_server/app_httpd.c +++ b/TC1/http_server/app_httpd.c @@ -50,7 +50,7 @@ static bool is_http_init; static bool is_handlers_registered; -struct httpd_wsgi_call g_app_handlers[]; +const struct httpd_wsgi_call g_app_handlers[]; char power_info_json[1548] = { 0 }; char up_time[16] = "00:00:00"; @@ -386,7 +386,7 @@ exit: return err; } -struct httpd_wsgi_call g_app_handlers[] = { +const struct httpd_wsgi_call g_app_handlers[] = { { "/", HTTPD_HDR_DEFORT, 0, HttpGetIndexPage, NULL, NULL, NULL }, { "/js", HTTPD_HDR_DEFORT, 0, HttpGetJs, NULL, NULL, NULL }, { "/socket", HTTPD_HDR_DEFORT, 0, NULL, HttpSetSocketStatus, NULL, NULL }, @@ -405,7 +405,7 @@ static int g_app_handlers_no = sizeof(g_app_handlers)/sizeof(struct httpd_wsgi_c static void AppHttpRegisterHandlers() { int rc; - rc = httpd_register_wsgi_handlers(g_app_handlers, g_app_handlers_no); + rc = httpd_register_wsgi_handlers((struct httpd_wsgi_call *)g_app_handlers, g_app_handlers_no); if (rc) { http_log("failed to register test web handler"); }