提交 ee7a52d9 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-10291: [fs_cli] fs_cli Error indicated on console loglevel debug with extra…

FS-10291: [fs_cli] fs_cli Error indicated on console loglevel debug with extra whitespace before or after debug #resolve
上级 5d4ac1cd
...@@ -2382,7 +2382,7 @@ static switch_status_t parse_command(listener_t *listener, switch_event_t **even ...@@ -2382,7 +2382,7 @@ static switch_status_t parse_command(listener_t *listener, switch_event_t **even
goto done_noreply; goto done_noreply;
} else if (!strncasecmp(cmd, "log", 3)) { } else if (!strncasecmp(cmd, "log", 3)) {
char *level_s; char *level_s, *p;
switch_log_level_t ltype = SWITCH_LOG_DEBUG; switch_log_level_t ltype = SWITCH_LOG_DEBUG;
if (!switch_test_flag(listener, LFLAG_ALLOW_LOG)) { if (!switch_test_flag(listener, LFLAG_ALLOW_LOG)) {
...@@ -2395,11 +2395,14 @@ static switch_status_t parse_command(listener_t *listener, switch_event_t **even ...@@ -2395,11 +2395,14 @@ static switch_status_t parse_command(listener_t *listener, switch_event_t **even
//move past the command //move past the command
level_s = cmd + 3; level_s = cmd + 3;
//see if we got an argument while(*level_s == ' ') {
if (!zstr(level_s)) {
//if so move to the argument
level_s++; level_s++;
} }
if ((p = strchr(level_s, ' '))) {
*p = '\0';
}
//see if we lined up on an argument or not //see if we lined up on an argument or not
if (!zstr(level_s)) { if (!zstr(level_s)) {
ltype = switch_log_str2level(level_s); ltype = switch_log_str2level(level_s);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论