diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2007-10-14 22:58:05 +0200 |
---|---|---|
committer | Johannes Berg <johannes@sipsolutions.net> | 2007-10-14 22:58:05 +0200 |
commit | f5fc4e263ef1d688ef5ff9d7f57292da2c85273f (patch) | |
tree | 57274aa42673c8201b0116e1ab5720877f7c48be /antispam-plugin.c | |
parent | 6e213a0602b667ee56a893d438962aacc809cadb (diff) | |
download | dovecot-antispam-f5fc4e263ef1d688ef5ff9d7f57292da2c85273f.tar.gz dovecot-antispam-f5fc4e263ef1d688ef5ff9d7f57292da2c85273f.tar.xz dovecot-antispam-f5fc4e263ef1d688ef5ff9d7f57292da2c85273f.zip |
allow setting plugin name from config, using CONFIG=conffile instead of .config
Diffstat (limited to 'antispam-plugin.c')
-rw-r--r-- | antispam-plugin.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/antispam-plugin.c b/antispam-plugin.c index 1a8ee52..d737758 100644 --- a/antispam-plugin.c +++ b/antispam-plugin.c @@ -78,7 +78,14 @@ bool mailbox_is_unsure(struct mailbox *box) return mailbox_in_list(box, unsure_folders); } -void antispam_plugin_init(void) +#define __PLUGIN_FUNCTION(name, ioe) \ + name ## _plugin_ ## ioe +#define _PLUGIN_FUNCTION(name, ioe) \ + __PLUGIN_FUNCTION(name, ioe) +#define PLUGIN_FUNCTION(ioe) \ + _PLUGIN_FUNCTION(PLUGINNAME, ioe) + +void PLUGIN_FUNCTION(init)(void) { char *tmp, **iter; @@ -131,7 +138,7 @@ void antispam_plugin_init(void) hook_mail_storage_created = antispam_mail_storage_created; } -void antispam_plugin_deinit(void) +void PLUGIN_FUNCTION(deinit)(void) { hook_mail_storage_created = antispam_next_hook_mail_storage_created; backend_exit(); @@ -139,4 +146,4 @@ void antispam_plugin_deinit(void) } /* put dovecot version we built against into plugin for checking */ -const char *antispam_plugin_version = PACKAGE_VERSION; +const char *PLUGIN_FUNCTION(version) = PACKAGE_VERSION; |