diff options
-rw-r--r-- | usr.sbin/smtpd/smtpd.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/usr.sbin/smtpd/smtpd.c b/usr.sbin/smtpd/smtpd.c index 8505b5e13f0..7fbbe7045fe 100644 --- a/usr.sbin/smtpd/smtpd.c +++ b/usr.sbin/smtpd/smtpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.c,v 1.155 2012/07/09 17:57:54 gilles Exp $ */ +/* $OpenBSD: smtpd.c,v 1.156 2012/08/08 17:28:36 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -1159,11 +1159,19 @@ SPLAY_GENERATE(childtree, child, entry, child_cmp); void log_imsg(int to, int from, struct imsg *imsg) { - log_trace(TRACE_IMSG, "imsg: %s <- %s: %s (len=%zu)", - proc_to_str(to), - proc_to_str(from), - imsg_to_str(imsg->hdr.type), - imsg->hdr.len - IMSG_HEADER_SIZE); + if (imsg->fd != -1) + log_trace(TRACE_IMSG, "imsg: %s <- %s: %s (len=%zu, fd=%i)", + proc_to_str(to), + proc_to_str(from), + imsg_to_str(imsg->hdr.type), + imsg->hdr.len - IMSG_HEADER_SIZE, + imsg->fd); + else + log_trace(TRACE_IMSG, "imsg: %s <- %s: %s (len=%zu)", + proc_to_str(to), + proc_to_str(from), + imsg_to_str(imsg->hdr.type), + imsg->hdr.len - IMSG_HEADER_SIZE); } #define CASE(x) case x : return #x |