dovecot-2.2: lib-storage: Don't reset mail_save_context.copying|...

dovecot at dovecot.org dovecot at dovecot.org
Sun Mar 31 16:46:55 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/f31d241d5371
changeset: 16128:f31d241d5371
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Mar 31 16:46:45 2013 +0300
description:
lib-storage: Don't reset mail_save_context.copying|moving|copying_via_save too early.

diffstat:

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

diffs (50 lines):

diff -r f617e2fcce66 -r f31d241d5371 src/lib-storage/index/index-storage.c
--- a/src/lib-storage/index/index-storage.c	Sun Mar 31 16:46:11 2013 +0300
+++ b/src/lib-storage/index/index-storage.c	Sun Mar 31 16:46:45 2013 +0300
@@ -759,9 +759,6 @@
 	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 f617e2fcce66 -r f31d241d5371 src/lib-storage/mail-storage.c
--- a/src/lib-storage/mail-storage.c	Sun Mar 31 16:46:11 2013 +0300
+++ b/src/lib-storage/mail-storage.c	Sun Mar 31 16:46:45 2013 +0300
@@ -2026,6 +2026,7 @@
 	if (keywords != NULL)
 		mailbox_keywords_unref(&keywords);
 	i_assert(!ctx->unfinished);
+	ctx->saving = FALSE;
 	return ret;
 }
 
@@ -2047,6 +2048,7 @@
 		mail->v.close(&mail->mail);
 	}
 	i_assert(!ctx->unfinished);
+	ctx->saving = FALSE;
 }
 
 struct mailbox_transaction_context *
@@ -2084,6 +2086,9 @@
 	if (keywords != NULL)
 		mailbox_keywords_unref(&keywords);
 	i_assert(!ctx->unfinished);
+
+	ctx->copying_via_save = FALSE;
+	ctx->saving = FALSE;
 	return ret;
 }
 
@@ -2096,6 +2101,7 @@
 		return -1;
 
 	mail_expunge(mail);
+	ctx->moving = FALSE;
 	return 0;
 }
 


More information about the dovecot-cvs mailing list