aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-02-17 16:24:17 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-02-17 16:24:17 +0000
commit90bc73c565eb3789a78fa8a4c4acbdb35769feb7 (patch)
tree8baad38e5948a7b562d378a4d2b51b8b4a305143 /apps
parent2dd29010ee78262edf94feb6bd3c58f62171deb3 (diff)
Make sure that when autofill is disabled that callers not in the front of the queue cannot place calls.
(closes issue #16834) Reported by: kebl0155 Patches: app_queue_no_autofill.v1.patch uploaded by kebl0155 (license 356) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@247168 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_queue.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 46fddf615..4497e125f 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2492,9 +2492,11 @@ static int is_our_turn(struct queue_ent *qe)
}
ao2_unlock(qe->parent);
-
- /* If the queue entry is within avl [the number of available members] calls from the top ... */
- if (ch && idx < avl) {
+ /* If the queue entry is within avl [the number of available members] calls from the top ...
+ * Autofill and position check added to support autofill=no (as only calls
+ * from the front of the queue are valid when autofill is disabled)
+ */
+ if (ch && idx < avl && (qe->parent->autofill || qe->pos == 1)) {
if (option_debug)
ast_log(LOG_DEBUG, "It's our turn (%s).\n", qe->chan->name);
res = 1;