[dovecot-cvs] dovecot/src/lib ostream-file.c,1.34,1.35

cras at dovecot.org cras at dovecot.org
Thu Sep 16 17:59:32 EEST 2004


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

Modified Files:
	ostream-file.c 
Log Message:
o_stream_send_istream() was buggy if input stream's offset wasn't 0 or if
sendfile() couldn't be used. Fixes problems with sending large mails.



Index: ostream-file.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/ostream-file.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- ostream-file.c	4 Sep 2004 09:09:27 -0000	1.34
+++ ostream-file.c	16 Sep 2004 14:59:29 -0000	1.35
@@ -512,7 +512,8 @@
 	for (pos = 0; pos < iov_len; pos++)
 		skip_size += iov[pos].iov_len;
 
-        start_offset = instream->v_offset;
+	start_offset = instream->v_offset;
+	in_size -= instream->v_offset;
 	while (in_size > 0) {
 		block_size = I_MIN(foutstream->optimal_block_size, in_size);
 		(void)i_stream_read_data(instream, &data, &size, block_size-1);



More information about the dovecot-cvs mailing list