]> 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)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Mon, 14 Aug 2017 08:20:18 +0000 (11:20 +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 977a9b35fe20cc260dac5828d120fcc2582830a4..909a0c2abec6609abcaa66b007b8212a1b293bb4 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;