[asterisk-commits] mmichelson: branch 1.6.1 r168899 - /branches/1.6.1/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jan 16 13:57:14 CST 2009


Author: mmichelson
Date: Fri Jan 16 13:57:14 2009
New Revision: 168899

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=168899
Log:
Blocked revisions 168898 via svnmerge

........
r168898 | mmichelson | 2009-01-16 13:54:39 -0600 (Fri, 16 Jan 2009) | 26 lines

Fix a logic error that occur when using the timerfd interface

This sequence of events posed a problem

timerfd_timer_open
timerfd_timer_enable_continuous
timerfd_timer_set_rate
timerfd_timer_disable_continuous

The reason was that the timing module was written under the assumption
that timerfd_timer_set_rate would not be called between enabling and
disabling continuous mode. What happened in this situation was that 
timerfd_timer_enable_continuous saved off our previously set timer (in this
situation a 0 timer, meaning it never runs out). Then timerfd_timer_disable_continuous
would restore this 0 timer, even though it logically should set the timer to be whatever
was set in timerfd_timer_set_rate.

Now the behavior in timerfd_timer_set_rate is to overwrite the saved timer that may
or may not have been set in timerfd_timer_enable_continuous. Even if
timerfd_timer_enable_continuous has not been previously called, this will not harm the
operation.

Thanks to Terry Wilson for discovering the problem and giving me a really great debug
capture that pointed out the problem clearly


........

Modified:
    branches/1.6.1/   (props changed)

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-blocked' - no diff available.




More information about the asterisk-commits mailing list