]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
If compiled with --enable-debug, don't even try to log to syslog unless
authorMartin Mares <mj@ucw.cz>
Mon, 19 Jun 2000 23:50:02 +0000 (23:50 +0000)
committerMartin Mares <mj@ucw.cz>
Mon, 19 Jun 2000 23:50:02 +0000 (23:50 +0000)
the user forces it in the config file.

TODO
sysdep/unix/log.c
sysdep/unix/main.c
sysdep/unix/unix.h

diff --git a/TODO b/TODO
index a409277eba8dce3894b90022e203d1dc646b3818..f3b1c93afa8b9b08c60ff118feb7fbf0c43df2ef 100644 (file)
--- a/TODO
+++ b/TODO
@@ -4,6 +4,7 @@ Core
 - &&,||: priorities
 - client: `?' in BGP masks
 - filters: function for BGP path length
+- static: allow specifying a per-route filter program for setting route attributes?
 
 Globals
 ~~~~~~~
@@ -21,7 +22,6 @@ Globals
 
 Various ideas
 ~~~~~~~~~~~~~
-- static: allow specifying a per-route filter program for setting route attributes?
 - client: paging of output
 - client: Ctrl-R eats one more enter
 - bgp: timing of updates?
index cc15ff3ea3f612792c018338919499b899a6424a..15f6815ff76a678f09e4ed0838f065721de5f3fc 100644 (file)
@@ -207,10 +207,10 @@ log_init(int debug, int init)
 }
 
 void
-log_switch(list *l)
+log_switch(int debug, list *l)
 {
   if (EMPTY_LIST(*l))
-    log_init(0, 0);
+    log_init(debug, 0);
   else
     current_log_list = l;
 }
index e0e3ca98b468d3b4e90980289a507a44a2d45f2d..2e10521be5c3635cbae974649f209cd949e1a6c5 100644 (file)
  *     Debugging
  */
 
+#ifdef DEBUGGING
+static int debug_flag = 1;
+#else
+static int debug_flag = 0;
+#endif
+
 void
 async_dump(void)
 {
@@ -77,7 +83,7 @@ sysdep_preconfig(struct config *c)
 int
 sysdep_commit(struct config *new, struct config *old)
 {
-  log_switch(&new->logfiles);
+  log_switch(debug_flag, &new->logfiles);
   return 0;
 }
 
@@ -342,12 +348,6 @@ signal_init(void)
 
 static char *opt_list = "c:dD:s:";
 
-#ifdef DEBUGGING
-static int debug_flag = 1;
-#else
-static int debug_flag = 0;
-#endif
-
 static void
 usage(void)
 {
index bb4d063d3b60445cdcd46e05a523304e8028682e..da06345e707b0a7875dba42ed525f90df55d7657 100644 (file)
@@ -55,7 +55,7 @@ void krt_io_init(void);
 
 void log_init(int debug, int init);
 void log_init_debug(char *);           /* Initialize debug dump to given file (NULL=stderr, ""=off) */
-void log_switch(struct list *);
+void log_switch(int debug, struct list *);
 
 struct log_config {
   node n;