aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-26 20:56:01 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-26 20:56:01 +0000
commita44a35af55c3f5b3b40751c1e1555ad623d68737 (patch)
tree22499eb0c0a09b37a20cbdc563cc85017351051a /apps
parent22c6a0961baf7db6c00c59ce8512c2d317eb062e (diff)
Prior to this patch, the "queue show" command used cached
information for realtime queues instead of giving up-to-date info. Now realtime is queried for the latest and greatest in queue info. (closes issue #12858) Reported by: bcnit Patches: queue_show.patch uploaded by putnopvut (license 60) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@125476 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_queue.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 688ffed13..736c4b3d6 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -4311,8 +4311,18 @@ static int __queues_show(struct mansession *s, int manager, int fd, int argc, ch
return RESULT_SHOWUSAGE;
/* We only want to load realtime queues when a specific queue is asked for. */
- if (queue_show)
+ if (queue_show) {
load_realtime_queue(argv[2]);
+ } else if (ast_check_realtime("queues")) {
+ struct ast_config *cfg = ast_load_realtime_multientry("queues", "name LIKE", "%", (char *) NULL);
+ char *queuename;
+ if (cfg) {
+ for (queuename = ast_category_browse(cfg, NULL); !ast_strlen_zero(queuename); queuename = ast_category_browse(cfg, queuename)) {
+ load_realtime_queue(queuename);
+ }
+ ast_config_destroy(cfg);
+ }
+ }
AST_LIST_LOCK(&queues);
if (AST_LIST_EMPTY(&queues)) {