virtual-sync.c revision c20d64512d687f0abf7c1a0aa4fa0174da0a18e3
e9e2d23e1ea5a149a7d8828d2a45b9f2313c3785Timo Sirainen/* Copyright (c) 2008-2009 Dovecot authors, see the included COPYING file */
e9e2d23e1ea5a149a7d8828d2a45b9f2313c3785Timo Sirainen const char *const *kw_all;
e9e2d23e1ea5a149a7d8828d2a45b9f2313c3785Timo Sirainen /* messages expunged within this sync */
e9e2d23e1ea5a149a7d8828d2a45b9f2313c3785Timo Sirainen ARRAY_DEFINE(all_adds, struct virtual_add_record);
const char *const *kw_names;
const void *ext_data;
return TRUE;
ext_name_offset = 0;
ext_mailbox_count = 0;
ext_mailbox_count = 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 (i < ext_mailbox_count) {
for (i = 0; i < count; i++) {
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)
sizeof(*uidmap),
i_unreached();
for (i = 0; i < uid_count; i++) {
&vseq))
if (uid_count == 0)
if (rec_count == 0 ||
sizeof(*uidmap),
&dest))
i_unreached();
for (i = 0; i < uid_count; i++) {
unsigned int uid_count;
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)
return FALSE;
return TRUE;
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) {
sizeof(*uidmap),
&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;
struct mailbox_sync_context *
int ret = 0;
return sync_ctx;