dovecot-1.2: dict: Register dicts only after loading modules. Th...
    dovecot at dovecot.org 
    dovecot at dovecot.org
       
    Sun Oct  5 14:22:35 EEST 2008
    
    
  
details:   http://hg.dovecot.org/dovecot-1.2/rev/5ed1662b3f5e
changeset: 8231:5ed1662b3f5e
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Oct 05 14:22:13 2008 +0300
description:
dict: Register dicts only after loading modules. This allows using SQL drivers from modules.
diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
src/dict/main.c |    6 ++++--
diffs (18 lines):
diff -r c283babd0ab1 -r 5ed1662b3f5e src/dict/main.c
--- a/src/dict/main.c	Sun Oct 05 14:07:00 2008 +0300
+++ b/src/dict/main.c	Sun Oct 05 14:22:13 2008 +0300
@@ -74,10 +74,12 @@ static void main_init(void)
 	/* If master dies, the log fd gets closed and we'll quit */
 	log_io = io_add(STDERR_FILENO, IO_ERROR, log_error_callback, NULL);
 
-	dict_drivers_register_all();
-
 	modules = module_dir_load(DICT_MODULE_DIR, NULL, TRUE, version);
 	module_dir_init(modules);
+
+	/* Register only after loading modules. They may contain SQL drivers,
+	   which we'll need to register. */
+	dict_drivers_register_all();
 
 	path = getenv("DICT_LISTEN_FROM_FD");
 	fd = path == NULL ? -1 : DICT_MASTER_LISTENER_FD;
    
    
More information about the dovecot-cvs
mailing list