[Olsr-dev] [PATCH v1 30/43] main: initialise IPC a bit earlier

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


From: Ferry Huberts <(spam-protected)>

Signed-off-by: Ferry Huberts <(spam-protected)>
---
 src/main.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/main.c b/src/main.c
index a3e2d9a..839da38 100644
--- a/src/main.c
+++ b/src/main.c
@@ -334,24 +334,25 @@ int main(int argc, char *argv[]) {
   }
 #endif /* __linux__ */
 
-  olsr_do_startup_sleep();
-
-  /* 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);
-  }
-#endif /* !defined WINCE */
-
   /* initialise the IPC socket */
   if (olsr_cnf->ipc_connections > 0) {
     if (ipc_init()) {
       olsr_exit("ipc_init failure", 1);
     }
   }
+
   /* Initialisation of different tables to be used. */
   olsr_init_tables();
 
+  olsr_do_startup_sleep();
+
+  /* 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);
+  }
+#endif /* !defined WINCE */
+
   /* daemon mode */
 #ifndef _WIN32
   if (olsr_cnf->debug_level == 0 && !olsr_cnf->no_fork) {
-- 
2.5.0




More information about the Olsr-dev mailing list