]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imapc: Error handling wasn't setting storage error everywhere.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 21 Feb 2017 13:44:09 +0000 (15:44 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 21 Feb 2017 20:25:45 +0000 (22:25 +0200)
This would have used the previous error, which might not have been correct.

src/lib-storage/index/imapc/imapc-mail-fetch.c

index ebedf481bd5dbc03feab4aee7cf2fc463f57dfd5..b5511f968809d79094a09423f15235fefc3687f6 100644 (file)
@@ -213,8 +213,10 @@ imapc_mail_send_fetch(struct mail *_mail, enum mail_fetch_field fields,
        uint32_t seq;
        unsigned int i;
 
-       if (_mail->lookup_abort != MAIL_LOOKUP_ABORT_NEVER)
+       if (_mail->lookup_abort != MAIL_LOOKUP_ABORT_NEVER) {
+               mail_set_aborted(_mail);
                return -1;
+       }
        _mail->mail_stream_opened = TRUE;
 
        /* drop any fields that we may already be fetching currently */
@@ -444,8 +446,10 @@ int imapc_mail_fetch(struct mail *_mail, enum mail_fetch_field fields,
                !imail->header_list_fetched)) {
                imapc_mailbox_run_nofetch(mbox);
        }
-       if (imail->fetch_failed)
+       if (imail->fetch_failed) {
+               mail_storage_set_internal_error(&mbox->storage->storage);
                return -1;
+       }
        return 0;
 }