]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't check all realtime queues when doing "queue show some_queue".
authorWalter Doekes <walter+asterisk@wjd.nu>
Wed, 16 Oct 2013 11:52:24 +0000 (11:52 +0000)
committerWalter Doekes <walter+asterisk@wjd.nu>
Wed, 16 Oct 2013 11:52:24 +0000 (11:52 +0000)
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401076 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c

index a1c11a301789dfc81a6ef272ba6cc7e8a560a465..4ea4fb320546163888b0500ae6cf5d67edca54f3 100644 (file)
@@ -8253,9 +8253,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);