[asterisk-commits] branch 1.2 r11281 - /branches/1.2/cli.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Feb 27 08:20:49 MST 2006


Author: russell
Date: Mon Feb 27 09:20:48 2006
New Revision: 11281

URL: http://svn.digium.com/view/asterisk?rev=11281&view=rev
Log:
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)

Modified:
    branches/1.2/cli.c

Modified: branches/1.2/cli.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/cli.c?rev=11281&r1=11280&r2=11281&view=diff
==============================================================================
--- branches/1.2/cli.c (original)
+++ branches/1.2/cli.c Mon Feb 27 09:20:48 2006
@@ -1363,7 +1363,10 @@
 			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 



More information about the asterisk-commits mailing list