aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-01-30 15:23:00 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-01-30 15:23:00 +0000
commit5843b302426e47f23020e51fc9c747eef5b959c4 (patch)
tree42dfed74b0f4be29c258928b5dcc1a727eaa03ca /apps
parent197b73fddaf47fc7c6ca6d5a7ca74c860870cdc6 (diff)
Fix a logic error with regards to autofill. Prior to this change, it was possible
for a caller to go out of turn if autofill were enabled and callers ahead in the queue were attempting to call a member. This change fixes this. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@101216 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_queue.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 0ee13c91b..3dbb7f0a4 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2391,8 +2391,9 @@ static int is_our_turn(struct queue_ent *qe)
if (option_debug)
ast_log(LOG_DEBUG, "There are %d available members.\n", avl);
- while ((idx < avl) && (ch) && !ch->pending && (ch != qe)) {
- idx++;
+ while ((idx < avl) && (ch) && (ch != qe)) {
+ if (!ch->pending)
+ idx++;
ch = ch->next;
}