diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-11-21 13:09:07 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-11-21 13:09:07 +0000 |
commit | a423251e6ce072befee8d8b94b6a46d5438768d3 (patch) | |
tree | 90355c86d050d127888df097c088f45eb7c9edd4 /usr.sbin/smtpd | |
parent | 5eeda5072225febdb498941a3e2bdcda5694cb64 (diff) |
Use imsg_flush() instead of implementing the same by hand.
OK tb@
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r-- | usr.sbin/smtpd/enqueue.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/smtpd/enqueue.c b/usr.sbin/smtpd/enqueue.c index 51616d0d590..d15838d2e62 100644 --- a/usr.sbin/smtpd/enqueue.c +++ b/usr.sbin/smtpd/enqueue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: enqueue.c,v 1.122 2024/01/20 09:01:03 claudio Exp $ */ +/* $OpenBSD: enqueue.c,v 1.123 2024/11/21 13:09:04 claudio Exp $ */ /* * Copyright (c) 2005 Henning Brauer <henning@bulabula.org> @@ -784,9 +784,8 @@ open_connection(void) imsg_compose(ibuf, IMSG_CTL_SMTP_SESSION, IMSG_VERSION, 0, -1, NULL, 0); - while (ibuf->w.queued) - if (msgbuf_write(&ibuf->w) <= 0 && errno != EAGAIN) - err(1, "write error"); + if (imsg_flush(ibuf) == -1) + err(1, "write error"); while (1) { if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN) |