summaryrefslogtreecommitdiff
path: root/main/manager.c
diff options
context:
space:
mode:
authorEliel C. Sardanons <eliels@gmail.com>2009-05-18 20:44:54 +0000
committerEliel C. Sardanons <eliels@gmail.com>2009-05-18 20:44:54 +0000
commit9e5da09a6be6724b1052a4dd22891b565958e86c (patch)
tree215c8ca063b62a360f6f8f349f336e78ae9d74c6 /main/manager.c
parent311c99789605d7536579226743ea369fd799ad57 (diff)
Rollback commit 195367.
The CLI command 'manager show command' supports passing multiple AMI actions at a time. The issue with this command was in another place. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/manager.c')
-rw-r--r--main/manager.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/main/manager.c b/main/manager.c
index aacdf4b7e..b4067e914 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -612,22 +612,17 @@ static char *handle_showmancmd(struct ast_cli_entry *e, int cmd, struct ast_cli_
" Shows the detailed description for a specific Asterisk manager interface command.\n";
return NULL;
case CLI_GENERATE:
- if (a->pos == 3) {
- /* autocomplete the action name. */
- l = strlen(a->word);
- which = 0;
- AST_RWLIST_RDLOCK(&actions);
- AST_RWLIST_TRAVERSE(&actions, cur, list) {
- if (!strncasecmp(a->word, cur->action, l) && ++which > a->n) {
- ret = ast_strdup(cur->action);
- break; /* make sure we exit even if ast_strdup() returns NULL */
- }
+ l = strlen(a->word);
+ which = 0;
+ AST_RWLIST_RDLOCK(&actions);
+ AST_RWLIST_TRAVERSE(&actions, cur, list) {
+ if (!strncasecmp(a->word, cur->action, l) && ++which > a->n) {
+ ret = ast_strdup(cur->action);
+ break; /* make sure we exit even if ast_strdup() returns NULL */
}
- AST_RWLIST_UNLOCK(&actions);
- return ret;
}
-
- return NULL;
+ AST_RWLIST_UNLOCK(&actions);
+ return ret;
}
authority = ast_str_alloca(80);
if (a->argc != 4) {