dovecot-2.0: mdbox: Storage rebuild panics now earlier if its na...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Mar 19 15:35:14 EET 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/de26a4054910
changeset: 10949:de26a4054910
user: Timo Sirainen <tss at iki.fi>
date: Fri Mar 19 15:34:39 2010 +0200
description:
mdbox: Storage rebuild panics now earlier if its namespace unexpectedly isn't found.
diffstat:
src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (25 lines):
diff -r ae9d00b1ffdd -r de26a4054910 src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c
--- a/src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c Fri Mar 19 15:19:49 2010 +0200
+++ b/src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c Fri Mar 19 15:34:39 2010 +0200
@@ -522,16 +522,17 @@
static int rebuild_mailboxes(struct mdbox_storage_rebuild_context *ctx)
{
- struct mail_user *user = ctx->storage->storage.storage.user;
+ struct mail_storage *storage = &ctx->storage->storage.storage;
struct mail_namespace *ns;
- for (ns = user->namespaces; ns != NULL; ns = ns->next) {
- if (ns->storage == &ctx->storage->storage.storage &&
- ns->alias_for == NULL) {
+ for (ns = storage->user->namespaces; ns != NULL; ns = ns->next) {
+ if (ns->storage == storage && ns->alias_for == NULL) {
if (rebuild_namespace_mailboxes(ctx, ns) < 0)
return -1;
}
}
+ if (ctx->default_list == NULL)
+ i_panic("No namespace found for storage=%s", storage->name);
return 0;
}
More information about the dovecot-cvs
mailing list