dovecot-2.0: config: Unload modules at exit.

dovecot at dovecot.org dovecot at dovecot.org
Wed May 5 16:46:16 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/3fc759d5e736
changeset: 11265:3fc759d5e736
user:      Timo Sirainen <tss at iki.fi>
date:      Wed May 05 16:46:12 2010 +0300
description:
config: Unload modules at exit.

diffstat:

 src/config/config-parser.c |  3 ++-
 src/config/config-parser.h |  1 +
 src/config/doveconf.c      |  2 ++
 src/config/main.c          |  4 ++--
 4 files changed, 7 insertions(+), 3 deletions(-)

diffs (71 lines):

diff -r 3afbdf732a75 -r 3fc759d5e736 src/config/config-parser.c
--- a/src/config/config-parser.c	Tue May 04 22:00:41 2010 +0300
+++ b/src/config/config-parser.c	Wed May 05 16:46:12 2010 +0300
@@ -34,6 +34,7 @@
 
 struct config_module_parser *config_module_parsers;
 struct config_filter_context *config_filter;
+struct module *modules;
 
 static const char *info_type_name_find(const struct setting_parser_info *info)
 {
@@ -844,7 +845,7 @@
 void config_parse_load_modules(void)
 {
 	struct module_dir_load_settings mod_set;
-	struct module *modules, *m;
+	struct module *m;
 	const struct setting_parser_info **roots;
 	ARRAY_DEFINE(new_roots, const struct setting_parser_info *);
 	ARRAY_TYPE(service_settings) new_services;
diff -r 3afbdf732a75 -r 3fc759d5e736 src/config/config-parser.h
--- a/src/config/config-parser.h	Tue May 04 22:00:41 2010 +0300
+++ b/src/config/config-parser.h	Wed May 05 16:46:12 2010 +0300
@@ -12,6 +12,7 @@
 
 extern struct config_module_parser *config_module_parsers;
 extern struct config_filter_context *config_filter;
+extern struct module *modules;
 
 int config_parse_file(const char *path, bool expand_values, const char *module,
 		      const char **error_r);
diff -r 3afbdf732a75 -r 3fc759d5e736 src/config/doveconf.c
--- a/src/config/doveconf.c	Tue May 04 22:00:41 2010 +0300
+++ b/src/config/doveconf.c	Wed May 05 16:46:12 2010 +0300
@@ -3,6 +3,7 @@
 #include "lib.h"
 #include "array.h"
 #include "abspath.h"
+#include "module-dir.h"
 #include "env-util.h"
 #include "ostream.h"
 #include "str.h"
@@ -592,6 +593,7 @@
 		i_fatal("Errors in configuration");
 
 	config_filter_deinit(&config_filter);
+	module_dir_unload(&modules);
 	master_service_deinit(&master_service);
         return 0;
 }
diff -r 3afbdf732a75 -r 3fc759d5e736 src/config/main.c
--- a/src/config/main.c	Tue May 04 22:00:41 2010 +0300
+++ b/src/config/main.c	Wed May 05 16:46:12 2010 +0300
@@ -1,8 +1,7 @@
 /* Copyright (c) 2005-2010 Dovecot authors, see the included COPYING file */
 
 #include "lib.h"
-#include "array.h"
-#include "env-util.h"
+#include "module-dir.h"
 #include "restrict-access.h"
 #include "master-service.h"
 #include "config-connection.h"
@@ -37,6 +36,7 @@
 	config_connections_destroy_all();
 
 	config_filter_deinit(&config_filter);
+	module_dir_unload(&modules);
 	master_service_deinit(&master_service);
         return 0;
 }


More information about the dovecot-cvs mailing list