[svn-commits] mmichelson: branch 1.4 r247168 - /branches/1.4/apps/app_queue.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Feb 17 10:24:21 CST 2010


Author: mmichelson
Date: Wed Feb 17 10:24:17 2010
New Revision: 247168

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=247168
Log:
Make sure that when autofill is disabled that callers not in the front of the queue cannot place calls.


Modified:
    branches/1.4/apps/app_queue.c

Modified: branches/1.4/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/apps/app_queue.c?view=diff&rev=247168&r1=247167&r2=247168
==============================================================================
--- branches/1.4/apps/app_queue.c (original)
+++ branches/1.4/apps/app_queue.c Wed Feb 17 10:24:17 2010
@@ -2492,9 +2492,11 @@
 	}
 
 	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;




More information about the svn-commits mailing list