diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/timer.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/timer.c b/src/timer.c index 77fb0039..79d4ad6d 100644 --- a/src/timer.c +++ b/src/timer.c @@ -69,12 +69,9 @@ static void __add_timer(struct osmo_timer_list *timer) */ void osmo_timer_add(struct osmo_timer_list *timer) { - if (timer->active) { - rb_erase(&timer->node, &timer_root); - } else { - timer->active = 1; - INIT_LLIST_HEAD(&timer->list); - } + osmo_timer_del(timer); + timer->active = 1; + INIT_LLIST_HEAD(&timer->list); __add_timer(timer); } |