]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dbox, mdbox, maildir: If saving one mail fails in transaction, don't fail subsequent...
authorTimo Sirainen <tss@iki.fi>
Thu, 27 May 2010 11:53:35 +0000 (12:53 +0100)
committerTimo Sirainen <tss@iki.fi>
Thu, 27 May 2010 11:53:35 +0000 (12:53 +0100)
--HG--
branch : HEAD

src/lib-storage/index/cydir/cydir-save.c
src/lib-storage/index/dbox-multi/mdbox-save.c
src/lib-storage/index/dbox-single/sdbox-save.c
src/lib-storage/index/maildir/maildir-save.c

index c91899511db2902fbf80ce5473edf20a7158128f..40444c64756e9f8feab1497eb458e5d57b86f412 100644 (file)
@@ -81,6 +81,8 @@ int cydir_save_begin(struct mail_save_context *_ctx, struct istream *input)
        enum mail_flags save_flags;
        struct istream *crlf_input;
 
+       ctx->failed = FALSE;
+
        T_BEGIN {
                const char *path;
 
index 0cbbf6865be3e6117ace7384fab1a681749457e7..d934940226996104dffc9e241c0fbb104e84304d 100644 (file)
@@ -104,6 +104,7 @@ mdbox_save_alloc(struct mailbox_transaction_context *t)
 
        if (ctx != NULL) {
                /* use the existing allocated structure */
+               ctx->ctx.failed = FALSE;
                ctx->ctx.finished = FALSE;
                return &ctx->ctx.ctx;
        }
index d2f345ba9760e63bb17fc0e42a6ca33766b52461..03b2db135ce653709e01e4e260bf8a35cf4b6cf4 100644 (file)
@@ -57,6 +57,7 @@ sdbox_save_alloc(struct mailbox_transaction_context *t)
 
        if (ctx != NULL) {
                /* use the existing allocated structure */
+               ctx->ctx.failed = FALSE;
                ctx->ctx.finished = FALSE;
                return &ctx->ctx.ctx;
        }
index 69074859d9d3c89ca7603dbe3d68019e28ff8941..c42c248efd336e1eaafc8e4bfb12782a5214c67f 100644 (file)
@@ -383,6 +383,9 @@ int maildir_save_begin(struct mail_save_context *_ctx, struct istream *input)
 {
        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;