]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imapc: imapc_sync_handle_untagged_fetches() - Commit after adding the untagged fetch...
authorMarkus Valentin <markus.valentin@open-xchange.com>
Wed, 2 Feb 2022 15:58:24 +0000 (16:58 +0100)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 14 Mar 2022 11:38:19 +0000 (11:38 +0000)
The absence of the commit could have caused issues when
imapc_sync_finish() was not called as it left mbox->delayed_sync_trans
initialized but mbox->delayed_sync_view was NULL.

Broken by 55a8c2d294bb2f764209c7ce455d258b2b7506f5

src/lib-storage/index/imapc/imapc-sync.c

index afd8c67497bc632200ffccb45335e230f8dbe566..d99a00cfaab11f981cb5863d7f2aa6a0fd88b3ad 100644 (file)
@@ -583,6 +583,8 @@ static void imapc_sync_handle_untagged_fetches(struct imapc_mailbox *mbox)
        }
 
        mail_index_view_close(&updated_view);
+       if (mail_index_transaction_commit(&mbox->delayed_sync_trans) < 0)
+               mailbox_set_index_error(&mbox->box);
        array_clear(&mbox->untagged_fetch_contexts);
 }