aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/app_queue.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 4a4993215..904aebd6d 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -3943,12 +3943,15 @@ static int set_member_paused(const char *queuename, const char *interface, const
ao2_ref(mem, -1);
}
}
- ao2_unlock(q);
- queue_unref(q);
- if (!ast_strlen_zero(queuename) && found) {
+ if (!ast_strlen_zero(queuename) && !strcasecmp(queuename, q->name)) {
+ ao2_unlock(q);
+ queue_unref(q);
break;
}
+
+ ao2_unlock(q);
+ queue_unref(q);
}
return found ? RESULT_SUCCESS : RESULT_FAILURE;