]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: mailbox_get_*status(STATUS_HIGHESTMODSEQ) now enables CONDSTORE feature.
authorTimo Sirainen <tss@iki.fi>
Fri, 8 Aug 2014 10:46:05 +0000 (13:46 +0300)
committerTimo Sirainen <tss@iki.fi>
Fri, 8 Aug 2014 10:46:05 +0000 (13:46 +0300)
This makes sure that the highestmodseq is added to the mailbox list index if
not already there.

src/lib-storage/mail-storage.c

index 2fa9b8d49dff536c366a95c47baa9334fb905e5c..74f5235026b4f4a2efae95fad336ad5be6ec4343 100644 (file)
@@ -1523,6 +1523,9 @@ int mailbox_get_status(struct mailbox *box,
        mailbox_get_status_set_defaults(box, status_r);
        if (mailbox_verify_existing_name(box) < 0)
                return -1;
+
+       if ((items & STATUS_HIGHESTMODSEQ) != 0)
+               mailbox_enable(box, MAILBOX_FEATURE_CONDSTORE);
        if (box->v.get_status(box, items, status_r) < 0)
                return -1;
        i_assert(status_r->have_guids || !status_r->have_save_guids);
@@ -1537,6 +1540,8 @@ void mailbox_get_open_status(struct mailbox *box,
        i_assert((items & MAILBOX_STATUS_FAILING_ITEMS) == 0);
 
        mailbox_get_status_set_defaults(box, status_r);
+       if ((items & STATUS_HIGHESTMODSEQ) != 0)
+               mailbox_enable(box, MAILBOX_FEATURE_CONDSTORE);
        if (box->v.get_status(box, items, status_r) < 0)
                i_unreached();
 }