gateway: simplify stopping the cleanup timer
authorFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 7 Nov 2012 21:51:08 +0000 (22:51 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 7 Nov 2012 21:51:23 +0000 (22:51 +0100)
To make the code of olsr_delete_gateway_tree_entry consistent with
that of olsr_update_gateway_entry

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
src/gateway.c

index 688d819..e0f3f64 100644 (file)
@@ -431,7 +431,8 @@ static void olsr_delete_gateway_tree_entry(struct gateway_entry * gw, uint8_t pr
 
   if (immediate && gw->cleanup_timer) {
     /* stop timer if we have to remove immediately */
-    olsr_set_timer(&gw->cleanup_timer, 0, 0, false, NULL, NULL, NULL);
+    olsr_stop_timer(gw->cleanup_timer);
+    gw->cleanup_timer = NULL;
   }
 
   if (gw->cleanup_timer == NULL || gw->ipv4 || gw->ipv6) {