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

dovecot at dovecot.org dovecot at dovecot.org
Fri Jul 30 20:02:22 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/b43c8d765d44
changeset: 11907:b43c8d765d44
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 02c9154efe81 -r b43c8d765d44 src/lib-storage/index/mbox/mbox-save.c
--- a/src/lib-storage/index/mbox/mbox-save.c	Fri Jul 30 16:17:02 2010 +0100
+++ b/src/lib-storage/index/mbox/mbox-save.c	Fri Jul 30 16:55:58 2010 +0100
@@ -405,9 +405,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;
 	}
@@ -540,10 +541,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;
@@ -595,8 +596,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++) {
@@ -685,8 +686,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