changeset 2493:9ac27c8f2a72 HEAD

send_istream(): Don't return -1 if input stream just didn't contain anything.
author Timo Sirainen <tss@iki.fi>
date Wed, 25 Aug 2004 11:25:03 +0300
parents 11da9df0890c
children a2e2c76021b9
files src/lib/ostream-crlf.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/ostream-crlf.c	Wed Aug 25 11:16:42 2004 +0300
+++ b/src/lib/ostream-crlf.c	Wed Aug 25 11:25:03 2004 +0300
@@ -336,7 +336,7 @@
 			return sent;
 	}
 
-	return sent == 0 ? -1 : (ssize_t)sent;
+	return sent == 0 && instream->stream_errno != 0 ? -1 : (ssize_t)sent;
 }
 
 static struct crlf_ostream *