Mercurial > dovecot > core-2.2
changeset 22905:59c3c804bffa
imapc: Ignore fetch-msn-workarounds/no-msn-updates during initial FETCH
Otherwise duplicate UIDs aren't detected and it causes an assert-crash:
Panic: file imapc-mailbox.c: line 533 (imapc_untagged_fetch): assertion failed: (lseq == mbox->sync_next_lseq)
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Mon, 26 Mar 2018 00:01:26 +0300 |
parents | c905428ab988 |
children | 8fc3c7215f29 |
files | src/lib-storage/index/imapc/imapc-mailbox.c |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/imapc/imapc-mailbox.c Wed Mar 21 11:29:26 2018 +0200 +++ b/src/lib-storage/index/imapc/imapc-mailbox.c Mon Mar 26 00:01:26 2018 +0300 @@ -357,11 +357,14 @@ msgmap = imapc_client_mailbox_get_msgmap(mbox->client_box); msg_count = imapc_msgmap_count(msgmap); - if (fetch_uid != 0 && + if (fetch_uid != 0 && mbox->state_fetched_success && (IMAPC_BOX_HAS_FEATURE(mbox, IMAPC_FEATURE_FETCH_MSN_WORKAROUNDS) || IMAPC_BOX_HAS_FEATURE(mbox, IMAPC_FEATURE_NO_MSN_UPDATES))) { /* if we know the UID, use own own generated rseq instead of - the potentially broken rseq that the server sent. */ + the potentially broken rseq that the server sent. + Skip this during the initial FETCH 1:* (UID ..) handling, + or we can't detect duplicate UIDs and will instead + assert-crash later on. */ uint32_t fixed_rseq; if (imapc_msgmap_uid_to_rseq(msgmap, fetch_uid, &fixed_rseq))