[Olsr-dev] [PATCH v1 36/43] main: track the heartbeat timer

Ferry Huberts (spam-protected)
Wed Nov 11 17:22:09 CET 2015


From: Ferry Huberts <(spam-protected)>

So that we can stop it later during shutdown

Signed-off-by: Ferry Huberts <(spam-protected)>
---
 src/main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main.c b/src/main.c
index acbe56b..430c53d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -88,6 +88,8 @@ bool olsr_win32_end_flag = false;
 static void olsr_shutdown(int) __attribute__ ((noreturn));
 #endif /* _WIN32 */
 
+struct timer_entry * heartBeatTimer = NULL;
+
 /*
  * Local function prototypes
  */
@@ -349,7 +351,7 @@ int main(int argc, char *argv[]) {
   /* start heartbeat that is showing on stdout */
 #if !defined WINCE
   if (olsr_cnf->debug_level > 0 && isatty(STDOUT_FILENO)) {
-    olsr_start_timer(STDOUT_PULSE_INT, 0, OLSR_TIMER_PERIODIC, &generate_stdout_pulse, NULL, 0);
+    heartBeatTimer = olsr_start_timer(STDOUT_PULSE_INT, 0, OLSR_TIMER_PERIODIC, &generate_stdout_pulse, NULL, 0);
   }
 #endif /* !defined WINCE */
 
-- 
2.5.0




More information about the Olsr-dev mailing list