forked from cellular-infrastructure/osmocom-analog
Fixing timer handling
Usage of more than one timer caused a lock-up.
This commit is contained in:
parent
1146537d84
commit
4d84da31a8
|
@ -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…
Reference in New Issue