mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-11 02:15:45 +00:00
introduce command flags system, mark command sources, warning fixes
This commit is contained in:
@ -830,7 +830,7 @@ int http_fn_cmd_tool(http_request_t *request) {
|
||||
poststr(request,"<h4>Command Tool</h4>");
|
||||
|
||||
if( http_getArg(request->url,"cmd",tmpA,sizeof(tmpA))) {
|
||||
i = CMD_ExecuteCommand(tmpA);
|
||||
i = CMD_ExecuteCommand(tmpA, COMMAND_FLAG_SOURCE_CONSOLE);
|
||||
if(i == 0) {
|
||||
poststr(request,"Command not found");
|
||||
} else {
|
||||
@ -1083,7 +1083,7 @@ int http_fn_cm(http_request_t *request) {
|
||||
|
||||
http_setup(request, httpMimeTypeJson);
|
||||
if( http_getArg(request->url,"cmnd",tmpA,sizeof(tmpA))) {
|
||||
CMD_ExecuteCommand(tmpA);
|
||||
CMD_ExecuteCommand(tmpA,COMMAND_FLAG_SOURCE_HTTP);
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1063,7 +1063,7 @@ static int http_rest_post_channels(http_request_t *request){
|
||||
|
||||
static int http_rest_post_cmd(http_request_t *request){
|
||||
char *cmd = request->bodystart;
|
||||
CMD_ExecuteCommand(cmd);
|
||||
CMD_ExecuteCommand(cmd, COMMAND_FLAG_SOURCE_CONSOLE);
|
||||
return http_rest_error(request, 200, "OK");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user