]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 44296 via svnmerge from
authorKevin P. Fleming <kpfleming@digium.com>
Tue, 3 Oct 2006 20:18:29 +0000 (20:18 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Tue, 3 Oct 2006 20:18:29 +0000 (20:18 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r44296 | kpfleming | 2006-10-03 15:14:13 -0500 (Tue, 03 Oct 2006) | 2 lines

fix a logic error in my previous fix to the queue reload code

........

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

apps/app_queue.c

index c6cd0f0086ea8c87737fa076b4c1c60caa5a51ee..06c8ccaf8c86455dda54023268f94d5042aa28b8 100644 (file)
@@ -3825,11 +3825,15 @@ static int reload_queues(void)
                                }
 
                                /* Free remaining members marked as delme */
-                               for (prev = NULL, cur = q->members, next = cur ? cur->next : NULL;
+                               for (prev = NULL, cur = q->members;
                                     cur;
-                                    cur = next, next = cur ? cur->next : NULL) {
-                                       if (!cur->delme)
+                                    cur = next) {
+                                       next = cur->next;
+
+                                       if (!cur->delme) {
+                                               prev = cur;
                                                continue;
+                                       }
 
                                        if (prev)
                                                prev->next = next;