From 2271d1a3dfc7191e610f039e86b9245bbc5dfb8c Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 20 Apr 2010 16:22:56 +0300 Subject: [PATCH] dbox: Moved SDBOX_INDEX_FLAG_ALT macro to dbox-common. --HG-- branch : HEAD --- src/lib-storage/index/dbox-common/dbox-storage.h | 3 +++ src/lib-storage/index/dbox-single/sdbox-storage.h | 3 --- src/lib-storage/index/dbox-single/sdbox-sync.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib-storage/index/dbox-common/dbox-storage.h b/src/lib-storage/index/dbox-common/dbox-storage.h index c599b274b6..5c0a04001f 100644 --- a/src/lib-storage/index/dbox-common/dbox-storage.h +++ b/src/lib-storage/index/dbox-common/dbox-storage.h @@ -19,6 +19,9 @@ struct dbox_mail; /* Delete temp files having ctime older than this. */ #define DBOX_TMP_DELETE_SECS (36*60*60) +/* Flag specifies if the message should be in primary or alternative storage */ +#define DBOX_INDEX_FLAG_ALT MAIL_INDEX_MAIL_FLAG_BACKEND + struct dbox_storage_vfuncs { /* dbox file has zero references now. it should be either freed or left open in case it's accessed again soon */ diff --git a/src/lib-storage/index/dbox-single/sdbox-storage.h b/src/lib-storage/index/dbox-single/sdbox-storage.h index e1f422a33f..7499715f8a 100644 --- a/src/lib-storage/index/dbox-single/sdbox-storage.h +++ b/src/lib-storage/index/dbox-single/sdbox-storage.h @@ -9,9 +9,6 @@ #define SDBOX_MAIL_FILE_PREFIX "u." #define SDBOX_MAIL_FILE_FORMAT SDBOX_MAIL_FILE_PREFIX"%u" -/* Flag specifies if the message should be in primary or alternative storage */ -#define SDBOX_INDEX_FLAG_ALT MAIL_INDEX_MAIL_FLAG_BACKEND - #define SDBOX_INDEX_HEADER_MIN_SIZE (sizeof(uint32_t)) struct sdbox_index_header { uint32_t oldv1_highest_maildir_uid; diff --git a/src/lib-storage/index/dbox-single/sdbox-sync.c b/src/lib-storage/index/dbox-single/sdbox-sync.c index 4fb1341dea..62b93c68a2 100644 --- a/src/lib-storage/index/dbox-single/sdbox-sync.c +++ b/src/lib-storage/index/dbox-single/sdbox-sync.c @@ -49,7 +49,7 @@ static int sdbox_sync_add_seq(struct sdbox_sync_context *ctx, if (sync_rec->type == MAIL_INDEX_SYNC_TYPE_EXPUNGE) entry->type = SDBOX_SYNC_ENTRY_TYPE_EXPUNGE; - else if ((sync_rec->add_flags & SDBOX_INDEX_FLAG_ALT) != 0) + else if ((sync_rec->add_flags & DBOX_INDEX_FLAG_ALT) != 0) entry->type = SDBOX_SYNC_ENTRY_TYPE_MOVE_TO_ALT; else entry->type = SDBOX_SYNC_ENTRY_TYPE_MOVE_FROM_ALT; @@ -66,8 +66,8 @@ static int sdbox_sync_add(struct sdbox_sync_context *ctx, /* we're interested */ } else if (sync_rec->type == MAIL_INDEX_SYNC_TYPE_FLAGS) { /* we care only about alt flag changes */ - if ((sync_rec->add_flags & SDBOX_INDEX_FLAG_ALT) == 0 && - (sync_rec->remove_flags & SDBOX_INDEX_FLAG_ALT) == 0) + if ((sync_rec->add_flags & DBOX_INDEX_FLAG_ALT) == 0 && + (sync_rec->remove_flags & DBOX_INDEX_FLAG_ALT) == 0) return 1; } else { /* not interested */ -- 2.47.3