[asterisk-commits] mmichelson: branch 1.4 r73400 - /branches/1.4/apps/app_queue.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jul 5 10:59:42 CDT 2007


Author: mmichelson
Date: Thu Jul  5 10:59:41 2007
New Revision: 73400

URL: http://svn.digium.com/view/asterisk?view=rev&rev=73400
Log:
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.


Modified:
    branches/1.4/apps/app_queue.c

Modified: branches/1.4/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_queue.c?view=diff&rev=73400&r1=73399&r2=73400
==============================================================================
--- branches/1.4/apps/app_queue.c (original)
+++ branches/1.4/apps/app_queue.c Thu Jul  5 10:59:41 2007
@@ -4050,6 +4050,13 @@
 	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 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 @@
 
 	{ { "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",




More information about the asterisk-commits mailing list