changeset 18525:5c80c7309635

lib-storage: After mailbox_list_init_fs() is finished, notify fs about it. Creating a separate fs_init_finish() would perhaps have been clearner, but it's a lot more work and usually isn't even necessary for most backends. So I simply chose to use fs_get_properties() which is a fast call in all fs backends and the few ones that actually care about the initialization finish can then do their work in there.
author Timo Sirainen <tss@iki.fi>
date Tue, 05 May 2015 16:24:07 +0300
parents 25f29613908f
children 2a2b3897dfe1
files src/lib-storage/mailbox-list.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/mailbox-list.c	Tue May 05 16:18:21 2015 +0300
+++ b/src/lib-storage/mailbox-list.c	Tue May 05 16:24:07 2015 +0300
@@ -1861,6 +1861,10 @@
 	ctx = p_new(list->pool, struct mailbox_list_fs_context, 1);
 	ctx->list = list;
 	MODULE_CONTEXT_SET(parent_fs, mailbox_list_fs_module, ctx);
+
+	/* a bit kludgy notification to the fs that we're now finished setting
+	   up the module context. */
+	(void)fs_get_properties(*fs_r);
 	return 0;
 }