Mercurial > dovecot > core-2.2
changeset 22079:bb8eb229d0fb
lib-storage: Always update highestmodseq in mailbox list index
This is required for mailbox-list-notify API to work correctly. For
example IMAP NOTIFY session with CONDSTORE enabled could be listening for
FlagChanges, but another session without CONDSTORE enabled could be updating
flags in a mailbox that has never been opened with CONDSTORE enabled.
NOTIFY wouldn't see this change, unless it was always written to
dovecot.list.index.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Wed, 17 May 2017 17:49:25 +0300 |
parents | f2b50a4a6951 |
children | 4b25a65f8aa1 |
files | src/lib-storage/list/mailbox-list-index-status.c |
diffstat | 1 files changed, 1 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/list/mailbox-list-index-status.c Wed May 17 17:14:05 2017 +0300 +++ b/src/lib-storage/list/mailbox-list-index-status.c Wed May 17 17:49:25 2017 +0300 @@ -478,7 +478,6 @@ index_list_has_changed(struct mailbox *box, struct mail_index_view *list_view, struct index_list_changes *changes) { - struct mailbox_list_index *ilist = INDEX_LIST_CONTEXT(box->list); struct mailbox_status old_status; struct mailbox_index_vsize old_vsize; guid_128_t old_guid; @@ -504,15 +503,8 @@ /* update highest-modseq only if they're ever been used */ if (old_status.highest_modseq == changes->status.highest_modseq) { changes->hmodseq_changed = FALSE; - } else if (mail_index_have_modseq_tracking(box->index)) { + } else { changes->hmodseq_changed = TRUE; - } else { - const void *data; - bool expunged; - - mail_index_lookup_ext(list_view, changes->seq, - ilist->hmodseq_ext_id, &data, &expunged); - changes->hmodseq_changed = data != NULL; } if (memcmp(&old_vsize, &changes->vsize, sizeof(old_vsize)) != 0) changes->vsize_changed = TRUE;