aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_queue.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-28 00:16:15 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-28 00:16:15 +0000
commitd666e51481a9a9edff9776d70a43b3e4275d2571 (patch)
treec1f2427f421327b32167c84171081d98abd9d2e3 /apps/app_queue.c
parent0788d8e1ebbb0b6a7822650df03d5e73677d02cc (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@95095 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_queue.c')
-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 159bdda65..9c23a816a 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -1922,17 +1922,15 @@ static int ring_one(struct queue_ent *qe, struct callattempt *outgoing, int *bus
if (cur->stillgoing && !cur->chan && cur->metric <= best->metric) {
if (option_debug)
ast_log(LOG_DEBUG, "(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 */
if (option_debug)
ast_log(LOG_DEBUG, "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;