-/* $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 <eric@faurot.net>
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),
{
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,
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,
{
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);
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;
}