changeset 6617:f33be4f9ba4d HEAD

We called parent stream's read() too often, causing early EOFs.
author Timo Sirainen <tss@iki.fi>
date Sat, 27 Oct 2007 18:07:03 +0300
parents be366eda336e
children 39f5251b04f9
files src/lib/istream-crlf.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/istream-crlf.c	Thu Oct 25 21:17:12 2007 +0300
+++ b/src/lib/istream-crlf.c	Sat Oct 27 18:07:03 2007 +0300
@@ -37,7 +37,7 @@
 	ssize_t ret;
 
 	data = i_stream_get_data(cstream->input, &size);
-	if (size <= stream->pos) {
+	if (size == 0) {
 		ret = i_stream_read(cstream->input);
 		if (ret <= 0 && (ret != -2 || stream->skip == 0)) {
 			stream->istream.stream_errno =