summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/mproc.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2024-11-21 13:16:08 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2024-11-21 13:16:08 +0000
commit9c8d00dd06d79ba9fccf07c45cd1bdae73e744c5 (patch)
tree9dbbc9d2f725d8ee1474850be3abaff593b88fe4 /usr.sbin/smtpd/mproc.c
parent2e2a93ef22aa29ad33b76ca24ca1ffc708c7d123 (diff)
Convert imsg_write() callers to the new simplified return logic.
OK tb@
Diffstat (limited to 'usr.sbin/smtpd/mproc.c')
-rw-r--r--usr.sbin/smtpd/mproc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/mproc.c b/usr.sbin/smtpd/mproc.c
index 9b970ce1f81..3f61f7b1aae 100644
--- a/usr.sbin/smtpd/mproc.c
+++ b/usr.sbin/smtpd/mproc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mproc.c,v 1.41 2024/11/21 13:10:51 claudio Exp $ */
+/* $OpenBSD: mproc.c,v 1.42 2024/11/21 13:16:07 claudio Exp $ */
/*
* Copyright (c) 2012 Eric Faurot <eric@faurot.net>
@@ -164,8 +164,7 @@ mproc_dispatch(int fd, short event, void *arg)
}
if (event & EV_WRITE) {
- n = imsg_write(&p->imsgbuf);
- if (n == 0 || (n == -1 && errno != EAGAIN)) {
+ if (imsg_write(&p->imsgbuf) == -1) {
/* this pipe is dead, so remove the event handler */
log_debug("debug: %s -> %s: pipe closed",
proc_name(smtpd_process), p->name);