[asterisk-commits] russell: branch 1.6.2 r198185 - in /branches/1.6.2: ./ res/res_timing_pthread.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri May 29 17:35:17 CDT 2009


Author: russell
Date: Fri May 29 17:35:14 2009
New Revision: 198185

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=198185
Log:
Merged revisions 198183 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r198183 | russell | 2009-05-29 17:33:31 -0500 (Fri, 29 May 2009) | 2 lines
  
  Improve handling of trying to ACK too many timer expirations.
........

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/res/res_timing_pthread.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.2/res/res_timing_pthread.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.2/res/res_timing_pthread.c?view=diff&rev=198185&r1=198184&r2=198185
==============================================================================
--- branches/1.6.2/res/res_timing_pthread.c (original)
+++ branches/1.6.2/res/res_timing_pthread.c Fri May 29 17:35:14 2009
@@ -357,9 +357,21 @@
 static void read_pipe(struct pthread_timer *timer, unsigned int quantity)
 {
 	int rd_fd = timer->pipe[PIPE_READ];
+	int pending_ticks = timer->pending_ticks;
 
 	ast_assert(quantity);
-	ast_assert(quantity >= timer->pending_ticks);
+
+	if (timer->continuous && pending_ticks) {
+		pending_ticks--;
+	}
+
+	if (quantity > pending_ticks) {
+		quantity = pending_ticks;
+	}
+
+	if (!quantity) {
+		return;
+	}
 
 	do {
 		unsigned char buf[1024];




More information about the asterisk-commits mailing list