diff options
author | Charles Longeau <chl@cvs.openbsd.org> | 2010-01-03 14:37:38 +0000 |
---|---|---|
committer | Charles Longeau <chl@cvs.openbsd.org> | 2010-01-03 14:37:38 +0000 |
commit | 49a2ec610563c287ce3aee467f1057ea37d8e1ec (patch) | |
tree | b2096f71417364dc7a5cb8bdfc55bf7d8af40249 /usr.sbin/smtpd/lka.c | |
parent | d86ff53c2f6693c7445399488d519aa1120d2ee9 (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.c | 11 |
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); |