dovecot-2.0: imap-* plugins: Use the new imap_client_created_hoo...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Oct 4 17:13:24 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/1df6a392a613
changeset: 12237:1df6a392a613
user: Timo Sirainen <tss at iki.fi>
date: Mon Oct 04 15:13:20 2010 +0100
description:
imap-* plugins: Use the new imap_client_created_hook_set() to set the hook.
This avoids accessing variables directly, which allows Dovecot to give better
error messages if imap-* plugins are tried to be loaded by non-imap binary.
diffstat:
src/plugins/imap-acl/imap-acl-plugin.c | 6 +++---
src/plugins/imap-quota/imap-quota-plugin.c | 6 +++---
src/plugins/imap-zlib/imap-zlib-plugin.c | 6 +++---
3 files changed, 9 insertions(+), 9 deletions(-)
diffs (68 lines):
diff -r 31a34cff1ebe -r 1df6a392a613 src/plugins/imap-acl/imap-acl-plugin.c
--- a/src/plugins/imap-acl/imap-acl-plugin.c Mon Oct 04 15:12:23 2010 +0100
+++ b/src/plugins/imap-acl/imap-acl-plugin.c Mon Oct 04 15:13:20 2010 +0100
@@ -684,8 +684,8 @@
command_register("DELETEACL", cmd_deleteacl, 0);
imap_acl_module = module;
- next_hook_client_created = hook_client_created;
- hook_client_created = imap_acl_client_created;
+ next_hook_client_created =
+ imap_client_created_hook_set(imap_acl_client_created);
}
void imap_acl_plugin_deinit(void)
@@ -696,7 +696,7 @@
command_unregister("DELETEACL");
command_unregister("LISTRIGHTS");
- hook_client_created = next_hook_client_created;
+ imap_client_created_hook_set(next_hook_client_created);
}
const char *imap_acl_plugin_dependencies[] = { "acl", NULL };
diff -r 31a34cff1ebe -r 1df6a392a613 src/plugins/imap-quota/imap-quota-plugin.c
--- a/src/plugins/imap-quota/imap-quota-plugin.c Mon Oct 04 15:12:23 2010 +0100
+++ b/src/plugins/imap-quota/imap-quota-plugin.c Mon Oct 04 15:13:20 2010 +0100
@@ -221,8 +221,8 @@
command_register("SETQUOTA", cmd_setquota, 0);
imap_quota_module = module;
- next_hook_client_created = hook_client_created;
- hook_client_created = imap_quota_client_created;
+ next_hook_client_created =
+ imap_client_created_hook_set(imap_quota_client_created);
}
void imap_quota_plugin_deinit(void)
@@ -231,7 +231,7 @@
command_unregister("GETQUOTA");
command_unregister("SETQUOTA");
- hook_client_created = next_hook_client_created;
+ imap_client_created_hook_set(next_hook_client_created);
}
const char *imap_quota_plugin_dependencies[] = { "quota", NULL };
diff -r 31a34cff1ebe -r 1df6a392a613 src/plugins/imap-zlib/imap-zlib-plugin.c
--- a/src/plugins/imap-zlib/imap-zlib-plugin.c Mon Oct 04 15:12:23 2010 +0100
+++ b/src/plugins/imap-zlib/imap-zlib-plugin.c Mon Oct 04 15:13:20 2010 +0100
@@ -145,15 +145,15 @@
command_register("COMPRESS", cmd_compress, 0);
imap_zlib_module = module;
- next_hook_client_created = hook_client_created;
- hook_client_created = imap_zlib_client_created;
+ next_hook_client_created =
+ imap_client_created_hook_set(imap_zlib_client_created);
}
void imap_zlib_plugin_deinit(void)
{
command_unregister("COMPRESS");
- hook_client_created = next_hook_client_created;
+ imap_client_created_hook_set(next_hook_client_created);
}
const char *imap_zlib_plugin_dependencies[] = { "zlib", NULL };
More information about the dovecot-cvs
mailing list