dovecot-2.1-pigeonhole: lib-sieve: Fixed plugin module load func...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Wed Apr 3 00:09:30 EEST 2013


details:   http://hg.rename-it.nl/dovecot-2.1-pigeonhole/rev/5860cbaaffaa
changeset: 1680:5860cbaaffaa
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Tue Apr 02 23:09:14 2013 +0200
description:
lib-sieve: Fixed plugin module load functionality.
Initializing multiple Sieve instances would hang.

diffstat:

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

diffs (36 lines):

diff -r b086291b9b9a -r 5860cbaaffaa src/lib-sieve/sieve-plugins.c
--- a/src/lib-sieve/sieve-plugins.c	Thu Mar 28 22:12:03 2013 +0100
+++ b/src/lib-sieve/sieve-plugins.c	Tue Apr 02 23:09:14 2013 +0200
@@ -58,7 +58,7 @@
 void sieve_plugins_load
 (struct sieve_instance *svinst, const char *path, const char *plugins)
 {
-	struct module *new_modules, *module;
+	struct module *module;
 	struct module_dir_load_settings mod_set;
 	const char **module_names;
 	unsigned int i;
@@ -83,22 +83,9 @@
 
 	/* Load missing plugin modules */
 
-	new_modules = module_dir_load_missing
+	sieve_modules = module_dir_load_missing
 		(sieve_modules, path, plugins, &mod_set);
 
-	if ( sieve_modules == NULL ) {
-		/* No modules loaded yet */
-		sieve_modules = new_modules;
-	} else {
-		/* Find the end of the list */
-		module = sieve_modules;
-		while ( module != NULL && module->next != NULL )
-			module = module->next;
-
-		/* Add newly loaded modules */
-		module->next = new_modules;
-	}
-
 	/* Call plugin load functions for this Sieve instance */
 
 	if ( svinst->plugins == NULL ) {


More information about the dovecot-cvs mailing list