scheduler: do not stop timers that are not running
authorFerry Huberts <ferry.huberts@pelagic.nl>
Mon, 7 Mar 2016 14:19:42 +0000 (15:19 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Mon, 7 Mar 2016 15:33:30 +0000 (16:33 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
src/scheduler.c

index fbcb87b..5079ad4 100644 (file)
@@ -917,7 +917,7 @@ olsr_stop_timer(struct timer_entry *timer)
 {
   /* It's okay to get a NULL here */
   if (!timer //
-      || (timer->timer_flags & OLSR_TIMER_REMOVED)) {
+      || !(timer->timer_flags & OLSR_TIMER_RUNNING)) {
     return;
   }