summaryrefslogtreecommitdiffstats
path: root/sysdep
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-06-20 01:50:02 +0200
committerMartin Mares <mj@ucw.cz>2000-06-20 01:50:02 +0200
commitf9eb8f7e066970d56a814128fd49170348a7fbd8 (patch)
tree110909a619a49857f1a9aa6d76ee89d867263e9b /sysdep
parent972fdb45323b75af254cfe6c912c52d3596a230a (diff)
downloadbird-f9eb8f7e066970d56a814128fd49170348a7fbd8.tar
bird-f9eb8f7e066970d56a814128fd49170348a7fbd8.zip
If compiled with --enable-debug, don't even try to log to syslog unless
the user forces it in the config file.
Diffstat (limited to 'sysdep')
-rw-r--r--sysdep/unix/log.c4
-rw-r--r--sysdep/unix/main.c14
-rw-r--r--sysdep/unix/unix.h2
3 files changed, 10 insertions, 10 deletions
diff --git a/sysdep/unix/log.c b/sysdep/unix/log.c
index cc15ff3..15f6815 100644
--- a/sysdep/unix/log.c
+++ b/sysdep/unix/log.c
@@ -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;
}
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c
index e0e3ca9..2e10521 100644
--- a/sysdep/unix/main.c
+++ b/sysdep/unix/main.c
@@ -35,6 +35,12 @@
* 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)
{
diff --git a/sysdep/unix/unix.h b/sysdep/unix/unix.h
index bb4d063..da06345 100644
--- a/sysdep/unix/unix.h
+++ b/sysdep/unix/unix.h
@@ -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;