[asterisk-commits] russell: branch 1.6.1 r198184 - in /branches/1.6.1: ./ res/res_timing_pthread.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri May 29 17:34:16 CDT 2009
Author: russell
Date: Fri May 29 17:34:12 2009
New Revision: 198184
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=198184
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.1/ (props changed)
branches/1.6.1/res/res_timing_pthread.c
Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.1/res/res_timing_pthread.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.1/res/res_timing_pthread.c?view=diff&rev=198184&r1=198183&r2=198184
==============================================================================
--- branches/1.6.1/res/res_timing_pthread.c (original)
+++ branches/1.6.1/res/res_timing_pthread.c Fri May 29 17:34:12 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