[dovecot-cvs] dovecot/src/imap imap-fetch-body.c,1.13,1.14

cras at dovecot.org cras at dovecot.org
Wed Oct 20 20:04:29 EEST 2004


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

Modified Files:
	imap-fetch-body.c 
Log Message:
input->eof && o_stream_send_istream() == 0 isn't a correct way to check if all
is sent. Use i_stream_have_bytes_left() instead.



Index: imap-fetch-body.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-fetch-body.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- imap-fetch-body.c	28 Sep 2004 10:55:36 -0000	1.13
+++ imap-fetch-body.c	20 Oct 2004 17:04:27 -0000	1.14
@@ -239,8 +239,8 @@
 		ctx->cur_append_eoh = FALSE;
 	}
 
-	if (ctx->cur_offset != ctx->cur_size && ret == 0 &&
-	    ctx->cur_input->eof) {
+	if (ctx->cur_offset != ctx->cur_size &&
+	    !i_stream_have_bytes_left(ctx->cur_input)) {
 		/* Input stream gave less data than expected */
 		o_stream_close(ctx->client->output);
 		return -1;



More information about the dovecot-cvs mailing list