summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2007-12-28 00:17:41 +0000
committerMark Michelson <mmichelson@digium.com>2007-12-28 00:17:41 +0000
commitaf080add621a10921e7e3e019d88576b124c8aad (patch)
tree1e6299e4f6046b06b9d5d9c7fb6ef74a1a125a29
parentc8f970936d17cbe3b3681f72e6e56b235dc66414 (diff)
Merged revisions 95095 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r95095 | mmichelson | 2007-12-27 18:16:15 -0600 (Thu, 27 Dec 2007) | 8 lines I found a bug while browsing the queue code and managed to reproduce it in a small setup. If a queue uses the ringall strategy, it was possible through unfortunate coincidence for a single member at a given penalty level to make app_queue think that all members at that penalty level were unavailable and cause the members at the next penalty level to be rung. With this patch, we will only move to the next penalty level if ALL the members at a given penalty level are unreachable. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95096 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--apps/app_queue.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index ad39a78cd..1160aa135 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2158,16 +2158,14 @@ static int ring_one(struct queue_ent *qe, struct callattempt *outgoing, int *bus
for (cur = outgoing; cur; cur = cur->q_next) {
if (cur->stillgoing && !cur->chan && cur->metric <= best->metric) {
ast_debug(1, "(Parallel) Trying '%s' with metric %d\n", cur->interface, cur->metric);
- ring_entry(qe, cur, busies);
+ ret |= ring_entry(qe, cur, busies);
}
}
} else {
/* Ring just the best channel */
ast_debug(1, "Trying '%s' with metric %d\n", best->interface, best->metric);
- ring_entry(qe, best, busies);
+ ret = ring_entry(qe, best, busies);
}
- if (best->chan) /* break out with result = 1 */
- ret = 1;
}
return ret;