]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 195369 via svnmerge from
authorEliel C. Sardanons <eliels@gmail.com>
Mon, 18 May 2009 21:31:15 +0000 (21:31 +0000)
committerEliel C. Sardanons <eliels@gmail.com>
Mon, 18 May 2009 21:31:15 +0000 (21:31 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

........
  r195369 | eliel | 2009-05-18 16:49:20 -0400 (Mon, 18 May 2009) | 8 lines

  Fix the CLI command 'manager show command' documentation and functionality.

  The CLI command 'manager show command' supports passing multiple action names in
  the same line, but it was not allowing that because of a incorrect check in the
  argumentes counter. Also the documentation was updated to show that this usage
  of the command is possible.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@195429 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/manager.c

index 526442fbce990f3a190f7c646d01672de1b0f843..e9f84e138b5178b22f8044b0b4e71a804d692986 100644 (file)
@@ -525,7 +525,7 @@ static char *handle_showmancmd(struct ast_cli_entry *e, int cmd, struct ast_cli_
        case CLI_INIT:
                e->command = "manager show command";
                e->usage = 
-                       "Usage: manager show command <actionname>\n"
+                       "Usage: manager show command <actionname> [<actionname> [<actionname> [...]]]\n"
                        "       Shows the detailed description for a specific Asterisk manager interface command.\n";
                return NULL;
        case CLI_GENERATE:
@@ -542,8 +542,9 @@ static char *handle_showmancmd(struct ast_cli_entry *e, int cmd, struct ast_cli_
                return ret;
        }
        authority = ast_str_alloca(80);
-       if (a->argc != 4)
+       if (a->argc < 4) {
                return CLI_SHOWUSAGE;
+       }
 
        AST_RWLIST_RDLOCK(&actions);
        AST_RWLIST_TRAVERSE(&actions, cur, list) {