changeset 7061:4ff39d30aa4a HEAD

If writev() fails for non-file and nothing was sent, return failure instead of ignoring the error.
author Timo Sirainen <tss@iki.fi>
date Sat, 29 Dec 2007 07:33:09 +0200
parents 72122918288c
children 36402809db43
files src/lib/ostream-file.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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 @@
 		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;
 		}