[asterisk-commits] mvanbaak: trunk r148425 - /trunk/res/res_agi.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Oct 12 04:19:24 CDT 2008


Author: mvanbaak
Date: Sun Oct 12 04:19:23 2008
New Revision: 148425

URL: http://svn.digium.com/view/asterisk?view=rev&rev=148425
Log:
fix the 'agi show commands' CLI function.

(closes issue #13666)
Reported by: eliel
Patches: 
      res_agi.c.patch uploaded by eliel (license 64)

Modified:
    trunk/res/res_agi.c

Modified: trunk/res/res_agi.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_agi.c?view=diff&rev=148425&r1=148424&r2=148425
==============================================================================
--- trunk/res/res_agi.c (original)
+++ trunk/res/res_agi.c Sun Oct 12 04:19:23 2008
@@ -2740,9 +2740,9 @@
 	case CLI_GENERATE:
 		return NULL;
 	}
-	if (a->argc < e->args)
+	if (a->argc < e->args - 1 || (a->argc >= e->args && strcasecmp(a->argv[e->args - 1], "topic")))
 		return CLI_SHOWUSAGE;
-	if (a->argc > e->args) {
+	if (a->argc > e->args - 1) {
 		command = find_command(a->argv + e->args, 1);
 		if (command) {
 			ast_cli(a->fd, "%s", command->usage);




More information about the asterisk-commits mailing list