summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/lka.c
diff options
context:
space:
mode:
authorCharles Longeau <chl@cvs.openbsd.org>2010-01-03 14:37:38 +0000
committerCharles Longeau <chl@cvs.openbsd.org>2010-01-03 14:37:38 +0000
commit49a2ec610563c287ce3aee467f1057ea37d8e1ec (patch)
treeb2096f71417364dc7a5cb8bdfc55bf7d8af40249 /usr.sbin/smtpd/lka.c
parentd86ff53c2f6693c7445399488d519aa1120d2ee9 (diff)
Implement "log verbose" and "log brief" to enable or disable verbose debug
logging on runtime. Based on claudio@'s work on ripd, ospfd, ospf6d, dvmrpd, ldpd, bgpd. With help/ideas/testing from gilles@ jacekm@ todd@ ok jacekm@
Diffstat (limited to 'usr.sbin/smtpd/lka.c')
-rw-r--r--usr.sbin/smtpd/lka.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/lka.c b/usr.sbin/smtpd/lka.c
index 3ea8d76a049..a50ae6c829b 100644
--- a/usr.sbin/smtpd/lka.c
+++ b/usr.sbin/smtpd/lka.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lka.c,v 1.97 2009/12/15 00:23:38 jacekm Exp $ */
+/* $OpenBSD: lka.c,v 1.98 2010/01/03 14:37:37 chl Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -258,6 +258,15 @@ lka_dispatch_parent(int sig, short event, void *p)
lka_expand_pickup(env, lkasession);
break;
}
+ case IMSG_CTL_VERBOSE: {
+ int verbose;
+
+ IMSG_SIZE_CHECK(&verbose);
+
+ memcpy(&verbose, imsg.data, sizeof(verbose));
+ log_verbose(verbose);
+ break;
+ }
default:
log_warnx("lka_dispatch_parent: got imsg %d",
imsg.hdr.type);