summaryrefslogtreecommitdiff
path: root/apps/app_queue.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2010-02-17 16:24:54 +0000
committerMark Michelson <mmichelson@digium.com>2010-02-17 16:24:54 +0000
commitc54f8ced1b943f37ca530472e85722a2bca9e056 (patch)
tree28d98bdfdc9b13691eddfd6a3b87f422b7d1b004 /apps/app_queue.c
parentbbb5acc65e1453fba84d05e72aaf82420c2b95a9 (diff)
Merged revisions 247168 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r247168 | mmichelson | 2010-02-17 10:24:17 -0600 (Wed, 17 Feb 2010) | 3 lines Make sure that when autofill is disabled that callers not in the front of the queue cannot place calls. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@247169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_queue.c')
-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 8bc150786..288347b5b 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -3545,9 +3545,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)) {
ast_debug(1, "It's our turn (%s).\n", qe->chan->name);
res = 1;
} else {