mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-15 03:15:36 +00:00
rename loglevel to g_loglevel because it's global variable...
This commit is contained in:
@ -1418,7 +1418,7 @@ int http_fn_cfg_loglevel_set(http_request_t* request) {
|
||||
if (http_getArg(request->url, "loglevel", tmpA, sizeof(tmpA))) {
|
||||
#if WINDOWS
|
||||
#else
|
||||
loglevel = atoi(tmpA);
|
||||
g_loglevel = atoi(tmpA);
|
||||
#endif
|
||||
poststr(request, "LOG level changed.");
|
||||
}
|
||||
@ -1427,7 +1427,7 @@ int http_fn_cfg_loglevel_set(http_request_t* request) {
|
||||
#if WINDOWS
|
||||
add_label_text_field(request, "Loglevel", "loglevel", "", "<form action=\"/cfg_loglevel_set\">");
|
||||
#else
|
||||
add_label_numeric_field(request, "Loglevel", "loglevel", loglevel, "<form action=\"/cfg_loglevel_set\">");
|
||||
add_label_numeric_field(request, "Loglevel", "loglevel", g_loglevel, "<form action=\"/cfg_loglevel_set\">");
|
||||
#endif
|
||||
poststr(request, "<br><br>\
|
||||
<input type=\"submit\" value=\"Submit\" >\
|
||||
|
||||
@ -722,7 +722,7 @@ static int http_rest_get_channelTypes(http_request_t* request) {
|
||||
static int http_rest_get_logconfig(http_request_t* request) {
|
||||
int i;
|
||||
http_setup(request, httpMimeTypeJson);
|
||||
hprintf255(request, "{\"level\":%d,", loglevel);
|
||||
hprintf255(request, "{\"level\":%d,", g_loglevel);
|
||||
hprintf255(request, "\"features\":%d,", logfeatures);
|
||||
poststr(request, "\"levelnames\":[");
|
||||
for (i = 0; i < LOG_MAX; i++) {
|
||||
@ -794,7 +794,7 @@ static int http_rest_post_logconfig(http_request_t* request) {
|
||||
if (t[i + 1].type != JSMN_PRIMITIVE) {
|
||||
continue; /* We expect groups to be an array of strings */
|
||||
}
|
||||
loglevel = atoi(json_str + t[i + 1].start);
|
||||
g_loglevel = atoi(json_str + t[i + 1].start);
|
||||
i += t[i + 1].size + 1;
|
||||
}
|
||||
else if (jsoneq(json_str, &t[i], "features") == 0) {
|
||||
|
||||
Reference in New Issue
Block a user