dovecot-2.2: dbox: Renamed dbox_sync_rebuild_verify_alt_storage(...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Sep 25 17:38:15 EEST 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/89c319980584
changeset: 15095:89c319980584
user: Timo Sirainen <tss at iki.fi>
date: Tue Sep 25 17:31:15 2012 +0300
description:
dbox: Renamed dbox_sync_rebuild_verify_alt_storage() to dbox_verify_alt_storage()
diffstat:
src/lib-storage/index/dbox-common/dbox-storage.c | 29 ++++++++++++++++
src/lib-storage/index/dbox-common/dbox-storage.h | 1 +
src/lib-storage/index/dbox-common/dbox-sync-rebuild.c | 29 ----------------
src/lib-storage/index/dbox-common/dbox-sync-rebuild.h | 1 -
src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c | 2 +-
src/lib-storage/index/dbox-single/sdbox-sync-rebuild.c | 2 +-
6 files changed, 32 insertions(+), 32 deletions(-)
diffs (116 lines):
diff -r 200ec10b2314 -r 89c319980584 src/lib-storage/index/dbox-common/dbox-storage.c
--- a/src/lib-storage/index/dbox-common/dbox-storage.c Mon Sep 24 16:33:07 2012 +0300
+++ b/src/lib-storage/index/dbox-common/dbox-storage.c Tue Sep 25 17:31:15 2012 +0300
@@ -286,3 +286,32 @@
return mail_index_sync_commit(&sync_ctx);
}
+
+int dbox_verify_alt_storage(struct mailbox_list *list)
+{
+ const char *alt_path, *error;
+ struct stat st;
+
+ alt_path = mailbox_list_get_root_path(list, MAILBOX_LIST_PATH_TYPE_ALT_DIR);
+ if (alt_path == NULL)
+ return 0;
+
+ /* make sure alt storage is mounted. if it's not, abort the rebuild. */
+ if (stat(alt_path, &st) == 0)
+ return 0;
+ if (errno != ENOENT) {
+ i_error("stat(%s) failed: %m", alt_path);
+ return -1;
+ }
+
+ /* try to create the alt directory. if it fails, it means alt
+ storage isn't mounted. */
+ if (mailbox_list_mkdir_root(list, alt_path,
+ MAILBOX_LIST_PATH_TYPE_ALT_DIR,
+ &error) < 0) {
+ i_error("Couldn't create dbox alt root dir %s: %s",
+ alt_path, error);
+ return -1;
+ }
+ return 0;
+}
diff -r 200ec10b2314 -r 89c319980584 src/lib-storage/index/dbox-common/dbox-storage.h
--- a/src/lib-storage/index/dbox-common/dbox-storage.h Mon Sep 24 16:33:07 2012 +0300
+++ b/src/lib-storage/index/dbox-common/dbox-storage.h Tue Sep 25 17:31:15 2012 +0300
@@ -67,5 +67,6 @@
int dbox_mailbox_open(struct mailbox *box);
int dbox_mailbox_create(struct mailbox *box,
const struct mailbox_update *update, bool directory);
+int dbox_verify_alt_storage(struct mailbox_list *list);
#endif
diff -r 200ec10b2314 -r 89c319980584 src/lib-storage/index/dbox-common/dbox-sync-rebuild.c
--- a/src/lib-storage/index/dbox-common/dbox-sync-rebuild.c Mon Sep 24 16:33:07 2012 +0300
+++ b/src/lib-storage/index/dbox-common/dbox-sync-rebuild.c Tue Sep 25 17:31:15 2012 +0300
@@ -201,32 +201,3 @@
}
i_free(ctx);
}
-
-int dbox_sync_rebuild_verify_alt_storage(struct mailbox_list *list)
-{
- const char *alt_path, *error;
- struct stat st;
-
- alt_path = mailbox_list_get_root_path(list, MAILBOX_LIST_PATH_TYPE_ALT_DIR);
- if (alt_path == NULL)
- return 0;
-
- /* make sure alt storage is mounted. if it's not, abort the rebuild. */
- if (stat(alt_path, &st) == 0)
- return 0;
- if (errno != ENOENT) {
- i_error("stat(%s) failed: %m", alt_path);
- return -1;
- }
-
- /* try to create the alt directory. if it fails, it means alt
- storage isn't mounted. */
- if (mailbox_list_mkdir_root(list, alt_path,
- MAILBOX_LIST_PATH_TYPE_ALT_DIR,
- &error) < 0) {
- i_error("Couldn't create dbox alt root dir %s: %s",
- alt_path, error);
- return -1;
- }
- return 0;
-}
diff -r 200ec10b2314 -r 89c319980584 src/lib-storage/index/dbox-common/dbox-sync-rebuild.h
--- a/src/lib-storage/index/dbox-common/dbox-sync-rebuild.h Mon Sep 24 16:33:07 2012 +0300
+++ b/src/lib-storage/index/dbox-common/dbox-sync-rebuild.h Tue Sep 25 17:31:15 2012 +0300
@@ -25,6 +25,5 @@
void dbox_sync_rebuild_index_metadata(struct dbox_sync_rebuild_context *ctx,
uint32_t new_seq, uint32_t uid);
-int dbox_sync_rebuild_verify_alt_storage(struct mailbox_list *list);
#endif
diff -r 200ec10b2314 -r 89c319980584 src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c
--- a/src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c Mon Sep 24 16:33:07 2012 +0300
+++ b/src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c Tue Sep 25 17:31:15 2012 +0300
@@ -879,7 +879,7 @@
struct mdbox_storage_rebuild_context *ctx;
int ret;
- if (dbox_sync_rebuild_verify_alt_storage(storage->map->root_list) < 0) {
+ if (dbox_verify_alt_storage(storage->map->root_list) < 0) {
mail_storage_set_critical(&storage->storage.storage,
"mdbox rebuild: Alt storage %s not mounted, aborting",
storage->alt_storage_dir);
diff -r 200ec10b2314 -r 89c319980584 src/lib-storage/index/dbox-single/sdbox-sync-rebuild.c
--- a/src/lib-storage/index/dbox-single/sdbox-sync-rebuild.c Mon Sep 24 16:33:07 2012 +0300
+++ b/src/lib-storage/index/dbox-single/sdbox-sync-rebuild.c Tue Sep 25 17:31:15 2012 +0300
@@ -197,7 +197,7 @@
}
i_warning("sdbox %s: Rebuilding index", mailbox_get_path(&mbox->box));
- if (dbox_sync_rebuild_verify_alt_storage(mbox->box.list) < 0) {
+ if (dbox_verify_alt_storage(mbox->box.list) < 0) {
mail_storage_set_critical(mbox->box.storage,
"sdbox %s: Alt storage not mounted, "
"aborting index rebuild", mailbox_get_path(&mbox->box));
More information about the dovecot-cvs
mailing list