dovecot-2.2: lib-storage: If hook is forced, don't bother checki...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Nov 1 16:44:38 EET 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/59979be53b9f
changeset: 16901:59979be53b9f
user: Timo Sirainen <tss at iki.fi>
date: Fri Nov 01 16:44:25 2013 +0200
description:
lib-storage: If hook is forced, don't bother checking if it's in user's mail_plugins.
diffstat:
src/lib-storage/mail-storage-hooks.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (19 lines):
diff -r aa8f6832a5e9 -r 59979be53b9f src/lib-storage/mail-storage-hooks.c
--- a/src/lib-storage/mail-storage-hooks.c Fri Nov 01 16:43:53 2013 +0200
+++ b/src/lib-storage/mail-storage-hooks.c Fri Nov 01 16:44:25 2013 +0200
@@ -146,9 +146,12 @@
t_array_init(&tmp_hooks, array_count(&module_hooks));
plugins = t_strsplit_spaces(user->set->mail_plugins, ", ");
array_foreach(&module_hooks, module_hook) {
- name = module_get_plugin_name(module_hook->module);
- if (str_array_find(plugins, name) || module_hook->forced)
- array_append(&tmp_hooks, module_hook, 1);
+ if (!module_hook->forced) {
+ name = module_get_plugin_name(module_hook->module);
+ if (!str_array_find(plugins, name))
+ continue;
+ }
+ array_append(&tmp_hooks, module_hook, 1);
}
/* next we have to sort them by the modules' priority (based on name) */
More information about the dovecot-cvs
mailing list