aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2016-03-26 07:36:38 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2016-03-27 17:56:04 +0200
commit4d84da31a8b15085729a8cf0f7f8197a072eda5a (patch)
treec3d5c619ac5e8d71fe71e2054b38812c4bc2e7f1 /src/common
parent1146537d849c30aa20a4cb742cdd18654f041a8d (diff)
Fixing timer handling
Usage of more than one timer caused a lock-up.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/timer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/common/timer.c b/src/common/timer.c
index af5db91..4b07d13 100644
--- a/src/common/timer.c
+++ b/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;
}