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

cras at procontrol.fi cras at procontrol.fi
Tue Oct 7 00:17:21 EEST 2003


Update of /home/cvs/dovecot/src/imap
In directory danu:/tmp/cvs-serv23780

Modified Files:
	imap-fetch-body-section.c imap-fetch.c 
Log Message:
BODY[HEADER] and RFC822.HEADER fetching was broken (why did it work before?..)



Index: imap-fetch-body-section.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/imap-fetch-body-section.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- imap-fetch-body-section.c	3 Oct 2003 16:18:28 -0000	1.19
+++ imap-fetch-body-section.c	6 Oct 2003 20:17:19 -0000	1.20
@@ -317,7 +317,7 @@
 		if (o_stream_send_str(ctx->output, str) < 0)
 			return FALSE;
 		return message_send(ctx->output, input, size,
-				    body->skip, body->max_size, NULL,
+				    body->skip, send_size, NULL,
 				    !mail->has_no_nuls) >= 0;
 	}
 

Index: imap-fetch.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/imap-fetch.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- imap-fetch.c	21 Sep 2003 16:21:36 -0000	1.13
+++ imap-fetch.c	6 Oct 2003 20:17:19 -0000	1.14
@@ -177,7 +177,8 @@
 		return FALSE;
 
 	return message_send(ctx->output, stream, &body_size,
-			    0, (uoff_t)-1, NULL, !mail->has_no_nuls) >= 0;
+			    0, body_size.virtual_size, NULL,
+			    !mail->has_no_nuls) >= 0;
 }
 
 static int fetch_send_rfc822_header(struct imap_fetch_context *ctx,
@@ -200,7 +201,8 @@
 		return FALSE;
 
 	return message_send(ctx->output, stream, &hdr_size,
-			    0, (uoff_t)-1, NULL, !mail->has_no_nuls) >= 0;
+			    0, hdr_size.virtual_size, NULL,
+			    !mail->has_no_nuls) >= 0;
 }
 
 static int fetch_send_rfc822_text(struct imap_fetch_context *ctx,
@@ -224,7 +226,8 @@
 
 	i_stream_seek(stream, hdr_size.physical_size);
 	return message_send(ctx->output, stream, &body_size,
-			    0, (uoff_t)-1, NULL, !mail->has_no_nuls) >= 0;
+			    0, body_size.virtual_size, NULL,
+			    !mail->has_no_nuls) >= 0;
 }
 
 static int fetch_mail(struct imap_fetch_context *ctx, struct mail *mail)



More information about the dovecot-cvs mailing list