[asterisk-commits] russell: branch 1.6.2 r193719 - in /branches/1.6.2: ./ res/res_timing_timerfd.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon May 11 17:12:23 CDT 2009


Author: russell
Date: Mon May 11 17:12:20 2009
New Revision: 193719

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

........
r193718 | russell | 2009-05-11 17:04:40 -0500 (Mon, 11 May 2009) | 12 lines

Fix some timer state corruption.

In res_timer_timerfd, handle the case that set_rate gets called while a timer
is still in continuous mode.  In this case, we want to remember the configured
rate, but not actually set it until continuous mode has been disabled.

Thanks to dvossel for finding and helping to debug the problem.

(closes issue #15080)
Reported by: dvossel
Tested by: dvossel

........

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

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

Modified: branches/1.6.2/res/res_timing_timerfd.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.2/res/res_timing_timerfd.c?view=diff&rev=193719&r1=193718&r2=193719
==============================================================================
--- branches/1.6.2/res/res_timing_timerfd.c (original)
+++ branches/1.6.2/res/res_timing_timerfd.c Mon May 11 17:12:20 2009
@@ -134,7 +134,7 @@
 	struct timerfd_timer *our_timer, find_helper = {
 		.handle = handle,
 	};
-	int res;
+	int res = 0;
 
 	if (!(our_timer = ao2_find(timerfd_timers, &find_helper, OBJ_POINTER))) {
 		ast_log(LOG_ERROR, "Couldn't find timer with handle %d\n", handle);
@@ -146,7 +146,9 @@
 	our_timer->saved_timer.it_interval.tv_sec = our_timer->saved_timer.it_value.tv_sec;
 	our_timer->saved_timer.it_interval.tv_nsec = our_timer->saved_timer.it_value.tv_nsec;
 
-	res = timerfd_settime(handle, 0, &our_timer->saved_timer, NULL);
+	if (!our_timer->is_continuous) {
+		res = timerfd_settime(handle, 0, &our_timer->saved_timer, NULL);
+	}
 
 	ao2_ref(our_timer, -1);
 




More information about the asterisk-commits mailing list