[asterisk-commits] branch 1.2 r28968 - /branches/1.2/apps/app_queue.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri May 19 19:35:54 MST 2006


Author: kpfleming
Date: Fri May 19 21:35:53 2006
New Revision: 28968

URL: http://svn.digium.com/view/asterisk?rev=28968&view=rev
Log:
don't allow queue member devices to ring longer than the total queue timeout (issue #6423, reported and patched by bcnit)

Modified:
    branches/1.2/apps/app_queue.c

Modified: branches/1.2/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/apps/app_queue.c?rev=28968&r1=28967&r2=28968&view=diff
==============================================================================
--- branches/1.2/apps/app_queue.c (original)
+++ branches/1.2/apps/app_queue.c Fri May 19 21:35:53 2006
@@ -2125,10 +2125,10 @@
 
 		cur = cur->next;
 	}
-	if (qe->parent->timeout)
-		to = qe->parent->timeout * 1000;
-	else
-		to = -1;
+ 	if (qe->expire && (!qe->parent->timeout || (qe->expire - now) <= qe->parent->timeout))
+ 		to = (qe->expire - now) * 1000;
+ 	else
+ 		to = (qe->parent->timeout) ? qe->parent->timeout * 1000 : -1;
 	ring_one(qe, outgoing, &numbusies);
 	ast_mutex_unlock(&qe->parent->lock);
 	if (use_weight) 



More information about the asterisk-commits mailing list