dovecot-2.2: Replaced *_INDEX_PREFIX macros with a common MAIL_I...

dovecot at dovecot.org dovecot at dovecot.org
Mon Oct 29 19:52:33 EET 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/15dfd6475f64
changeset: 15341:15dfd6475f64
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Oct 29 19:52:21 2012 +0200
description:
Replaced *_INDEX_PREFIX macros with a common MAIL_INDEX_PREFIX.

diffstat:

 src/lib-storage/index/cydir/cydir-storage.c       |  3 +--
 src/lib-storage/index/cydir/cydir-storage.h       |  1 -
 src/lib-storage/index/dbox-common/dbox-storage.c  |  2 +-
 src/lib-storage/index/dbox-common/dbox-storage.h  |  1 -
 src/lib-storage/index/dbox-multi/mdbox-storage.c  |  3 +--
 src/lib-storage/index/dbox-single/sdbox-storage.c |  3 +--
 src/lib-storage/index/imapc/imapc-storage.c       |  3 +--
 src/lib-storage/index/imapc/imapc-storage.h       |  1 -
 src/lib-storage/index/maildir/maildir-storage.c   |  3 +--
 src/lib-storage/index/maildir/maildir-storage.h   |  1 -
 src/lib-storage/index/mbox/mbox-storage.c         |  3 +--
 src/lib-storage/index/mbox/mbox-storage.h         |  1 -
 src/lib-storage/index/pop3c/pop3c-storage.c       |  3 +--
 src/lib-storage/index/pop3c/pop3c-storage.h       |  1 -
 src/lib-storage/mail-storage-private.h            |  3 +++
 src/plugins/virtual/virtual-storage.c             |  3 +--
 src/plugins/virtual/virtual-storage.h             |  1 -
 17 files changed, 12 insertions(+), 24 deletions(-)

diffs (206 lines):

diff -r f423090a363a -r 15dfd6475f64 src/lib-storage/index/cydir/cydir-storage.c
--- a/src/lib-storage/index/cydir/cydir-storage.c	Mon Oct 29 18:32:40 2012 +0200
+++ b/src/lib-storage/index/cydir/cydir-storage.c	Mon Oct 29 19:52:21 2012 +0200
@@ -52,8 +52,7 @@
 	mbox->box.list = list;
 	mbox->box.mail_vfuncs = &cydir_mail_vfuncs;
 
-	index_storage_mailbox_alloc(&mbox->box, vname, flags,
-				    CYDIR_INDEX_PREFIX);
+	index_storage_mailbox_alloc(&mbox->box, vname, flags, MAIL_INDEX_PREFIX);
 
 	mbox->storage = (struct cydir_storage *)storage;
 	return &mbox->box;
diff -r f423090a363a -r 15dfd6475f64 src/lib-storage/index/cydir/cydir-storage.h
--- a/src/lib-storage/index/cydir/cydir-storage.h	Mon Oct 29 18:32:40 2012 +0200
+++ b/src/lib-storage/index/cydir/cydir-storage.h	Mon Oct 29 19:52:21 2012 +0200
@@ -5,7 +5,6 @@
 
 #define CYDIR_STORAGE_NAME "cydir"
 #define CYDIR_SUBSCRIPTION_FILE_NAME "subscriptions."
-#define CYDIR_INDEX_PREFIX "dovecot.index"
 
 struct cydir_storage {
 	struct mail_storage storage;
diff -r f423090a363a -r 15dfd6475f64 src/lib-storage/index/dbox-common/dbox-storage.c
--- a/src/lib-storage/index/dbox-common/dbox-storage.c	Mon Oct 29 18:32:40 2012 +0200
+++ b/src/lib-storage/index/dbox-common/dbox-storage.c	Mon Oct 29 19:52:21 2012 +0200
@@ -153,7 +153,7 @@
 		if (mailbox_get_path_to(box, MAILBOX_LIST_PATH_TYPE_INDEX,
 					&dir) <= 0)
 			return;
-		path = t_strdup_printf("%s/"DBOX_INDEX_PREFIX".log", dir);
+		path = t_strdup_printf("%s/"MAIL_INDEX_PREFIX".log", dir);
 		index_mailbox_check_add(box, path);
 	}
 }
diff -r f423090a363a -r 15dfd6475f64 src/lib-storage/index/dbox-common/dbox-storage.h
--- a/src/lib-storage/index/dbox-common/dbox-storage.h	Mon Oct 29 18:32:40 2012 +0200
+++ b/src/lib-storage/index/dbox-common/dbox-storage.h	Mon Oct 29 19:52:21 2012 +0200
@@ -10,7 +10,6 @@
 
 #define DBOX_SUBSCRIPTION_FILE_NAME "subscriptions"
 #define DBOX_UIDVALIDITY_FILE_NAME "dovecot-uidvalidity"
-#define DBOX_INDEX_PREFIX "dovecot.index"
 #define DBOX_TEMP_FILE_PREFIX ".temp."
 #define DBOX_ALT_SYMLINK_NAME "dbox-alt-root"
 
diff -r f423090a363a -r 15dfd6475f64 src/lib-storage/index/dbox-multi/mdbox-storage.c
--- a/src/lib-storage/index/dbox-multi/mdbox-storage.c	Mon Oct 29 18:32:40 2012 +0200
+++ b/src/lib-storage/index/dbox-multi/mdbox-storage.c	Mon Oct 29 19:52:21 2012 +0200
@@ -156,8 +156,7 @@
 	mbox->box.list = list;
 	mbox->box.mail_vfuncs = &mdbox_mail_vfuncs;
 
-	index_storage_mailbox_alloc(&mbox->box, vname,
-				    flags, DBOX_INDEX_PREFIX);
+	index_storage_mailbox_alloc(&mbox->box, vname, flags, MAIL_INDEX_PREFIX);
 
 	ibox = INDEX_STORAGE_CONTEXT(&mbox->box);
 	ibox->index_flags |= MAIL_INDEX_OPEN_FLAG_KEEP_BACKUPS |
diff -r f423090a363a -r 15dfd6475f64 src/lib-storage/index/dbox-single/sdbox-storage.c
--- a/src/lib-storage/index/dbox-single/sdbox-storage.c	Mon Oct 29 18:32:40 2012 +0200
+++ b/src/lib-storage/index/dbox-single/sdbox-storage.c	Mon Oct 29 19:52:21 2012 +0200
@@ -105,8 +105,7 @@
 	mbox->box.list = list;
 	mbox->box.mail_vfuncs = &sdbox_mail_vfuncs;
 
-	index_storage_mailbox_alloc(&mbox->box, vname,
-				    flags, DBOX_INDEX_PREFIX);
+	index_storage_mailbox_alloc(&mbox->box, vname, flags, MAIL_INDEX_PREFIX);
 
 	ibox = INDEX_STORAGE_CONTEXT(&mbox->box);
 	ibox->index_flags |= MAIL_INDEX_OPEN_FLAG_KEEP_BACKUPS |
diff -r f423090a363a -r 15dfd6475f64 src/lib-storage/index/imapc/imapc-storage.c
--- a/src/lib-storage/index/imapc/imapc-storage.c	Mon Oct 29 18:32:40 2012 +0200
+++ b/src/lib-storage/index/imapc/imapc-storage.c	Mon Oct 29 19:52:21 2012 +0200
@@ -326,8 +326,7 @@
 	mbox->box.list = list;
 	mbox->box.mail_vfuncs = &imapc_mail_vfuncs;
 
-	index_storage_mailbox_alloc(&mbox->box, vname, flags,
-				    IMAPC_INDEX_PREFIX);
+	index_storage_mailbox_alloc(&mbox->box, vname, flags, MAIL_INDEX_PREFIX);
 
 	mbox->storage = (struct imapc_storage *)storage;
 
diff -r f423090a363a -r 15dfd6475f64 src/lib-storage/index/imapc/imapc-storage.h
--- a/src/lib-storage/index/imapc/imapc-storage.h	Mon Oct 29 18:32:40 2012 +0200
+++ b/src/lib-storage/index/imapc/imapc-storage.h	Mon Oct 29 19:52:21 2012 +0200
@@ -5,7 +5,6 @@
 #include "imapc-settings.h"
 
 #define IMAPC_STORAGE_NAME "imapc"
-#define IMAPC_INDEX_PREFIX "dovecot.index"
 #define IMAPC_LIST_ESCAPE_CHAR '%'
 #define IMAPC_LIST_BROKEN_CHAR '~'
 
diff -r f423090a363a -r 15dfd6475f64 src/lib-storage/index/maildir/maildir-storage.c
--- a/src/lib-storage/index/maildir/maildir-storage.c	Mon Oct 29 18:32:40 2012 +0200
+++ b/src/lib-storage/index/maildir/maildir-storage.c	Mon Oct 29 19:52:21 2012 +0200
@@ -281,8 +281,7 @@
 	mbox->box.mail_vfuncs = &maildir_mail_vfuncs;
 	mbox->maildir_list_index_ext_id = (uint32_t)-1;
 
-	index_storage_mailbox_alloc(&mbox->box, vname, flags,
-				    MAILDIR_INDEX_PREFIX);
+	index_storage_mailbox_alloc(&mbox->box, vname, flags, MAIL_INDEX_PREFIX);
 
 	mbox->storage = (struct maildir_storage *)storage;
 	return &mbox->box;
diff -r f423090a363a -r 15dfd6475f64 src/lib-storage/index/maildir/maildir-storage.h
--- a/src/lib-storage/index/maildir/maildir-storage.h	Mon Oct 29 18:32:40 2012 +0200
+++ b/src/lib-storage/index/maildir/maildir-storage.h	Mon Oct 29 19:52:21 2012 +0200
@@ -5,7 +5,6 @@
 
 #define MAILDIR_STORAGE_NAME "maildir"
 #define MAILDIR_SUBSCRIPTION_FILE_NAME "subscriptions"
-#define MAILDIR_INDEX_PREFIX "dovecot.index"
 #define MAILDIR_UIDVALIDITY_FNAME "dovecot-uidvalidity"
 
 /* "base,S=123:2," means:
diff -r f423090a363a -r 15dfd6475f64 src/lib-storage/index/mbox/mbox-storage.c
--- a/src/lib-storage/index/mbox/mbox-storage.c	Mon Oct 29 18:32:40 2012 +0200
+++ b/src/lib-storage/index/mbox/mbox-storage.c	Mon Oct 29 19:52:21 2012 +0200
@@ -366,8 +366,7 @@
 	mbox->box.list = list;
 	mbox->box.mail_vfuncs = &mbox_mail_vfuncs;
 
-	index_storage_mailbox_alloc(&mbox->box, vname,
-				    flags, MBOX_INDEX_PREFIX);
+	index_storage_mailbox_alloc(&mbox->box, vname, flags, MAIL_INDEX_PREFIX);
 
 	mbox->storage = (struct mbox_storage *)storage;
 	mbox->mbox_fd = -1;
diff -r f423090a363a -r 15dfd6475f64 src/lib-storage/index/mbox/mbox-storage.h
--- a/src/lib-storage/index/mbox/mbox-storage.h	Mon Oct 29 18:32:40 2012 +0200
+++ b/src/lib-storage/index/mbox/mbox-storage.h	Mon Oct 29 19:52:21 2012 +0200
@@ -12,7 +12,6 @@
 
 #define MBOX_STORAGE_NAME "mbox"
 #define MBOX_SUBSCRIPTION_FILE_NAME ".subscriptions"
-#define MBOX_INDEX_PREFIX "dovecot.index"
 #define MBOX_INDEX_DIR_NAME ".imap"
 #define MBOX_UIDVALIDITY_FNAME "dovecot-uidvalidity"
 
diff -r f423090a363a -r 15dfd6475f64 src/lib-storage/index/pop3c/pop3c-storage.c
--- a/src/lib-storage/index/pop3c/pop3c-storage.c	Mon Oct 29 18:32:40 2012 +0200
+++ b/src/lib-storage/index/pop3c/pop3c-storage.c	Mon Oct 29 19:52:21 2012 +0200
@@ -114,8 +114,7 @@
 	mbox->box.mail_vfuncs = &pop3c_mail_vfuncs;
 	mbox->storage = (struct pop3c_storage *)storage;
 
-	index_storage_mailbox_alloc(&mbox->box, vname, flags,
-				    POP3C_INDEX_PREFIX);
+	index_storage_mailbox_alloc(&mbox->box, vname, flags, MAIL_INDEX_PREFIX);
 	return &mbox->box;
 }
 
diff -r f423090a363a -r 15dfd6475f64 src/lib-storage/index/pop3c/pop3c-storage.h
--- a/src/lib-storage/index/pop3c/pop3c-storage.h	Mon Oct 29 18:32:40 2012 +0200
+++ b/src/lib-storage/index/pop3c/pop3c-storage.h	Mon Oct 29 19:52:21 2012 +0200
@@ -4,7 +4,6 @@
 #include "index-storage.h"
 
 #define POP3C_STORAGE_NAME "pop3c"
-#define POP3C_INDEX_PREFIX "dovecot.index"
 
 struct pop3c_storage {
 	struct mail_storage storage;
diff -r f423090a363a -r 15dfd6475f64 src/lib-storage/mail-storage-private.h
--- a/src/lib-storage/mail-storage-private.h	Mon Oct 29 18:32:40 2012 +0200
+++ b/src/lib-storage/mail-storage-private.h	Mon Oct 29 19:52:21 2012 +0200
@@ -9,6 +9,9 @@
 #include "mail-storage-settings.h"
 #include "mail-index-private.h"
 
+/* Default prefix for indexes */
+#define MAIL_INDEX_PREFIX "dovecot.index"
+
 /* Block size when read()ing message header. */
 #define MAIL_READ_HDR_BLOCK_SIZE (1024*4)
 /* Block size when read()ing message (header and) body. */
diff -r f423090a363a -r 15dfd6475f64 src/plugins/virtual/virtual-storage.c
--- a/src/plugins/virtual/virtual-storage.c	Mon Oct 29 18:32:40 2012 +0200
+++ b/src/plugins/virtual/virtual-storage.c	Mon Oct 29 19:52:21 2012 +0200
@@ -229,8 +229,7 @@
 	mbox->box.mail_vfuncs = &virtual_mail_vfuncs;
 	mbox->vfuncs = virtual_mailbox_vfuncs;
 
-	index_storage_mailbox_alloc(&mbox->box, vname, flags,
-				    VIRTUAL_INDEX_PREFIX);
+	index_storage_mailbox_alloc(&mbox->box, vname, flags, MAIL_INDEX_PREFIX);
 
 	mbox->storage = storage;
 	mbox->virtual_ext_id = (uint32_t)-1;
diff -r f423090a363a -r 15dfd6475f64 src/plugins/virtual/virtual-storage.h
--- a/src/plugins/virtual/virtual-storage.h	Mon Oct 29 18:32:40 2012 +0200
+++ b/src/plugins/virtual/virtual-storage.h	Mon Oct 29 19:52:21 2012 +0200
@@ -7,7 +7,6 @@
 #define VIRTUAL_STORAGE_NAME "virtual"
 #define VIRTUAL_SUBSCRIPTION_FILE_NAME ".virtual-subscriptions"
 #define VIRTUAL_CONFIG_FNAME "dovecot-virtual"
-#define VIRTUAL_INDEX_PREFIX "dovecot.index"
 
 #define VIRTUAL_CONTEXT(obj) \
 	MODULE_CONTEXT(obj, virtual_storage_module)


More information about the dovecot-cvs mailing list