Disable forking if legacy debug level is used with parameter > 0
authorHenning Rogge <hrogge@googlemail.com>
Sun, 22 Mar 2009 11:24:10 +0000 (12:24 +0100)
committerHenning Rogge <hrogge@googlemail.com>
Sun, 22 Mar 2009 11:24:10 +0000 (12:24 +0100)
src/olsr_cfg.c

index 82f4aa0..73b5b8b 100644 (file)
@@ -772,6 +772,10 @@ parse_cfg_debug(char *argstr, struct olsr_config *rcfg, char *rmsg)
 
   PARSER_DEBUG_PRINTF("Debug level: %d\n", dlevel);
 
+  if (dlevel > 0) {
+    rcfg->no_fork = 1;
+  }
+
   /* prevent fallback to default 0 */
   cfg_has_log[SEVERITY_ERR] = true;
   return CFG_OK;