From: Russell Bryant Date: Mon, 27 Feb 2006 15:23:44 +0000 (+0000) Subject: don't try to print the help text for a CLI command when RESULT_SHOWUSAGE is X-Git-Tag: 1.4.0-beta1~2521 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9d89b26ee9f941f275ea2f163e0d787eaa17c8b;p=thirdparty%2Fasterisk.git 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 --- diff --git a/cli.c b/cli.c index 5915aade2f..953116507c 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