dovecot-2.2: mailbox_list_index=yes: Fixed refreshing list index...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Oct 23 20:46:49 EEST 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/92d5b8133bf2
changeset: 15240:92d5b8133bf2
user: Timo Sirainen <tss at iki.fi>
date: Tue Oct 23 20:46:35 2012 +0300
description:
mailbox_list_index=yes: Fixed refreshing list index after mailbox was created.
diffstat:
src/lib-storage/list/mailbox-list-index.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diffs (33 lines):
diff -r 488791e8c8d7 -r 92d5b8133bf2 src/lib-storage/list/mailbox-list-index.c
--- a/src/lib-storage/list/mailbox-list-index.c Tue Oct 23 20:46:12 2012 +0300
+++ b/src/lib-storage/list/mailbox-list-index.c Tue Oct 23 20:46:35 2012 +0300
@@ -420,6 +420,19 @@
}
static int
+mailbox_list_index_create_mailbox(struct mailbox *box,
+ const struct mailbox_update *update,
+ bool directory)
+{
+ struct index_list_mailbox *ibox = INDEX_LIST_STORAGE_CONTEXT(box);
+
+ if (ibox->module_ctx.super.create_box(box, update, directory) < 0)
+ return -1;
+ mailbox_list_index_refresh_later(box->list);
+ return 0;
+}
+
+static int
mailbox_list_index_delete_mailbox(struct mailbox_list *list, const char *name)
{
struct mailbox_list_index *ilist = INDEX_LIST_CONTEXT(list);
@@ -569,6 +582,9 @@
ibox->module_ctx.super = box->v;
MODULE_CONTEXT_SET(box, index_list_storage_module, ibox);
+ /* for layout=index this gets overridden */
+ box->v.create_box = mailbox_list_index_create_mailbox;
+
mailbox_list_index_status_init_mailbox(box);
mailbox_list_index_backend_init_mailbox(box);
}
More information about the dovecot-cvs
mailing list