aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_queue.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-05 15:59:41 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-05 15:59:41 +0000
commita0eadff5e51fb7eeb3ee8ec69d9ecffb4142cf6a (patch)
tree2929e9e30613bd9ad34b9619141fc93c57a7a5e6 /apps/app_queue.c
parent59c02f82be5e90fe284487bea398b78fe1da4717 (diff)
Correcting a minor CLI bug I found. When issuing the queue show command, if you type
queue show and then press tab, you can continue pressing tab and it will keep auto-completing queue names even though only 1 queue can be used as an argument. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@73400 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r--apps/app_queue.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 9c8cce4b6..650227985 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -4050,6 +4050,13 @@ static char *complete_queue(const char *line, const char *word, int pos, int sta
return ret;
}
+static char *complete_queue_show(const char *line, const char *word, int pos, int state)
+{
+ if (pos == 2)
+ return complete_queue(line, word, pos, state);
+ return NULL;
+}
+
/*!\brief callback to display queues status in manager
\addtogroup Group_AMI
*/
@@ -4424,7 +4431,7 @@ static char qrm_cmd_usage[] =
static struct ast_cli_entry cli_show_queue_deprecated = {
{ "show", "queue", NULL },
queue_show, NULL,
- NULL, complete_queue };
+ NULL, complete_queue_show };
static struct ast_cli_entry cli_add_queue_member_deprecated = {
{ "add", "queue", "member", NULL },
@@ -4444,7 +4451,7 @@ static struct ast_cli_entry cli_queue[] = {
{ { "queue", "show", NULL },
queue_show, "Show status of a specified queue",
- queue_show_usage, complete_queue, &cli_show_queue_deprecated },
+ queue_show_usage, complete_queue_show, &cli_show_queue_deprecated },
{ { "queue", "add", "member", NULL },
handle_queue_add_member, "Add a channel to a specified queue",