struct mail_index_transaction *trans;
buffer_t *output;
+ unsigned int modseq_change_count;
uint32_t first_append_size;
bool sync_includes_this;
};
if ((ctx->trans->flags & MAIL_INDEX_TRANSACTION_FLAG_EXTERNAL) != 0)
hdr.type |= MAIL_TRANSACTION_EXTERNAL;
+ if (mail_transaction_header_has_modseq(&hdr))
+ ctx->modseq_change_count++;
+
hdr_size = mail_index_uint32_to_offset(sizeof(hdr) + buf->used +
(hdr_buf == NULL ? 0 :
hdr_buf->used));
file = log->head;
- if (file->sync_offset < file->buffer_offset)
- file->sync_offset = file->buffer_offset;
+ i_assert(file->sync_offset >= file->buffer_offset);
memset(&ctx, 0, sizeof(ctx));
ctx.file = file;
buffer_free(&ctx.output);
return -1;
}
+ file->sync_highest_modseq += ctx.modseq_change_count;
buffer_free(&ctx.output);
if ((t->flags & MAIL_INDEX_TRANSACTION_FLAG_HIDE) != 0) {