dovecot-1.2: Call next hook_mail_namespaces_created in correct o...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Nov 24 00:08:08 EET 2008
details: http://hg.dovecot.org/dovecot-1.2/rev/cee696a95320
changeset: 8487:cee696a95320
user: Timo Sirainen <tss at iki.fi>
date: Mon Nov 24 00:08:03 2008 +0200
description:
Call next hook_mail_namespaces_created in correct order.
diffstat:
2 files changed, 17 insertions(+), 21 deletions(-)
src/plugins/autocreate/autocreate-plugin.c | 6 ++---
src/plugins/trash/trash-plugin.c | 32 ++++++++++++----------------
diffs (65 lines):
diff -r 23620e05e7c8 -r cee696a95320 src/plugins/autocreate/autocreate-plugin.c
--- a/src/plugins/autocreate/autocreate-plugin.c Mon Nov 24 00:06:15 2008 +0200
+++ b/src/plugins/autocreate/autocreate-plugin.c Mon Nov 24 00:08:03 2008 +0200
@@ -55,11 +55,11 @@ static void
static void
autocreate_mail_namespaces_created(struct mail_namespace *namespaces)
{
+ autocreate_mailboxes(namespaces);
+ autosubscribe_mailboxes(namespaces);
+
if (autocreate_next_hook_mail_namespaces_created != NULL)
autocreate_next_hook_mail_namespaces_created(namespaces);
-
- autocreate_mailboxes(namespaces);
- autosubscribe_mailboxes(namespaces);
}
void autocreate_plugin_init(void)
diff -r 23620e05e7c8 -r cee696a95320 src/plugins/trash/trash-plugin.c
--- a/src/plugins/trash/trash-plugin.c Mon Nov 24 00:06:15 2008 +0200
+++ b/src/plugins/trash/trash-plugin.c Mon Nov 24 00:08:03 2008 +0200
@@ -302,29 +302,25 @@ trash_hook_mail_namespaces_created(struc
struct trash_user *tuser;
const char *env;
- if (trash_next_hook_mail_namespaces_created != NULL)
- trash_next_hook_mail_namespaces_created(namespaces);
-
env = getenv("TRASH");
if (env == NULL) {
if (getenv("DEBUG") != NULL)
i_info("trash: No trash setting - plugin disabled");
- return;
- }
-
- if (quota_set == NULL) {
+ } else if (quota_set == NULL) {
i_error("trash plugin: quota plugin not initialized");
- return;
- }
-
- tuser = p_new(user->pool, struct trash_user, 1);
- tuser->module_ctx.super = user->v;
- MODULE_CONTEXT_SET(user, trash_user_module, tuser);
-
- if (read_configuration(user, env) == 0) {
- trash_next_quota_test_alloc = quota_set->test_alloc;
- quota_set->test_alloc = trash_quota_test_alloc;
- }
+ } else {
+ tuser = p_new(user->pool, struct trash_user, 1);
+ tuser->module_ctx.super = user->v;
+ MODULE_CONTEXT_SET(user, trash_user_module, tuser);
+
+ if (read_configuration(user, env) == 0) {
+ trash_next_quota_test_alloc = quota_set->test_alloc;
+ quota_set->test_alloc = trash_quota_test_alloc;
+ }
+ }
+
+ if (trash_next_hook_mail_namespaces_created != NULL)
+ trash_next_hook_mail_namespaces_created(namespaces);
}
void trash_plugin_init(void)
More information about the dovecot-cvs
mailing list