summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2011-08-20 19:02:29 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2011-08-20 19:02:29 +0000
commitabb7f3e568a613a7d6daf6af3556386e08bfee52 (patch)
treee138e84c6cdd55dfd8570964868e01deff349f80 /usr.sbin/bgpd
parent564f667f41c7007f68568b2bbaabd0b6204a0055 (diff)
Decouple log_verbose() from log_init() so the verbose flag stays set with
"-v" (previously only "-vd" worked). Similar to recent ospfd commit. ok claudio@
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/bgpd.c4
-rw-r--r--usr.sbin/bgpd/log.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/bgpd.c b/usr.sbin/bgpd/bgpd.c
index 7a177fab6a2..cc860449726 100644
--- a/usr.sbin/bgpd/bgpd.c
+++ b/usr.sbin/bgpd/bgpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpd.c,v 1.167 2011/05/01 10:42:28 claudio Exp $ */
+/* $OpenBSD: bgpd.c,v 1.168 2011/08/20 19:02:28 sthen Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -118,6 +118,7 @@ main(int argc, char *argv[])
bgpd_process = PROC_MAIN;
log_init(1); /* log to stderr until daemonized */
+ log_verbose(1);
bzero(&conf, sizeof(conf));
LIST_INIT(&mrt_l);
@@ -183,6 +184,7 @@ main(int argc, char *argv[])
errx(1, "unknown user %s", BGPD_USER);
log_init(debug);
+ log_verbose(conf.opts & BGPD_OPT_VERBOSE);
if (!debug)
daemon(1, 0);
diff --git a/usr.sbin/bgpd/log.c b/usr.sbin/bgpd/log.c
index 5c2d6909039..6405fd5791c 100644
--- a/usr.sbin/bgpd/log.c
+++ b/usr.sbin/bgpd/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.54 2010/11/18 12:51:24 claudio Exp $ */
+/* $OpenBSD: log.c,v 1.55 2011/08/20 19:02:28 sthen Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -71,7 +71,6 @@ log_init(int n_debug)
extern char *__progname;
debug = n_debug;
- verbose = n_debug;
if (!debug)
openlog(__progname, LOG_PID | LOG_NDELAY, LOG_DAEMON);