]> 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 13:44:45 +0000 (15:44 +0200)
This would have used the previous error, which might not have been correct.

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

index 2cb91527f0b9c710c940399fe05fe5f8730d00e5..accd0a539b9231b3570f1b1e70f5f09784ce03b9 100644 (file)
@@ -212,8 +212,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 */
@@ -441,8 +443,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;
 }