mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-23 22:45:39 +00:00
Don't crash when typing 'core set verbose' or 'core set debug' by themselves.
(closes issue #14219) Reported by: jamesgolovich Patches: asterisk-setverbosecrash.diff.txt uploaded by jamesgolovich (license 176) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -415,7 +415,7 @@ static char *handle_verbose(struct ast_cli_entry *e, int cmd, struct ast_cli_arg
|
|||||||
* we are guaranteed to be called with argc >= e->args;
|
* we are guaranteed to be called with argc >= e->args;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (argc < e->args)
|
if (argc <= e->args)
|
||||||
return CLI_SHOWUSAGE;
|
return CLI_SHOWUSAGE;
|
||||||
if (!strcasecmp(argv[e->args - 1], "debug")) {
|
if (!strcasecmp(argv[e->args - 1], "debug")) {
|
||||||
dst = &option_debug;
|
dst = &option_debug;
|
||||||
|
Reference in New Issue
Block a user