diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-09-13 21:53:01 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-09-13 21:53:01 +0000 |
commit | 4c5fae66ee063868f620bd0fbbbdbb5cb85fc51a (patch) | |
tree | 419fd616e42382ac7201d740b35484a9292096d4 /apps/app_queue.c | |
parent | ab29da2507ee5bdd9999cf07f9ff5318ec4398d9 (diff) |
Changed "in" to "queue" in "queue {pause|unpause} member" command to be more clear.
Also added check to be sure that sixth argument is the word "reason" if full command is given
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@82352 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r-- | apps/app_queue.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index 62f432f17..38061cc5a 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -4816,12 +4816,12 @@ static char *complete_queue_remove_member(const char *line, const char *word, in static char *complete_queue_pause_member(const char *line, const char *word, int pos, int state) { - /* 0 - queue; 1 - pause; 2 - member; 3 - <interface>; 4 - in; 5 - <queue>; 6 - reason; 7 - <reason> */ + /* 0 - queue; 1 - pause; 2 - member; 3 - <interface>; 4 - queue; 5 - <queue>; 6 - reason; 7 - <reason> */ switch (pos) { case 3: /* Don't attempt to complete name of interface (infinite possibilities) */ return NULL; - case 4: /* only one possible match, "in" */ - return state == 0 ? ast_strdup("in") : NULL; + case 4: /* only one possible match, "queue" */ + return state == 0 ? ast_strdup("queue") : NULL; case 5: /* <queue> */ return complete_queue(line, word, pos, state); case 6: /* "reason" */ @@ -4842,7 +4842,7 @@ static char *handle_queue_pause_member(struct ast_cli_entry *e, int cmd, struct case CLI_INIT: e->command = "queue {pause|unpause} member"; e->usage = - "Usage: queue {pause|unpause} member <member> [in <queue> [reason <reason>]]\n" + "Usage: queue {pause|unpause} member <member> [queue <queue> [reason <reason>]]\n" " Pause or unpause a queue member. Not specifying a particular queue\n" " will pause or unpause a member across all queues to which the member\n" " belongs.\n"; @@ -4853,7 +4853,9 @@ static char *handle_queue_pause_member(struct ast_cli_entry *e, int cmd, struct if (a->argc < 4 || a->argc == 5 || a->argc == 7 || a->argc > 8) { return CLI_SHOWUSAGE; - } else if (a->argc >= 5 && strcmp(a->argv[4], "in")) { + } else if (a->argc >= 5 && strcmp(a->argv[4], "queue")) { + return CLI_SHOWUSAGE; + } else if (a->argc == 8 && strcmp(a->argv[6], "reason")) { return CLI_SHOWUSAGE; } |