changeset 21201:b691b424749e

imapc: Fix assert that checks if mail is expunged locally. The EXPUNGE may have been sent while imapc_sync_index() was issuing remote imapc commands. It would end up being in delayed_expunged_uids, so the assert needs to check that too. Fixes: Panic: file imapc-sync.c: line 290 (imapc_initial_sync_check): assertion failed: (mail_index_is_expunged(view, lseq))
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Wed, 23 Nov 2016 17:14:48 +0200
parents 19eedc28a78b
children c0643c4b1b10
files src/lib-storage/index/imapc/imapc-sync.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/imapc/imapc-sync.c	Wed Nov 23 17:14:14 2016 +0200
+++ b/src/lib-storage/index/imapc/imapc-sync.c	Wed Nov 23 17:14:48 2016 +0200
@@ -287,7 +287,8 @@
 				break;
 			}
 			/* it's already expunged and we should have marked it */
-			i_assert(mail_index_is_expunged(view, lseq));
+			i_assert(mail_index_is_expunged(view, lseq) ||
+				 seq_range_exists(&ctx->mbox->delayed_expunged_uids, luid));
 			lseq++;
 		} else {
 			/* message doesn't exist in index, but exists in