From 2c9b857bdf43ceb444c6ffafe762894f7ed5544d Mon Sep 17 00:00:00 2001 From: mvanbaak Date: Sun, 12 Oct 2008 09:19:23 +0000 Subject: fix the 'agi show commands' CLI function. (closes issue #13666) Reported by: eliel Patches: res_agi.c.patch uploaded by eliel (license 64) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@148425 f38db490-d61c-443f-a65b-d21fe96a405b --- res/res_agi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'res/res_agi.c') diff --git a/res/res_agi.c b/res/res_agi.c index d4cbd6f16..d2a215950 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -2740,9 +2740,9 @@ static char *handle_cli_agi_show(struct ast_cli_entry *e, int cmd, struct ast_cl 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); -- cgit v1.2.3