# HG changeset patch # User Timo Sirainen # Date 1501909678 -32400 # Node ID feb7448f94cdb90d3e8e01129fff6484ec16434e # Parent 7ae7c3c159d1f704975fd2f6016f4aadc54a8d5a lib-index: Fix modseq tracking for MAIL_INDEX_MAIL_FLAG_UPDATE_MODSEQ This is used to increase modseq for mails when their private flags change. Use an already existing MAIL_TRANSACTION_FLAG_UPDATE_IS_INTERNAL() that does this properly. (This change preserves another bug, which is fixed in the next commit.) diff -r 7ae7c3c159d1 -r feb7448f94cd src/lib-index/mail-transaction-log-file.c --- a/src/lib-index/mail-transaction-log-file.c Sun Jul 23 12:32:38 2017 +0300 +++ b/src/lib-index/mail-transaction-log-file.c Sat Aug 05 14:07:58 2017 +0900 @@ -1013,9 +1013,6 @@ flag_updates_have_non_internal(const struct mail_transaction_flag_update *u, unsigned int count, unsigned int version) { - const uint8_t internal_flags = - MAIL_INDEX_MAIL_FLAG_BACKEND | MAIL_INDEX_MAIL_FLAG_DIRTY; - /* Hide internal flags from modseqs if the log file's version is new enough. This allows upgrading without the modseqs suddenly shrinking. */ @@ -1023,9 +1020,7 @@ return TRUE; for (unsigned int i = 0; i < count; i++) { - uint8_t changed_flags = u->add_flags | u->remove_flags; - - if ((changed_flags & ~internal_flags) != 0) + if (!MAIL_TRANSACTION_FLAG_UPDATE_IS_INTERNAL(u)) return TRUE; } return FALSE;