summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreric <eric@openbsd.org>2014-04-09 19:12:45 +0000
committereric <eric@openbsd.org>2014-04-09 19:12:45 +0000
commitcbc009c17d8f831f64976b1a83c69a917f102afb (patch)
tree7656f39a6c5433831182511572c64291926a0e31
parentZap the mfa process. It is not currently doing anything, and content filtering (diff)
downloadwireguard-openbsd-cbc009c17d8f831f64976b1a83c69a917f102afb.tar.xz
wireguard-openbsd-cbc009c17d8f831f64976b1a83c69a917f102afb.zip
display correct imsg when profiling is on and if the type was changed
-rw-r--r--usr.sbin/smtpd/smtpd.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/smtpd/smtpd.c b/usr.sbin/smtpd/smtpd.c
index 05d9d6d90a6..8f4cac753c0 100644
--- a/usr.sbin/smtpd/smtpd.c
+++ b/usr.sbin/smtpd/smtpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.c,v 1.219 2014/04/09 18:55:19 eric Exp $ */
+/* $OpenBSD: smtpd.c,v 1.220 2014/04/09 19:12:45 eric Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -1125,7 +1125,8 @@ parent_forward_open(char *username, char *directory, uid_t uid, gid_t gid)
void
imsg_dispatch(struct mproc *p, struct imsg *imsg)
{
- struct timespec t0, t1, dt;
+ struct timespec t0, t1, dt;
+ int msg;
if (imsg == NULL) {
exit(1);
@@ -1137,6 +1138,7 @@ imsg_dispatch(struct mproc *p, struct imsg *imsg)
if (profiling & PROFILE_IMSG)
clock_gettime(CLOCK_MONOTONIC, &t0);
+ msg = imsg->hdr.type;
imsg_callback(p, imsg);
if (profiling & PROFILE_IMSG) {
@@ -1146,7 +1148,7 @@ imsg_dispatch(struct mproc *p, struct imsg *imsg)
log_debug("profile-imsg: %s %s %s %d %lld.%06ld",
proc_name(smtpd_process),
proc_name(p->proc),
- imsg_to_str(imsg->hdr.type),
+ imsg_to_str(msg),
(int)imsg->hdr.len,
(long long)dt.tv_sec * 1000000 + dt.tv_nsec / 1000000,
dt.tv_nsec % 1000000);
@@ -1161,7 +1163,7 @@ imsg_dispatch(struct mproc *p, struct imsg *imsg)
"profiling.imsg.%s.%s.%s",
proc_name(smtpd_process),
proc_name(p->proc),
- imsg_to_str(imsg->hdr.type)))
+ imsg_to_str(msg)))
return;
stat_set(key, stat_timespec(&dt));
}