diff src/plugins/mbox-snarf/mbox-snarf-plugin.c @ 7462:068f6eefc62b HEAD

next_hook should be called after our hook is finished with its doings, that way they get executed in the intended order. This should fix some problems when multiple plugins are used.
author Timo Sirainen <tss@iki.fi>
date Fri, 25 Apr 2008 01:31:05 +0300
parents 7ed926ed7aa4
children 8e206e25a142
line wrap: on
line diff
--- a/src/plugins/mbox-snarf/mbox-snarf-plugin.c	Fri Apr 25 01:29:15 2008 +0300
+++ b/src/plugins/mbox-snarf/mbox-snarf-plugin.c	Fri Apr 25 01:31:05 2008 +0300
@@ -164,9 +164,6 @@
 {
 	struct mbox_snarf_mail_storage *mstorage;
 
-	if (mbox_snarf_next_hook_mail_storage_created != NULL)
-		mbox_snarf_next_hook_mail_storage_created(storage);
-
 	mstorage = p_new(storage->pool, struct mbox_snarf_mail_storage, 1);
 	mstorage->snarf_inbox_path =
 		p_strdup(storage->pool, home_expand(getenv("MBOX_SNARF")));
@@ -174,6 +171,9 @@
 	storage->v.mailbox_open = mbox_snarf_mailbox_open;
 
 	MODULE_CONTEXT_SET(storage, mbox_snarf_storage_module, mstorage);
+
+	if (mbox_snarf_next_hook_mail_storage_created != NULL)
+		mbox_snarf_next_hook_mail_storage_created(storage);
 }
 
 void mbox_snarf_plugin_init(void)