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/branches/1.2@11281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2006-02-27 15:20:48 +00:00
parent 39139b2802
commit 34a135da3b

3
cli.c
View File

@@ -1363,7 +1363,10 @@ int ast_cli_command(int fd, char *s)
if (e) { if (e) {
switch(e->handler(fd, x, argv)) { switch(e->handler(fd, x, argv)) {
case RESULT_SHOWUSAGE: case RESULT_SHOWUSAGE:
if (e->usage)
ast_cli(fd, "%s", e->usage); ast_cli(fd, "%s", e->usage);
else
ast_cli(fd, "%s", "Invalid usage, but no usage information available.\n");
break; break;
} }
} else } else