]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fixed broken behavior of a reload on realtime queues. Prior to this patch, if a reloa...
authorMark Michelson <mmichelson@digium.com>
Fri, 31 Aug 2007 19:48:55 +0000 (19:48 +0000)
committerMark Michelson <mmichelson@digium.com>
Fri, 31 Aug 2007 19:48:55 +0000 (19:48 +0000)
a realtime queue had callers waiting in it, then the queue would be removed from the queue list, but it would
not actually be freed (in fact, a debug message warning about a memory leak would come up). With this patch,
reloads do not touch realtime queues at all.

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

apps/app_queue.c

index 884c10294b6b3e46bfadd56d8a1d8e4e3b020d82..adac571ae892dc7547b2f22598146ee1691ef5c8 100644 (file)
@@ -3815,8 +3815,10 @@ static int reload_queues(void)
        AST_LIST_LOCK(&queues);
        use_weight=0;
        /* Mark all queues as dead for the moment */
-       AST_LIST_TRAVERSE(&queues, q, list)
-               q->dead = 1;
+       AST_LIST_TRAVERSE(&queues, q, list) {
+               if(!q->realtime)
+                       q->dead = 1;
+       }
 
        /* Chug through config file */
        cat = NULL;