]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Found a case where the queue's membercount is off. It does not take into account...
authorMark Michelson <mmichelson@digium.com>
Mon, 27 Aug 2007 14:55:44 +0000 (14:55 +0000)
committerMark Michelson <mmichelson@digium.com>
Mon, 27 Aug 2007 14:55:44 +0000 (14:55 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81010 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c

index 7b3538d19545173566bd10f9a17a6a38d6c2969c..298fab19e4e77c6c564864e369c764d927f98aee 100644 (file)
@@ -3926,8 +3926,11 @@ static int reload_queues(void)
                                ast_log(LOG_DEBUG, "XXX Leaking a little memory :( XXX\n");
                } else {
                        ast_mutex_lock(&q->lock);
-                       for (cur = q->members; cur; cur = cur->next)
+                       for (cur = q->members; cur; cur = cur->next) {
+                               if(cur->dynamic)
+                                       q->membercount++;
                                cur->status = ast_device_state(cur->interface);
+                       }
                        ast_mutex_unlock(&q->lock);
                }
        }