diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-02 15:46:27 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-02 15:46:27 +0000 |
commit | ff5b385c6dc532c9b295702d28bce9bbcef7a3c7 (patch) | |
tree | fc7f9923b65fb3e5c37d03dc39f8dbe47bb75649 /apps | |
parent | 9a7a303614a64cc79a14476b5126115a5c600e67 (diff) |
If all members are paused, the wrong status is indicated.
(closes issue #17576)
Reported by: ramonpeek
Patches:
diff.txt uploaded by ramonpeek (license 266)
Tested by: ramonpeek
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@273639 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_queue.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index 7690fedc9..b937266ae 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -574,6 +574,7 @@ 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; ao2_lock(q); mem_iter = ao2_iterator_init(q->members, 0); @@ -586,6 +587,8 @@ static enum queue_member_status get_member_status(struct call_queue *q, int max_ if (member->paused) { ao2_ref(member, -1); continue; + } else { + allpaused = 0; } switch (member->status) { @@ -605,6 +608,10 @@ 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; + } return result; } |