dovecot-2.2: mbox: Fixed committing transaction after a previous...

dovecot at dovecot.org dovecot at dovecot.org
Wed May 15 17:18:34 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/1d6f42853492
changeset: 16367:1d6f42853492
user:      Timo Sirainen <tss at iki.fi>
date:      Wed May 15 17:18:29 2013 +0300
description:
mbox: Fixed committing transaction after a previous save had failed.

diffstat:

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

diffs (17 lines):

diff -r 02f2ed55d568 -r 1d6f42853492 src/lib-storage/index/mbox/mbox-save.c
--- a/src/lib-storage/index/mbox/mbox-save.c	Wed May 15 17:10:28 2013 +0300
+++ b/src/lib-storage/index/mbox/mbox-save.c	Wed May 15 17:18:29 2013 +0300
@@ -715,6 +715,13 @@
 		ctx->mail_offset = (uoff_t)-1;
 	}
 
+	if (ctx->seq != 0) {
+		mail_index_expunge(ctx->trans, ctx->seq);
+		/* currently we can't just drop pending cache updates for this
+		   one specific record, so we'll reset the whole cache
+		   transaction. */
+		mail_cache_transaction_reset(ctx->ctx.transaction->cache_trans);
+	}
 	index_save_context_free(_ctx);
 	return ctx->failed ? -1 : 0;
 }


More information about the dovecot-cvs mailing list