dovecot: If writev() fails for non-file and nothing was sent, re...

dovecot at dovecot.org dovecot at dovecot.org
Sat Dec 29 07:33:13 EET 2007


details:   http://hg.dovecot.org/dovecot/rev/4ff39d30aa4a
changeset: 7061:4ff39d30aa4a
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Dec 29 07:33:09 2007 +0200
description:
If writev() fails for non-file and nothing was sent, return failure instead
of ignoring the error.

diffstat:

1 file changed, 1 insertion(+), 1 deletion(-)
src/lib/ostream-file.c |    2 +-

diffs (12 lines):

diff -r 72122918288c -r 4ff39d30aa4a src/lib/ostream-file.c
--- a/src/lib/ostream-file.c	Sat Dec 29 07:22:38 2007 +0200
+++ b/src/lib/ostream-file.c	Sat Dec 29 07:33:09 2007 +0200
@@ -205,7 +205,7 @@ static ssize_t o_stream_writev(struct fi
 		if (ret > 0) {
 			fstream->real_offset += ret;
 			ret += sent;
-		} else if (!fstream->file) {
+		} else if (!fstream->file && sent > 0) {
 			/* return what we managed to get sent */
 			ret = sent;
 		}


More information about the dovecot-cvs mailing list