dde_kit: Allow re-scheduling from timer handler

Prior this change, the attempt to re-schedule a timer from its timer
handler resulted in a clear '_pending' flag. This caused the timer event
to disappear from the scheduling queue without the handler being called
ever again. By resetting the '_pending' value before calling the hander,
we prevent a re-scheduled '_pending' flag to be cleared immediately
after calling the handler.
This commit is contained in:
Norman Feske 2013-09-13 21:43:47 +02:00
parent 0f663991c1
commit 31d2730c9a

View File

@ -138,8 +138,8 @@ class dde_kit_timer : public Alarm, public List<dde_kit_timer>::Element
{
/* if timer is really pending, call registered handler function */
if (_pending) {
_handler(_priv);
_pending = false;
_handler(_priv);
}
/* do not schedule again */