dovecot-2.0: lib-storage: Thread strmap must not be opened befor...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Feb 20 09:46:47 EET 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/0b139aae6276
changeset: 10781:0b139aae6276
user: Timo Sirainen <tss at iki.fi>
date: Sat Feb 20 09:46:43 2010 +0200
description:
lib-storage: Thread strmap must not be opened before index is opened.
diffstat:
src/lib-index/mail-index-strmap.c | 2 ++
src/lib-storage/index/index-storage.c | 3 +--
src/lib-storage/index/index-thread-private.h | 2 +-
src/lib-storage/index/index-thread.c | 2 +-
4 files changed, 5 insertions(+), 4 deletions(-)
diffs (55 lines):
diff -r f69f32ffa9c6 -r 0b139aae6276 src/lib-index/mail-index-strmap.c
--- a/src/lib-index/mail-index-strmap.c Sat Feb 20 09:33:01 2010 +0200
+++ b/src/lib-index/mail-index-strmap.c Sat Feb 20 09:46:43 2010 +0200
@@ -99,6 +99,8 @@
{
struct mail_index_strmap *strmap;
+ i_assert(index->open_count > 0);
+
strmap = i_new(struct mail_index_strmap, 1);
strmap->index = index;
strmap->path = i_strconcat(index->filepath, suffix, NULL);
diff -r f69f32ffa9c6 -r 0b139aae6276 src/lib-storage/index/index-storage.c
--- a/src/lib-storage/index/index-storage.c Sat Feb 20 09:33:01 2010 +0200
+++ b/src/lib-storage/index/index-storage.c Sat Feb 20 09:46:43 2010 +0200
@@ -243,6 +243,7 @@
box->opened = TRUE;
+ index_thread_mailbox_opened(box);
if (hook_mailbox_opened != NULL)
hook_mailbox_opened(box);
@@ -292,8 +293,6 @@
mail_index_set_permissions(box->index, box->file_create_mode,
box->file_create_gid,
box->file_create_gid_origin);
-
- index_thread_mailbox_allocated(box);
}
int index_storage_mailbox_enable(struct mailbox *box,
diff -r f69f32ffa9c6 -r 0b139aae6276 src/lib-storage/index/index-thread-private.h
--- a/src/lib-storage/index/index-thread-private.h Sat Feb 20 09:33:01 2010 +0200
+++ b/src/lib-storage/index/index-thread-private.h Sat Feb 20 09:46:43 2010 +0200
@@ -77,6 +77,6 @@
enum mail_thread_type thread_type,
bool return_seqs);
-void index_thread_mailbox_allocated(struct mailbox *box);
+void index_thread_mailbox_opened(struct mailbox *box);
#endif
diff -r f69f32ffa9c6 -r 0b139aae6276 src/lib-storage/index/index-thread.c
--- a/src/lib-storage/index/index-thread.c Sat Feb 20 09:33:01 2010 +0200
+++ b/src/lib-storage/index/index-thread.c Sat Feb 20 09:46:43 2010 +0200
@@ -639,7 +639,7 @@
i_free(tbox);
}
-void index_thread_mailbox_allocated(struct mailbox *box)
+void index_thread_mailbox_opened(struct mailbox *box)
{
struct mail_thread_mailbox *tbox;
More information about the dovecot-cvs
mailing list