dovecot-1.1: Call next hook_mail_namespaces_created in correct o...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Nov 24 00:08:11 EET 2008
details: http://hg.dovecot.org/dovecot-1.1/rev/4b876bc7bb38
changeset: 8023:4b876bc7bb38
user: Timo Sirainen <tss at iki.fi>
date: Mon Nov 24 00:08:02 2008 +0200
description:
Call next hook_mail_namespaces_created in correct order.
diffstat:
2 files changed, 14 insertions(+), 18 deletions(-)
src/plugins/lazy-expunge/lazy-expunge-plugin.c | 6 ++---
src/plugins/trash/trash-plugin.c | 26 ++++++++++--------------
diffs (68 lines):
diff -r a5779b758923 -r 4b876bc7bb38 src/plugins/lazy-expunge/lazy-expunge-plugin.c
--- a/src/plugins/lazy-expunge/lazy-expunge-plugin.c Sun Nov 23 23:54:11 2008 +0200
+++ b/src/plugins/lazy-expunge/lazy-expunge-plugin.c Mon Nov 24 00:08:02 2008 +0200
@@ -530,9 +530,6 @@ lazy_expunge_hook_mail_namespaces_create
const char *const *p;
int i;
- if (lazy_expunge_next_hook_mail_namespaces_created != NULL)
- lazy_expunge_next_hook_mail_namespaces_created(namespaces);
-
p = t_strsplit_spaces(getenv("LAZY_EXPUNGE"), " ");
for (i = 0; i < LAZY_NAMESPACE_COUNT; i++, p++) {
const char *name = *p;
@@ -554,6 +551,9 @@ lazy_expunge_hook_mail_namespaces_create
lstorage = LAZY_EXPUNGE_CONTEXT(lazy_namespaces[i]->storage);
lstorage->internal_namespace = TRUE;
}
+
+ if (lazy_expunge_next_hook_mail_namespaces_created != NULL)
+ lazy_expunge_next_hook_mail_namespaces_created(namespaces);
}
void lazy_expunge_plugin_init(void)
diff -r a5779b758923 -r 4b876bc7bb38 src/plugins/trash/trash-plugin.c
--- a/src/plugins/trash/trash-plugin.c Sun Nov 23 23:54:11 2008 +0200
+++ b/src/plugins/trash/trash-plugin.c Mon Nov 24 00:08:02 2008 +0200
@@ -289,30 +289,26 @@ trash_hook_mail_namespaces_created(struc
{
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;
- }
-
- config_pool = pool_alloconly_create("trash config",
+ } else {
+ config_pool = pool_alloconly_create("trash config",
sizeof(trash_boxes) +
BUFFER_APPROX_SIZE +
INIT_TRASH_MAILBOX_COUNT *
(sizeof(struct trash_mailbox) + 32));
- if (read_configuration(env) == 0) {
- trash_next_quota_test_alloc = quota_set->test_alloc;
- quota_set->test_alloc = trash_quota_test_alloc;
- }
+ if (read_configuration(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