diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-02-27 15:20:48 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-02-27 15:20:48 +0000 |
commit | ae9626c2f325cf46e3f0488d7935272cf8cd22f0 (patch) | |
tree | f349a4c41da166c02986fd998051a6536d01af89 /cli.c | |
parent | 579ff01a625be992fa2c3ca682346710199fc69d (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/branches/1.2@11281 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cli.c')
-rw-r--r-- | cli.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1363,7 +1363,10 @@ int ast_cli_command(int fd, 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, "%s", "Invalid usage, but no usage information available.\n"); break; } } else |