diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2012-09-11 12:47:37 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2012-09-11 12:47:37 +0000 |
commit | 700cfba0be527d1efcbaaf06a751b22ba45c1d9f (patch) | |
tree | adb960a4935693a0aaf1c3eb327ae65bcf6230b4 /usr.sbin/smtpd/mfa_session.c | |
parent | c126d43f062ab7a152190202aac20e2437d123af (diff) |
log the process name and place when calling fatal().
ok gilles@
Diffstat (limited to 'usr.sbin/smtpd/mfa_session.c')
-rw-r--r-- | usr.sbin/smtpd/mfa_session.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/smtpd/mfa_session.c b/usr.sbin/smtpd/mfa_session.c index a84d58c84d3..986bba6a512 100644 --- a/usr.sbin/smtpd/mfa_session.c +++ b/usr.sbin/smtpd/mfa_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfa_session.c,v 1.8 2012/08/19 14:16:58 chl Exp $ */ +/* $OpenBSD: mfa_session.c,v 1.9 2012/09/11 12:47:36 eric Exp $ */ /* * Copyright (c) 2011 Gilles Chehade <gilles@openbsd.org> @@ -281,7 +281,7 @@ mfa_session_imsg(int fd, short event, void *p) if (event & EV_READ) { n = imsg_read(filter->ibuf); if (n == -1) - fatal("imsg_read"); + fatal("mfa_session_imsg: imsg_read"); if (n == 0) { event_del(&filter->ev); event_loopexit(NULL); @@ -291,7 +291,7 @@ mfa_session_imsg(int fd, short event, void *p) if (event & EV_WRITE) { if (msgbuf_write(&filter->ibuf->w) == -1) - fatal("msgbuf_write"); + fatal("mfa_session_imsg: msgbuf_write"); if (filter->ibuf->w.queued) evflags |= EV_WRITE; } @@ -299,17 +299,17 @@ mfa_session_imsg(int fd, short event, void *p) for (;;) { n = imsg_get(filter->ibuf, &imsg); if (n == -1) - fatalx("imsg_get"); + fatalx("mfa_session_imsg: imsg_get"); if (n == 0) break; if ((imsg.hdr.len - IMSG_HEADER_SIZE) != sizeof(fm)) - fatalx("corrupted imsg"); + fatalx("mfa_session_imsg: corrupted imsg"); memcpy(&fm, imsg.data, sizeof (fm)); if (fm.version != FILTER_API_VERSION) - fatalx("API version mismatch"); + fatalx("mfa_session_imsg: API version mismatch"); switch (imsg.hdr.type) { case FILTER_CONNECT: @@ -333,7 +333,7 @@ mfa_session_imsg(int fd, short event, void *p) mfa_session_pickup(ms); break; default: - fatalx("unsupported imsg"); + fatalx("mfa_session_imsg: unsupported imsg"); } imsg_free(&imsg); } |