[asterisk-commits] trunk r11282 - in /trunk: ./ cli.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Feb 27 08:23:45 MST 2006


Author: russell
Date: Mon Feb 27 09:23:44 2006
New Revision: 11282

URL: http://svn.digium.com/view/asterisk?rev=11282&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:
    trunk/   (props changed)
    trunk/cli.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.

Modified: trunk/cli.c
URL: http://svn.digium.com/view/asterisk/trunk/cli.c?rev=11282&r1=11281&r2=11282&view=diff
==============================================================================
--- trunk/cli.c (original)
+++ trunk/cli.c Mon Feb 27 09:23:44 2006
@@ -1383,7 +1383,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, "Invalid usage, but no usage information available.\n");
 				break;
 			}
 		} else 



More information about the asterisk-commits mailing list