/* Copyright (c) 2003-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "ioloop.h"
#include "mail-index-private.h"
#include "mail-index-modseq.h"
#include "mail-index-transaction-private.h"
const struct mail_transaction_expunge_guid *e2)
{
return -1;
return 1;
else
return 0;
}
{
if (!t->expunges_nonsorted)
return;
t->expunges_nonsorted = FALSE;
}
static void
{
/* new extension */
reset_id = 1;
} else {
}
if (reset_id != expected_reset_id) {
/* ignore this extension update */
mail_index_ext_set_reset_id(t, ext_id, 0);
return;
}
if (reset_id == 0)
reset_id++;
/* reseting existing data is optional */
if (array_is_created(&t->ext_resets)) {
}
}
static void
{
if (!array_is_created(&t->ext_reset_atomic))
return;
if (expected_reset_ids[ext_id] != 0) {
}
}
}
static unsigned int
struct mail_index_flag_update update,
unsigned int update_idx,
{
unsigned int i, keep_count;
if (keep_count == 1 &&
/* everything is kept */
return update_idx + 1;
}
/* add back all the updates we want to keep */
for (i = 0; i < keep_count; i++, update_idx++) {
}
return update_idx;
}
static void
{
unsigned int i, count;
return;
for (i = 0; i < count; ) {
/* first get the list of changes to drop */
u = &updates[i];
array_clear(&keeps);
/* keep this change */
}
}
}
if (array_count(&t->updates) == 0)
array_free(&t->updates);
}
static void
{
i_assert(t->max_modseq != 0);
/* no conflicts possible */
return;
}
if (t->min_flagupdate_seq == 0) {
/* no flag updates */
return;
}
16, seq);
}
}
}
}
static uint32_t
{
if (seq >= t->first_new_seq)
else {
}
}
static void
{
unsigned int i, count;
if (!array_is_created(array))
return;
for (i = 0; i < count; i++) {
}
}
static uint32_t
{
seq1++;
seq1++;
uid1++;
}
return uid1;
}
{
unsigned int i, count;
if (!array_is_created(array))
return;
for (i = 0; i < count; i++) {
/* simple conversion */
} else {
/* remove expunged UIDs */
count++;
/* continue the range without the inserted seqs */
}
}
}
{
if (!array_is_created(&t->keyword_updates))
return;
}
}
{
if (!array_is_created(&t->expunges))
return;
if (count == 0)
return;
/* convert uids and drop duplicates */
}
dest++;
}
}
}
static void
{
if (array_is_created(&t->ext_rec_updates)) {
}
if (array_is_created(&t->ext_rec_atomics)) {
}
mail_index_convert_to_uids(t, (void *)&t->modseq_updates);
mail_index_transaction_seq_range_to_uid(t, (void *)&t->updates);
}
{
if (array_is_created(&t->appends))
if (t->max_modseq != 0)
}
{
if (array_is_created(&t->appends))
if (array_is_created(&t->ext_reset_atomic))
/* finally convert all sequences to UIDs before we write them,
but after we've checked and removed conflicts */
/* and kind of ugly way to update highest modseq */
if (t->min_highest_modseq != 0)
mail_index_update_modseq(t, 0, t->min_highest_modseq);
}