Commit 16fc6028 authored by frtabu's avatar frtabu

fix empty array format

parent 2051e652
...@@ -223,7 +223,7 @@ void websrv_gettbldata_response(struct _u_response * response,webdatadef_t * wda ...@@ -223,7 +223,7 @@ void websrv_gettbldata_response(struct _u_response * response,webdatadef_t * wda
} }
json_array_append_new(jdata,jline); json_array_append_new(jdata,jline);
} }
json_t *jbody=json_pack("{s:[o],s:{s:o,s:o}}","display",json_null(),"table","columns",jcols,"rows",jdata); json_t *jbody=json_pack("{s:[],s:{s:o,s:o}}","display","table","columns",jcols,"rows",jdata);
websrv_jbody(response,jbody); websrv_jbody(response,jbody);
} }
...@@ -472,7 +472,8 @@ int websrv_processwebfunc(struct _u_response * response, cmdparser_t * modulestr ...@@ -472,7 +472,8 @@ int websrv_processwebfunc(struct _u_response * response, cmdparser_t * modulestr
websrv_gettbldata_response(response,&wdata); websrv_gettbldata_response(response,&wdata);
} else { } else {
websrv_printf_start(response,16384); websrv_printf_start(response,16384);
cmd->cmdfunc(cmd->cmdname,websrvparams.dbglvl,websrv_printf); char *sptr=index(cmd->cmdname,' ');
cmd->cmdfunc((sptr==NULL)?cmd->cmdname:sptr,websrvparams.dbglvl,websrv_printf);
if (cmd->cmdflags & TELNETSRV_CMDFLAG_PRINTWEBTBLDATA) if (cmd->cmdflags & TELNETSRV_CMDFLAG_PRINTWEBTBLDATA)
websrv_printf_tbl_end(200); websrv_printf_tbl_end(200);
else else
......
...@@ -49,8 +49,10 @@ static int channelmod_modify_cmd(char *buff, int debug, telnet_printfunc_t prnt) ...@@ -49,8 +49,10 @@ static int channelmod_modify_cmd(char *buff, int debug, telnet_printfunc_t prnt)
static int channelmod_print_help(char *buff, int debug, telnet_printfunc_t prnt); static int channelmod_print_help(char *buff, int debug, telnet_printfunc_t prnt);
static telnetshell_cmddef_t channelmod_cmdarray[] = { static telnetshell_cmddef_t channelmod_cmdarray[] = {
{"help","",channelmod_print_help,{NULL},0,NULL}, {"help","",channelmod_print_help,{NULL},0,NULL},
{"show","<predef,current>",channelmod_show_cmd,{NULL},0,NULL}, {"show","<predef,current>",channelmod_show_cmd,{NULL},TELNETSRV_CMDFLAG_TELNETONLY,NULL},
{"modify","<channelid> <param> <value>",channelmod_modify_cmd,{NULL},0,NULL}, {"show predef","",channelmod_show_cmd,{NULL},TELNETSRV_CMDFLAG_WEBSRVONLY,NULL},
{"show current","",channelmod_show_cmd,{NULL},TELNETSRV_CMDFLAG_WEBSRVONLY,NULL},
{"modify","<channelid> <param> <value>",channelmod_modify_cmd,{NULL},TELNETSRV_CMDFLAG_TELNETONLY,NULL},
{"","",NULL,{NULL},0,NULL}, {"","",NULL,{NULL},0,NULL},
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment