[dovecot-cvs] dovecot/src/lib istream-limit.c,1.13,1.14

cras at dovecot.org cras at dovecot.org
Fri Jun 10 01:29:50 EEST 2005


Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv11609

Modified Files:
	istream-limit.c 
Log Message:
Set stream->eof immediately after we have read up to our limit.



Index: istream-limit.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/istream-limit.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- istream-limit.c	29 Mar 2005 10:28:06 -0000	1.13
+++ istream-limit.c	9 Jun 2005 22:29:48 -0000	1.14
@@ -68,8 +68,10 @@
 
 	if (lstream->v_size != (uoff_t)-1) {
 		left = lstream->v_size - stream->istream.v_offset;
-		if (pos > left)
+		if (pos >= left) {
 			pos = left;
+			stream->istream.eof = TRUE;
+		}
 	}
 
 	ret = pos > stream->pos ? (ssize_t)(pos - stream->pos) :



More information about the dovecot-cvs mailing list