[svn-commits] mmichelson: branch mmichelson/queue-reset r166859 - /team/mmichelson/queue-re...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Dec 29 11:20:03 CST 2008
Author: mmichelson
Date: Mon Dec 29 11:20:02 2008
New Revision: 166859
URL: http://svn.digium.com/view/asterisk?view=rev&rev=166859
Log:
Make some CLI fixes for new queue commands
* Change "queue reload rules" to "queue rules reload" so that it does
not clash with the other queue reload command.
* Fix tab-completion so that a queue name will only be tab-completed a single
time for a couple of the new queue commands.
Modified:
team/mmichelson/queue-reset/apps/app_queue.c
Modified: team/mmichelson/queue-reset/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/mmichelson/queue-reset/apps/app_queue.c?view=diff&rev=166859&r1=166858&r2=166859
==============================================================================
--- team/mmichelson/queue-reset/apps/app_queue.c (original)
+++ team/mmichelson/queue-reset/apps/app_queue.c Mon Dec 29 11:20:02 2008
@@ -6705,9 +6705,9 @@
{
switch (cmd) {
case CLI_INIT:
- e->command = "queue reload rules";
+ e->command = "queue rules reload";
e->usage =
- "Usage: queue reload rules\n"
+ "Usage: queue rules reload\n"
" Reloads rules defined in queuerules.conf\n";
return NULL;
case CLI_GENERATE:
@@ -6728,7 +6728,11 @@
"Reset stats for <queuename> if specified. Otherwise resets stats for all queues\n";
return NULL;
case CLI_GENERATE:
- return complete_queue(a->line, a->word, a->pos, a->n);
+ if (a->pos == 3) {
+ return complete_queue(a->line, a->word, a->pos, a->n);
+ } else {
+ return NULL;
+ }
}
if (a->argc < 3 || a->argc > 4)
@@ -6752,7 +6756,11 @@
"Reload queue members in <queuename> if specified. Otherwise, reload members in all queues\n";
return NULL;
case CLI_GENERATE:
- return complete_queue(a->line, a->word, a->pos, a->n);
+ if (a->pos == 4) {
+ return complete_queue(a->line, a->word, a->pos, a->n);
+ } else {
+ return NULL;
+ }
}
if (a->argc < 3 || a->argc > 4)
More information about the svn-commits
mailing list