diff options
author | Russell Bryant <russell@russellbryant.com> | 2006-02-27 15:23:44 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2006-02-27 15:23:44 +0000 |
commit | c9d89b26ee9f941f275ea2f163e0d787eaa17c8b (patch) | |
tree | c8dfcd9d629f21d1e0d3366653b2de2084428253 /cli.c | |
parent | 750e43c016cac5d07d4f0d96e0358c590bdec3d7 (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: https://origsvn.digium.com/svn/asterisk/trunk@11282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'cli.c')
-rw-r--r-- | cli.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 |