From ffb968af6e63c7f5ef4f42bd05f6c37d59a171fd Mon Sep 17 00:00:00 2001 From: krw Date: Mon, 28 Jul 2014 22:18:31 +0000 Subject: [PATCH] Last (known) msgbuf_write() vs EOF fix. ok gilles@ deraadt@ --- usr.sbin/smtpd/enqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/smtpd/enqueue.c b/usr.sbin/smtpd/enqueue.c index 5f04d90a4e5..a6690235980 100644 --- a/usr.sbin/smtpd/enqueue.c +++ b/usr.sbin/smtpd/enqueue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: enqueue.c,v 1.82 2014/07/20 01:38:40 guenther Exp $ */ +/* $OpenBSD: enqueue.c,v 1.83 2014/07/28 22:18:31 krw Exp $ */ /* * Copyright (c) 2005 Henning Brauer @@ -770,7 +770,7 @@ 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) + if (msgbuf_write(&ibuf->w) <= 0 && errno != EAGAIN) err(1, "write error"); while (1) { -- 2.20.1