mail-index-sync.c revision d94b7a80efaffc04996cc475fc84dde7a1006f0a
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync/* Copyright (C) 2003-2004 Timo Sirainen */
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncstatic void mail_index_sync_sort_flags(struct mail_index_sync_ctx *ctx)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync const struct mail_transaction_flag_update *src, *src_end;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync struct mail_transaction_expunge_traverse_ctx *exp_ctx;
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync dest = buffer_get_data(ctx->updates_buf, &dest_count);
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync exp_ctx = mail_transaction_expunge_traverse_init(ctx->expunges_buf);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync /* find seq1 */
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync /* find seq2 */
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync /* insert it into buffer, split it in multiple parts if needed
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync to make sure the ordering stays the same */
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync for (; i < dest_count; i++) {
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync /* partial */
dest_count++;
dest_count++;
case MAIL_TRANSACTION_EXPUNGE:
case MAIL_TRANSACTION_APPEND:
int external)
int ret;
return ret;
unsigned int lock_id;
MAIL_TRANSACTION_TYPE_MASK) < 0) {
return FALSE;
return FALSE;
return TRUE;
case MAIL_TRANSACTION_APPEND: {
case MAIL_TRANSACTION_EXPUNGE: {
case MAIL_TRANSACTION_FLAG_UPDATE: {
i_unreached();
next_update++;
sizeof(struct mail_index_record);
int ret = 0;
if (ret == 0) {
if (ret == 0) {
sync_size) < 0)
return ret;
for (i = 0; i < INDEX_KEYWORDS_BYTE_COUNT; i++) {