dovecot-2.0: dbox, mdbox, maildir: If saving one mail fails in t...
dovecot at dovecot.org
dovecot at dovecot.org
Thu May 27 14:53:42 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/a0fccb6367f4
changeset: 11389:a0fccb6367f4
user: Timo Sirainen <tss at iki.fi>
date: Thu May 27 12:53:35 2010 +0100
description:
dbox, mdbox, maildir: If saving one mail fails in transaction, don't fail subsequent saves.
diffstat:
src/lib-storage/index/cydir/cydir-save.c | 2 ++
src/lib-storage/index/dbox-multi/mdbox-save.c | 1 +
src/lib-storage/index/dbox-single/sdbox-save.c | 1 +
src/lib-storage/index/maildir/maildir-save.c | 3 +++
4 files changed, 7 insertions(+), 0 deletions(-)
diffs (47 lines):
diff -r b8d3c96e61a7 -r a0fccb6367f4 src/lib-storage/index/cydir/cydir-save.c
--- a/src/lib-storage/index/cydir/cydir-save.c Thu May 27 12:16:36 2010 +0100
+++ b/src/lib-storage/index/cydir/cydir-save.c Thu May 27 12:53:35 2010 +0100
@@ -81,6 +81,8 @@
enum mail_flags save_flags;
struct istream *crlf_input;
+ ctx->failed = FALSE;
+
T_BEGIN {
const char *path;
diff -r b8d3c96e61a7 -r a0fccb6367f4 src/lib-storage/index/dbox-multi/mdbox-save.c
--- a/src/lib-storage/index/dbox-multi/mdbox-save.c Thu May 27 12:16:36 2010 +0100
+++ b/src/lib-storage/index/dbox-multi/mdbox-save.c Thu May 27 12:53:35 2010 +0100
@@ -104,6 +104,7 @@
if (ctx != NULL) {
/* use the existing allocated structure */
+ ctx->ctx.failed = FALSE;
ctx->ctx.finished = FALSE;
return &ctx->ctx.ctx;
}
diff -r b8d3c96e61a7 -r a0fccb6367f4 src/lib-storage/index/dbox-single/sdbox-save.c
--- a/src/lib-storage/index/dbox-single/sdbox-save.c Thu May 27 12:16:36 2010 +0100
+++ b/src/lib-storage/index/dbox-single/sdbox-save.c Thu May 27 12:53:35 2010 +0100
@@ -57,6 +57,7 @@
if (ctx != NULL) {
/* use the existing allocated structure */
+ ctx->ctx.failed = FALSE;
ctx->ctx.finished = FALSE;
return &ctx->ctx.ctx;
}
diff -r b8d3c96e61a7 -r a0fccb6367f4 src/lib-storage/index/maildir/maildir-save.c
--- a/src/lib-storage/index/maildir/maildir-save.c Thu May 27 12:16:36 2010 +0100
+++ b/src/lib-storage/index/maildir/maildir-save.c Thu May 27 12:53:35 2010 +0100
@@ -383,6 +383,9 @@
{
struct maildir_save_context *ctx = (struct maildir_save_context *)_ctx;
+ /* new mail, new failure state */
+ ctx->failed = FALSE;
+
T_BEGIN {
/* create a new file in tmp/ directory */
const char *fname = _ctx->guid;
More information about the dovecot-cvs
mailing list