[asterisk-commits] mmichelson: trunk r94396 - /trunk/apps/app_queue.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Dec 20 19:14:33 CST 2007


Author: mmichelson
Date: Thu Dec 20 19:14:32 2007
New Revision: 94396

URL: http://svn.digium.com/view/asterisk?view=rev&rev=94396
Log:
Moved the update of the queue_ent's rule list to just before we try to call
queue members. This allows for the change in penalty levels to be executed at
the most logical time frame.


Modified:
    trunk/apps/app_queue.c

Modified: trunk/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_queue.c?view=diff&rev=94396&r1=94395&r2=94396
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Thu Dec 20 19:14:32 2007
@@ -4266,6 +4266,11 @@
 				if ((res = say_periodic_announcement(&qe,ringing)))
 					goto stop;
 
+			/* see if we need to move to the next penalty level for this queue */
+			while (qe.pr && ((time(NULL) - qe.start) > qe.pr->time)) {
+				update_qe_rule(&qe);
+			}
+
 			/* Try calling all queue members for 'timeout' seconds */
 			res = try_calling(&qe, args.options, args.announceoverride, args.url, &tries, &noption, args.agi, args.macro, args.gosub, ringing);
 			if (res) {
@@ -4315,11 +4320,6 @@
 				res = 0;
 				ast_queue_log(qe.parent->name, qe.chan->uniqueid,"NONE", "EXITWITHTIMEOUT", "%d|%d|%ld", qe.pos, qe.opos, (long) time(NULL) - qe.start);
 				break;
-			}
-
-			/* see if we need to move to the next penalty level for this queue */
-			while (qe.pr && ((time(NULL) - qe.start) > qe.pr->time)) {
-				update_qe_rule(&qe);
 			}
 
 			/* If using dynamic realtime members, we should regenerate the member list for this queue */




More information about the asterisk-commits mailing list