]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: After mailbox_list_init_fs() is finished, notify fs about it.
authorTimo Sirainen <tss@iki.fi>
Tue, 5 May 2015 13:24:07 +0000 (16:24 +0300)
committerTimo Sirainen <tss@iki.fi>
Tue, 5 May 2015 13:24:07 +0000 (16:24 +0300)
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.

src/lib-storage/mailbox-list.c

index d6ff34c8c88661502b1961de650755b9cf8fbc8a..fa5a8df3c6f2dc8118a5e4c3d4f0f76881e33067 100644 (file)
@@ -1861,6 +1861,10 @@ int mailbox_list_init_fs(struct mailbox_list *list, const char *driver,
        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;
 }