Fixing timer handling

Usage of more than one timer caused a lock-up.
pull/1/head
Andreas Eversberg 7 years ago
parent 1146537d84
commit 4d84da31a8
  1. 5
      src/common/timer.c

@ -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;
}

Loading…
Cancel
Save