aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-03 20:14:13 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-03 20:14:13 +0000
commit1287c9f4985cdc73855fd1ac3d313d4a3994570c (patch)
tree94947319681ad39f4f74dc3ec08a27b4950fe6e8
parent6479cf7a192c80019bb2c76094c63e4f694dfb36 (diff)
fix a logic error in my previous fix to the queue reload code
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@44296 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_queue.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index ec53d6641..1e5fd8306 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -3405,11 +3405,15 @@ static void 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;