virtual-sync.c revision 42270b2d8d9bb0d04b16e0ead727154b32399a3f
f46fce070a135ec6bb3078c104f32651ea84cdefTimo Sirainen/* Copyright (c) 2008-2009 Dovecot authors, see the included COPYING file */
f46fce070a135ec6bb3078c104f32651ea84cdefTimo Sirainen const char *const *kw_all;
e563b8a1457be8c08cc7567043c9f06b8243a025Timo Sirainen /* messages expunged within this sync */
f46fce070a135ec6bb3078c104f32651ea84cdefTimo Sirainen ARRAY_DEFINE(all_adds, struct virtual_add_record);
f46fce070a135ec6bb3078c104f32651ea84cdefTimo Sirainenstatic void virtual_sync_set_uidvalidity(struct virtual_sync_context *ctx)
f46fce070a135ec6bb3078c104f32651ea84cdefTimo Sirainen offsetof(struct mail_index_header, uid_validity),
const char *const *kw_names;
const void *ext_data;
return TRUE;
ext_name_offset = 0;
ext_mailbox_count = 0;
ext_mailbox_count = 0;
ret = 0;
prev_mailbox_id = 0;
for (i = 0; i < ext_mailbox_count; i++) {
T_BEGIN {
const unsigned char *nameptr;
const char *name;
} T_END;
if (ret < 0)
ret = 0;
if (i < ext_mailbox_count) {
ret = 0;
for (i = 0; i < count; i++) {
ret = 0;
return ret;
const void *ext_data;
for (i = 0; i < count; i++) {
i_assert(i == 0 ||
sizeof(struct virtual_mail_index_record),
sizeof(uint32_t));
const void *data;
bool expunged;
if (flags != 0) {
if (flags != 0) {
kw_names);
kw_names);
keywords);
i_unreached();
int ret;
return ret;
if (uid_count == 0)
i_unreached();
for (i = 0; i < uid_count; i++) {
&vseq))
if (uid_count == 0)
if (rec_count == 0 ||
&dest))
i_unreached();
for (i = 0; i < uid_count; i++) {
unsigned int i, count;
for (i = 0; i < count; i++) {
const void *data;
bool expunged;
&seq)) {
old_msg_count = 0;
unsigned int i, n = 0, count;
if (i == count)
for (; i < count; ) {
unsigned int i, n = 0, count;
for (; i < count; ) {
if (!iter_done) {
&added_uids);
&temp_uids);
&removed_uids);
&removed_uids);
unsigned int *idx1_r,
unsigned int *idx2_r)
&idx);
return FALSE;
return TRUE;
&idx1);
case MAILBOX_SYNC_TYPE_FLAGS:
case MAILBOX_SYNC_TYPE_MODSEQ:
const unsigned int uidval_pos =
unsigned int mailbox_offset;
int ret;
&status) < 0)
} T_END;
return ret;
const void *data;
bool expunged;
unsigned int j = 0, uidmap_count = 0;
for (i = 0; i < messages; i++) {
for (; j < uidmap_count; j++) {
&uidmap_count);
for (; j < uidmap_count; j++) {
for (; j < uidmap_count; j++) {
for (i = 0; i < count; i++) {
for (j = 0; j < uidmap_count; j++) {
unsigned int i, count;
i_unreached();
if (count == 0) {
&idx))
i_unreached();
const void *data;
bool expunged;
const void *data;
bool expunged;
unsigned int i, count;
for (i = 0; i < count; i++) {
unsigned int i, count;
for (i = 0; i < count; i++)
if (success) {
return ret;
int ret;
if (ret <= 0) {
if (ret < 0)
return ret;
if (ret < 0)
if (ret == 0)
struct mailbox_sync_context *
int ret = 0;
return sync_ctx;