From e694a976f67dd09919aed7bbc4121b46318867f4 Mon Sep 17 00:00:00 2001 From: Walter Doekes Date: Wed, 16 Oct 2013 12:19:47 +0000 Subject: [PATCH] Don't check all realtime queues when doing "queue show some_queue". When using realtime queues, queues have to be fetched from the database every now and then to see if any info has been changed or to see if the queue has been removed. When fetching info for an individual queue, the pruning of other queues is unnecessarily costly. Review: https://reviewboard.asterisk.org/r/2907/ ........ Merged revisions 401049 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 401076 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 401077 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@401079 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_queue.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/app_queue.c b/apps/app_queue.c index 10a13300f0..d91a020135 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -8842,9 +8842,10 @@ static char *__queues_show(struct mansession *s, int fd, int argc, const char * ao2_lock(q); /* This check is to make sure we don't print information for realtime * queues which have been deleted from realtime but which have not yet - * been deleted from the in-core container + * been deleted from the in-core container. Only do this if we're not + * looking for a specific queue. */ - if (q->realtime) { + if (argc < 3 && q->realtime) { realtime_queue = find_load_queue_rt_friendly(q->name); if (!realtime_queue) { ao2_unlock(q);