From: gilles Date: Wed, 14 Oct 2015 21:18:19 +0000 (+0000) Subject: whitespace + only log TRACE_MPROC if not IMSG_STAT_{IN,DE}CREMENT X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a6d7bf9fea218b4430dc5e4a7b5cb516c0c2e7e5;p=openbsd whitespace + only log TRACE_MPROC if not IMSG_STAT_{IN,DE}CREMENT --- diff --git a/usr.sbin/smtpd/mproc.c b/usr.sbin/smtpd/mproc.c index c2620b8f8a0..119c7c8f33a 100644 --- a/usr.sbin/smtpd/mproc.c +++ b/usr.sbin/smtpd/mproc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mproc.c,v 1.13 2015/10/02 00:32:05 gilles Exp $ */ +/* $OpenBSD: mproc.c,v 1.14 2015/10/14 21:18:19 gilles Exp $ */ /* * Copyright (c) 2012 Eric Faurot @@ -319,7 +319,9 @@ m_forward(struct mproc *p, struct imsg *imsg) imsg->hdr.pid, imsg->fd, imsg->data, imsg->hdr.len - sizeof(imsg->hdr)); - log_trace(TRACE_MPROC, "mproc: %s -> %s : %zu %s (forward)", + if (imsg->hdr.type != IMSG_STAT_DECREMENT && + imsg->hdr.type != IMSG_STAT_INCREMENT) + log_trace(TRACE_MPROC, "mproc: %s -> %s : %zu %s (forward)", proc_name(smtpd_process), proc_name(p->proc), imsg->hdr.len - sizeof(imsg->hdr), @@ -339,7 +341,9 @@ m_compose(struct mproc *p, uint32_t type, uint32_t peerid, pid_t pid, int fd, { imsg_compose(&p->imsgbuf, type, peerid, pid, fd, data, len); - log_trace(TRACE_MPROC, "mproc: %s -> %s : %zu %s", + if (type != IMSG_STAT_DECREMENT && + type != IMSG_STAT_INCREMENT) + log_trace(TRACE_MPROC, "mproc: %s -> %s : %zu %s", proc_name(smtpd_process), proc_name(p->proc), len, @@ -371,7 +375,9 @@ m_composev(struct mproc *p, uint32_t type, uint32_t peerid, pid_t pid, if (p->bytes_queued > p->bytes_queued_max) p->bytes_queued_max = p->bytes_queued; - log_trace(TRACE_MPROC, "mproc: %s -> %s : %zu %s", + if (type != IMSG_STAT_DECREMENT && + type != IMSG_STAT_INCREMENT) + log_trace(TRACE_MPROC, "mproc: %s -> %s : %zu %s", proc_name(smtpd_process), proc_name(p->proc), len, @@ -385,7 +391,7 @@ m_create(struct mproc *p, uint32_t type, uint32_t peerid, pid_t pid, int fd) { if (p->m_buf == NULL) { p->m_alloc = 128; - log_trace(TRACE_MPROC, "mproc: %s -> %s: allocating %zu", + log_trace(TRACE_MPROC, "mproc: %s -> %s: allocating %zu", proc_name(smtpd_process), proc_name(p->proc), p->m_alloc); @@ -711,7 +717,7 @@ m_get_string(struct msg *m, const char **s) end = memchr(m->pos + 1, 0, m->end - (m->pos + 1)); if (end == NULL) m_error("unterminated string"); - + *s = m->pos + 1; m->pos = end + 1; }