Fixed:Can't register the same timer again at timeout handle function

This commit is contained in:
chencn
2016-03-23 10:20:32 +08:00
parent e99d05582f
commit 9afe5d329c

View File

@@ -488,6 +488,7 @@ static void atomTimerCallbacks (void)
next_ptr = callback_list_head;
while (next_ptr)
{
saved_next_ptr = next_ptr->next_timer;
/* Call the registered callback */
if (next_ptr->cb_func)
{
@@ -495,7 +496,7 @@ static void atomTimerCallbacks (void)
}
/* Move on to the next callback in the list */
next_ptr = next_ptr->next_timer;
next_ptr = saved_next_ptr;
}
}