dovecot-1.2: mbox: Fields weren't being added to cache file duri...

dovecot at dovecot.org dovecot at dovecot.org
Fri Jul 30 18:56:14 EEST 2010


details:   http://hg.dovecot.org/dovecot-1.2/rev/166a188f9165
changeset: 9595:166a188f9165
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Jul 30 16:55:58 2010 +0100
description:
mbox: Fields weren't being added to cache file during message saving.

diffstat:

 src/lib-storage/index/mbox/mbox-save.c |  18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diffs (52 lines):

diff -r c275504993c6 -r 166a188f9165 src/lib-storage/index/mbox/mbox-save.c
--- a/src/lib-storage/index/mbox/mbox-save.c	Fri Jul 23 21:56:54 2010 +0100
+++ b/src/lib-storage/index/mbox/mbox-save.c	Fri Jul 30 16:55:58 2010 +0100
@@ -403,9 +403,10 @@
 		i_stream_create_crlf(filter) : i_stream_create_lf(filter);
 	i_stream_unref(&filter);
 
-	if (ctx->mail != NULL) {
+	if (ctx->ctx.dest_mail != NULL) {
 		/* caching creates a tee stream */
-		cache_input = index_mail_cache_parse_init(ctx->mail, ret);
+		cache_input =
+			index_mail_cache_parse_init(ctx->ctx.dest_mail, ret);
 		i_stream_unref(&ret);
 		ret = cache_input;
 	}
@@ -529,10 +530,10 @@
 	ssize_t ret;
 
 	while ((ret = i_stream_read(ctx->input)) != -1) {
-		if (ctx->mail != NULL) {
+		if (ctx->ctx.dest_mail != NULL) {
 			/* i_stream_read() may have returned 0 at EOF
 			   because of this parser */
-			index_mail_cache_parse_continue(ctx->mail);
+			index_mail_cache_parse_continue(ctx->ctx.dest_mail);
 		}
 		if (ret == 0)
 			return 0;
@@ -585,8 +586,8 @@
 	}
 
 	while ((ret = i_stream_read(ctx->input)) > 0) {
-		if (ctx->mail != NULL)
-			index_mail_cache_parse_continue(ctx->mail);
+		if (ctx->ctx.dest_mail != NULL)
+			index_mail_cache_parse_continue(ctx->ctx.dest_mail);
 
 		data = i_stream_get_data(ctx->input, &size);
 		for (i = 0; i < size; i++) {
@@ -675,8 +676,9 @@
 		} T_END;
 	}
 
-	if (ctx->mail != NULL) {
-		index_mail_cache_parse_deinit(ctx->mail, ctx->ctx.received_date,
+	if (ctx->ctx.dest_mail != NULL) {
+		index_mail_cache_parse_deinit(ctx->ctx.dest_mail,
+					      ctx->ctx.received_date,
 					      !ctx->failed);
 	}
 	if (ctx->input != NULL)


More information about the dovecot-cvs mailing list