]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index: Fix modseq tracking with multiple flag updates
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Sat, 5 Aug 2017 05:11:17 +0000 (14:11 +0900)
committerTimo Sirainen <tss@dovecot.fi>
Fri, 11 Aug 2017 11:17:32 +0000 (14:17 +0300)
The earlier code was checking only the first flag record update. If the
first one had only internal flag changes but (some of) the rest didn't,
the modseq wasn't counted correctly. This was probably pretty rare.

src/lib-index/mail-transaction-log-file.c

index 520541b8a86a89acaef91c2d31b3a20a5aaa625c..094cbb2d50062a8db3954eccf4d11659da4fa23f 100644 (file)
@@ -1020,7 +1020,7 @@ flag_updates_have_non_internal(const struct mail_transaction_flag_update *u,
                return TRUE;
 
        for (unsigned int i = 0; i < count; i++) {
-               if (!MAIL_TRANSACTION_FLAG_UPDATE_IS_INTERNAL(u))
+               if (!MAIL_TRANSACTION_FLAG_UPDATE_IS_INTERNAL(&u[i]))
                        return TRUE;
        }
        return FALSE;