aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_queue.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-11-02 23:16:09 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-11-02 23:16:09 +0000
commit278341b071da1a4abe0ed8804537fd3d5cc9e890 (patch)
tree273ac9aad8e573d5fda7e056e0894f20a2d4c7bf /apps/app_queue.c
parent59ae68a326bd43a7f31682cf9402eb8775958ac6 (diff)
Merged revisions 47051 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r47051 | tilghman | 2006-11-02 17:00:20 -0600 (Thu, 02 Nov 2006) | 2 lines Reverse change of "show" to "list" and make several other commands more consistent with "category verb arguments" ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47052 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r--apps/app_queue.c29
1 files changed, 10 insertions, 19 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index fa366fb5f..ff1623ca0 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -4010,12 +4010,12 @@ static int reload_queues(void)
return 1;
}
-static int __queues_show(struct mansession *s, int manager, int fd, int argc, char **argv, int queue_show)
+static int __queues_show(struct mansession *s, int manager, int fd, int argc, char **argv)
{
struct call_queue *q;
struct queue_ent *qe;
struct member *mem;
- int pos;
+ int pos, queue_show;
time_t now;
char max_buf[80];
char *max;
@@ -4024,7 +4024,11 @@ static int __queues_show(struct mansession *s, int manager, int fd, int argc, ch
char *term = manager ? "\r\n" : "\n";
time(&now);
- if ((!queue_show && argc != 2) || (queue_show && argc != 3))
+ if (argc == 2)
+ queue_show = 0;
+ else if (argc == 3)
+ queue_show = 1;
+ else
return RESULT_SHOWUSAGE;
/* We only want to load realtime queues when a specific queue is asked for. */
@@ -4138,14 +4142,9 @@ static int __queues_show(struct mansession *s, int manager, int fd, int argc, ch
return RESULT_SUCCESS;
}
-static int queue_list(int fd, int argc, char **argv)
-{
- return __queues_show(NULL, 0, fd, argc, argv, 0);
-}
-
static int queue_show(int fd, int argc, char **argv)
{
- return __queues_show(NULL, 0, fd, argc, argv, 1);
+ return __queues_show(NULL, 0, fd, argc, argv);
}
static char *complete_queue(const char *line, const char *word, int pos, int state)
@@ -4172,9 +4171,9 @@ static char *complete_queue(const char *line, const char *word, int pos, int sta
*/
static int manager_queues_show( struct mansession *s, struct message *m )
{
- char *a[] = { "queue", "list" };
+ char *a[] = { "queue", "show" };
- __queues_show(s, 1, -1, 2, a, 0);
+ __queues_show(s, 1, -1, 2, a);
astman_append(s, "\r\n\r\n"); /* Properly terminate Manager output */
return RESULT_SUCCESS;
@@ -4584,10 +4583,6 @@ static char *complete_queue_remove_member(const char *line, const char *word, in
return NULL;
}
-static char queue_list_usage[] =
-"Usage: queue list\n"
-" Provides summary information on call queues.\n";
-
static char queue_show_usage[] =
"Usage: queue show\n"
" Provides summary information on a specified queue.\n";
@@ -4599,10 +4594,6 @@ static char qrm_cmd_usage[] =
"Usage: queue remove member <channel> from <queue>\n";
static struct ast_cli_entry cli_queue[] = {
- { { "queue", "list", NULL },
- queue_list, "Show status of queues",
- queue_list_usage, NULL, NULL },
-
{ { "queue", "show", NULL },
queue_show, "Show status of a specified queue",
queue_show_usage, complete_queue, NULL },