mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
don't try to print the help text for a CLI command when RESULT_SHOWUSAGE is
returned if there is no help text available (issue #6604) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
5
cli.c
5
cli.c
@@ -1383,7 +1383,10 @@ int ast_cli_command(int fd, const char *s)
|
||||
if (e) {
|
||||
switch(e->handler(fd, x, argv)) {
|
||||
case RESULT_SHOWUSAGE:
|
||||
ast_cli(fd, "%s", e->usage);
|
||||
if (e->usage)
|
||||
ast_cli(fd, "%s", e->usage);
|
||||
else
|
||||
ast_cli(fd, "Invalid usage, but no usage information available.\n");
|
||||
break;
|
||||
}
|
||||
} else
|
||||
|
Reference in New Issue
Block a user