dovecot-2.2: lib-storage: Reset saving/moving/copying_via_save f...

dovecot at dovecot.org dovecot at dovecot.org
Wed Feb 20 15:53:24 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/7df4ca451d2e
changeset: 15858:7df4ca451d2e
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Feb 20 15:40:16 2013 +0200
description:
lib-storage: Reset saving/moving/copying_via_save flag between mail_save_context uses.

diffstat:

 src/lib-storage/index/index-storage.c |  4 ++++
 src/lib-storage/mail-storage.c        |  3 ++-
 2 files changed, 6 insertions(+), 1 deletions(-)

diffs (32 lines):

diff -r 07dfd4391d22 -r 7df4ca451d2e src/lib-storage/index/index-storage.c
--- a/src/lib-storage/index/index-storage.c	Wed Feb 20 12:24:36 2013 +0200
+++ b/src/lib-storage/index/index-storage.c	Wed Feb 20 15:40:16 2013 +0200
@@ -754,7 +754,11 @@
 	i_free_and_null(ctx->data.pop3_uidl);
 	index_attachment_save_free(ctx);
 	memset(&ctx->data, 0, sizeof(ctx->data));
+
 	ctx->unfinished = FALSE;
+	ctx->copying_via_save = FALSE;
+	ctx->saving = FALSE;
+	ctx->moving = FALSE;
 }
 
 static void
diff -r 07dfd4391d22 -r 7df4ca451d2e src/lib-storage/mail-storage.c
--- a/src/lib-storage/mail-storage.c	Wed Feb 20 12:24:36 2013 +0200
+++ b/src/lib-storage/mail-storage.c	Wed Feb 20 15:40:16 2013 +0200
@@ -1941,11 +1941,12 @@
 	struct mailbox_transaction_context *t = ctx->transaction;
 	struct mail_keywords *keywords = ctx->data.keywords;
 	enum mail_flags pvt_flags = ctx->data.pvt_flags;
+	bool copying_via_save = ctx->copying_via_save;
 	int ret;
 
 	*_ctx = NULL;
 	ret = t->box->v.save_finish(ctx);
-	if (ret == 0 && !ctx->copying_via_save) {
+	if (ret == 0 && !copying_via_save) {
 		if (pvt_flags != 0)
 			mailbox_save_add_pvt_flags(t, pvt_flags);
 		t->save_count++;


More information about the dovecot-cvs mailing list