aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-02-17 16:25:51 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-02-17 16:25:51 +0000
commitb38f2df55d48c398ab16a31d01071630f00253b4 (patch)
tree4bf95402e788312e879f131d85c9d5e2143d43fb /apps
parentd096a34285608f6387569831aaa84ed6007893e3 (diff)
Merged revisions 247169 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r247169 | mmichelson | 2010-02-17 10:24:54 -0600 (Wed, 17 Feb 2010) | 9 lines 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: http://svn.digium.com/svn/asterisk/branches/1.6.1@247171 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 b0ece01f2..21b851983 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2920,9 +2920,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 {