mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-19 11:13:09 +00:00
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@274093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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,7 +611,7 @@ static enum queue_member_status get_member_status(struct call_queue *q, int max_
|
||||
ao2_iterator_destroy(&mem_iter);
|
||||
ao2_unlock(q);
|
||||
|
||||
if (allpaused) {
|
||||
if (!empty && allpaused) {
|
||||
result = QUEUE_NO_REACHABLE_MEMBERS;
|
||||
}
|
||||
return result;
|
||||
|
Reference in New Issue
Block a user