aboutsummaryrefslogtreecommitdiffstats
path: root/cli.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-02-27 15:23:44 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-02-27 15:23:44 +0000
commitb5c7f9bd62299890445d0025b5c02e663d7b6e2e (patch)
treec8dfcd9d629f21d1e0d3366653b2de2084428253 /cli.c
parent00f974e5c536619e732330c30f48c67d8e2f7e4c (diff)
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: http://svn.digium.com/svn/asterisk/trunk@11282 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cli.c')
-rw-r--r--cli.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cli.c b/cli.c
index 5915aade2..953116507 100644
--- a/cli.c
+++ b/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