dovecot-2.2: lib-storage: After mailbox_list_init_fs() is finish...

dovecot at dovecot.org dovecot at dovecot.org
Tue May 5 13:25:56 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/5c80c7309635
changeset: 18525:5c80c7309635
user:      Timo Sirainen <tss at iki.fi>
date:      Tue May 05 16:24:07 2015 +0300
description:
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.

diffstat:

 src/lib-storage/mailbox-list.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff -r 25f29613908f -r 5c80c7309635 src/lib-storage/mailbox-list.c
--- 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;
 }
 


More information about the dovecot-cvs mailing list