Fixing timer handling

Usage of more than one timer caused a lock-up.
This commit is contained in:
Andreas Eversberg 2016-03-26 07:36:38 +01:00
parent 1146537d84
commit 4d84da31a8
1 changed files with 3 additions and 2 deletions

View File

@ -57,8 +57,9 @@ void timer_exit(struct timer *timer)
timer_tail_p = &timer_head;
while (*timer_tail_p) {
if (timer == *timer_tail_p)
*timer_tail_p = timer->next;
timer_tail_p = &timer->next;
*timer_tail_p = (*timer_tail_p)->next;
else
timer_tail_p = &((*timer_tail_p)->next);
}
timer->linked = 0;
}