changeset 2457:5506d4cd4973 HEAD

Buffer wasn't set if _read() returned -2.
author Timo Sirainen <tss@iki.fi>
date Sun, 22 Aug 2004 14:08:58 +0300
parents f32419d92307
children 346fe259a18c
files src/lib-storage/index/mbox/istream-raw-mbox.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/istream-raw-mbox.c	Sun Aug 22 14:04:31 2004 +0300
+++ b/src/lib-storage/index/mbox/istream-raw-mbox.c	Sun Aug 22 14:08:58 2004 +0300
@@ -150,8 +150,10 @@
 	if (ret < 0) {
 		if (ret == -2) {
 			if (stream->istream.v_offset + pos ==
-			    rstream->input_peak_offset)
+			    rstream->input_peak_offset) {
+				stream->buffer = buf;
 				return -2;
+			}
 		} else {
 			/* we've read the whole file, final byte should be
 			   the \n trailer */