summaryrefslogtreecommitdiff
path: root/apps/app_queue.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r--apps/app_queue.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 440702599..d8b8399c8 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -6869,9 +6869,12 @@ static void reload_single_member(const char *memberdata, struct call_queue *q)
if (cur) {
ao2_ref(cur, -1);
- } else {
- q->membercount++;
}
+
+ /* Since this function is only called in a loop parsing all members after setting
+ * q->membercount = 0 if we are reloading, we must increment the membercount whether
+ * we add or reload, otherwise q->membercount stays 0 after a reload */
+ q->membercount++;
}
static int mark_member_dead(void *obj, void *arg, int flags)