dovecot-1.2-sieve: Plugin support: removed ability to have dupli...
pigeonhole at rename-it.nl
pigeonhole at rename-it.nl
Fri Jan 1 14:54:54 EET 2010
details: http://hg.rename-it.nl/dovecot-1.2-sieve/rev/058ebebc2cb4
changeset: 1175:058ebebc2cb4
user: Stephan Bosch <stephan at rename-it.nl>
date: Fri Jan 01 13:54:49 2010 +0100
description:
Plugin support: removed ability to have duplicate plugins in different directories.
diffstat:
src/lib-sieve/sieve-plugins.c | 22 +++++-----------------
1 files changed, 5 insertions(+), 17 deletions(-)
diffs (60 lines):
diff -r 731a0a7f0c1a -r 058ebebc2cb4 src/lib-sieve/sieve-plugins.c
--- a/src/lib-sieve/sieve-plugins.c Thu Dec 31 20:03:50 2009 +0100
+++ b/src/lib-sieve/sieve-plugins.c Fri Jan 01 13:54:49 2010 +0100
@@ -23,27 +23,15 @@
static struct module *sieve_modules = NULL;
static int sieve_modules_refcount = 0;
-static struct module *sieve_plugin_module_find(const char *path, const char *name)
+static struct module *sieve_plugin_module_find(const char *name)
{
struct module *module;
module = sieve_modules;
while ( module != NULL ) {
- const char *mod_path, *mod_name;
- char *p;
+ const char *mod_name;
size_t len;
- /* Strip module paths */
-
- p = strrchr(module->path, '/');
- if ( p == NULL ) continue;
- while ( p > module->path && *p == '/' ) p--;
- mod_path = t_strdup_until(module->path, p+1);
-
- len = strlen(path);
- if ( path[len-1] == '/' )
- path = t_strndup(path, len-1);
-
/* Strip module names */
len = strlen(module->name);
@@ -52,7 +40,7 @@
else
mod_name = module->name;
- if ( strcmp(mod_path, path) == 0 && strcmp(mod_name, name) == 0 )
+ if ( strcmp(mod_name, name) == 0 )
return module;
module = module->next;
@@ -97,7 +85,7 @@
for (i = 0; module_names[i] != NULL; i++) {
const char *name = module_names[i];
- if ( sieve_plugin_module_find(path, name) == NULL ) {
+ if ( sieve_plugin_module_find(name) == NULL ) {
if ( i > 0 ) str_append_c(missing_modules, ' ');
str_append(missing_modules, name);
@@ -134,7 +122,7 @@
void (*load_func)(struct sieve_instance *svinst);
/* Find the module */
- module = sieve_plugin_module_find(path, name);
+ module = sieve_plugin_module_find(name);
i_assert(module != NULL);
/* Check whether the plugin is already loaded in this instance */
More information about the dovecot-cvs
mailing list