dovecot-2.0: dbox: Moved SDBOX_INDEX_FLAG_ALT macro to dbox-common.

dovecot at dovecot.org dovecot at dovecot.org
Tue Apr 20 16:25:39 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/129bc5eab66a
changeset: 11176:129bc5eab66a
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Apr 20 16:22:56 2010 +0300
description:
dbox: Moved SDBOX_INDEX_FLAG_ALT macro to dbox-common.

diffstat:

 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(-)

diffs (49 lines):

diff -r 4a98f01eaaac -r 129bc5eab66a src/lib-storage/index/dbox-common/dbox-storage.h
--- a/src/lib-storage/index/dbox-common/dbox-storage.h	Tue Apr 20 14:57:19 2010 +0300
+++ b/src/lib-storage/index/dbox-common/dbox-storage.h	Tue Apr 20 16:22:56 2010 +0300
@@ -19,6 +19,9 @@
 /* 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 -r 4a98f01eaaac -r 129bc5eab66a src/lib-storage/index/dbox-single/sdbox-storage.h
--- a/src/lib-storage/index/dbox-single/sdbox-storage.h	Tue Apr 20 14:57:19 2010 +0300
+++ b/src/lib-storage/index/dbox-single/sdbox-storage.h	Tue Apr 20 16:22:56 2010 +0300
@@ -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 -r 4a98f01eaaac -r 129bc5eab66a src/lib-storage/index/dbox-single/sdbox-sync.c
--- a/src/lib-storage/index/dbox-single/sdbox-sync.c	Tue Apr 20 14:57:19 2010 +0300
+++ b/src/lib-storage/index/dbox-single/sdbox-sync.c	Tue Apr 20 16:22:56 2010 +0300
@@ -49,7 +49,7 @@
 
 	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 @@
 		/* 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 */


More information about the dovecot-cvs mailing list