[asterisk-commits] russell: branch 1.8 r281575 - in /branches/1.8: ./ main/sched.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 10 13:05:11 CDT 2010


Author: russell
Date: Tue Aug 10 13:05:07 2010
New Revision: 281575

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=281575
Log:
Merged revisions 281574 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r281574 | russell | 2010-08-10 13:04:32 -0500 (Tue, 10 Aug 2010) | 9 lines
  
  Don't move the time threshold for running scheduled events on every iteration.
  
  Instead, only calculate the time threshold each time ast_sched_runq() is called.
  
  (closes issue #17742)
  Reported by: schmidts
  Patches:
        sched.c.patch uploaded by schmidts (license 1077)
........

Modified:
    branches/1.8/   (props changed)
    branches/1.8/main/sched.c

Propchange: branches/1.8/
------------------------------------------------------------------------------
--- branch-1.6.2-merged (original)
+++ branch-1.6.2-merged Tue Aug 10 13:05:07 2010
@@ -1,1 +1,1 @@
-/branches/1.6.2:1-279056,279207,279501,279561,279597,279609,279657,279784,279849,279946,280089,280160,280193,280229,280231,280306,280345,280449,280551,280671,280739,280983,281051,281391,281430,281567
+/branches/1.6.2:1-279056,279207,279501,279561,279597,279609,279657,279784,279849,279946,280089,280160,280193,280229,280231,280306,280345,280449,280551,280671,280739,280983,281051,281391,281430,281567,281574

Modified: branches/1.8/main/sched.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/sched.c?view=diff&rev=281575&r1=281574&r2=281575
==============================================================================
--- branches/1.8/main/sched.c (original)
+++ branches/1.8/main/sched.c Tue Aug 10 13:05:07 2010
@@ -604,13 +604,13 @@
 		
 	ast_mutex_lock(&con->lock);
 
+	when = ast_tvadd(ast_tvnow(), ast_tv(0, 1000));
 	for (numevents = 0; (current = ast_heap_peek(con->sched_heap, 1)); numevents++) {
 		/* schedule all events which are going to expire within 1ms.
 		 * We only care about millisecond accuracy anyway, so this will
 		 * help us get more than one event at one time if they are very
 		 * close together.
 		 */
-		when = ast_tvadd(ast_tvnow(), ast_tv(0, 1000));
 		if (ast_tvcmp(current->when, when) != -1) {
 			break;
 		}




More information about the asterisk-commits mailing list