main: stop the heartbeat timer during shutdown
authorFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 11 Nov 2015 09:57:43 +0000 (10:57 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 11 Nov 2015 16:09:28 +0000 (17:09 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
src/main.c

index 430c53d..d4b4a4f 100644 (file)
@@ -645,6 +645,14 @@ static void olsr_shutdown(int signo __attribute__ ((unused)))
   /* remove the lock file */
   olsr_remove_lock_file();
 
+  /* stop heartbeat that is showing on stdout */
+#if !defined WINCE
+  if (heartBeatTimer) {
+    olsr_stop_timer(heartBeatTimer);
+    heartBeatTimer = NULL;
+  }
+#endif /* !defined WINCE */
+
   /* Free cookies and memory pools attached. */
   OLSR_PRINTF(0, "Free all memory...\n");
   olsr_delete_all_cookies();