changeset 4527:4c2155f3d72b HEAD

We wrote mail bodies through raw output stream, instead of the one that made sure that CR+LF linefeeds were as configured.
author Timo Sirainen <tss@iki.fi>
date Wed, 02 Aug 2006 03:16:18 +0300
parents 38f9daea3279
children 74212d11b6b5
files src/lib-storage/index/mbox/mbox-save.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-save.c	Mon Jul 31 03:45:11 2006 +0300
+++ b/src/lib-storage/index/mbox/mbox-save.c	Wed Aug 02 03:16:18 2006 +0300
@@ -460,8 +460,9 @@
 				return 0;
 
 			data = i_stream_get_data(ctx->input, &size);
-			if (o_stream_send(ctx->output, data, size) < 0) {
-				write_error(ctx, ctx->output->stream_errno);
+			if (o_stream_send(ctx->body_output, data, size) < 0) {
+				write_error(ctx,
+					    ctx->body_output->stream_errno);
 				return -1;
 			}
 			ctx->last_char = data[size-1];
@@ -473,8 +474,9 @@
 			   otherwise some mbox parsers don't like the result.
 			   this makes it impossible to save a mail that doesn't
 			   end with LF though. */
-			if (o_stream_send(ctx->output, "\n", 1) < 0) {
-				write_error(ctx, ctx->output->stream_errno);
+			if (o_stream_send(ctx->body_output, "\n", 1) < 0) {
+				write_error(ctx,
+					    ctx->body_output->stream_errno);
 				return -1;
 			}
 		}