From 463bd434e101b70cefa2de084248399c49d427ec Mon Sep 17 00:00:00 2001 From: Mark Michelson Date: Fri, 16 Jan 2009 19:57:14 +0000 Subject: [PATCH] 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 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@168899 65c4cc65-6c06-0410-ace0-fbb531ad65f3