dovecot-2.0-sieve: Plugin support: removed ability to have dupli...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Fri Jan 1 15:22:18 EET 2010


details:   http://hg.rename-it.nl/dovecot-2.0-sieve/rev/3fb7c386f01c
changeset: 1168:3fb7c386f01c
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Fri Jan 01 14:22:13 2010 +0100
description:
Plugin support: removed ability to have duplicate plugins in different directories.

diffstat:

 src/lib-sieve/sieve-plugins.c |  21 ++++-----------------
 1 files changed, 4 insertions(+), 17 deletions(-)

diffs (48 lines):

diff -r 8af2f734b1df -r 3fb7c386f01c src/lib-sieve/sieve-plugins.c
--- a/src/lib-sieve/sieve-plugins.c	Thu Dec 31 20:02:40 2009 +0100
+++ b/src/lib-sieve/sieve-plugins.c	Fri Jan 01 14:22:13 2010 +0100
@@ -23,32 +23,19 @@
 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;
-		size_t len;
+		const char *mod_name;
 		
-		/* 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 */
 
 		mod_name = module_get_plugin_name(module);
 		
-		if ( strcmp(mod_path, path) == 0 && strcmp(mod_name, name) == 0 )
+		if ( strcmp(mod_name, name) == 0 )
 			return module;
 
 		module = module->next;
@@ -119,7 +106,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