aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-06 13:52:28 +0000
committermnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-06 13:52:28 +0000
commit02b956b6b849668b01de9ad8e5f7c1d5238650e6 (patch)
tree90e4bec5194a72d671e04ee75b361ed2ba19f392 /apps
parent4ad4864fca0fb13d27b20e3b35d26196c1a69e1d (diff)
Make get_member_status return QUEUE_NO_MEMBERS instead of QUEUE_NO_REACHABLE_MEMBERS to make joinempty=no work again. This regression was introduced in 273639. Also fixed whitespace.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@274093 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_queue.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index b937266ae..88d120222 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -574,11 +574,13 @@ static enum queue_member_status get_member_status(struct call_queue *q, int max_
struct member *member;
struct ao2_iterator mem_iter;
enum queue_member_status result = QUEUE_NO_MEMBERS;
- int allpaused = 1;
+ int allpaused = 1, empty = 1;
ao2_lock(q);
mem_iter = ao2_iterator_init(q->members, 0);
while ((member = ao2_iterator_next(&mem_iter))) {
+ empty = 0;
+
if (max_penalty && (member->penalty > max_penalty)) {
ao2_ref(member, -1);
continue;
@@ -609,9 +611,9 @@ static enum queue_member_status get_member_status(struct call_queue *q, int max_
ao2_iterator_destroy(&mem_iter);
ao2_unlock(q);
- if (allpaused) {
- result = QUEUE_NO_REACHABLE_MEMBERS;
- }
+ if (!empty && allpaused) {
+ result = QUEUE_NO_REACHABLE_MEMBERS;
+ }
return result;
}