changeset 8231:5ed1662b3f5e HEAD

dict: Register dicts only after loading modules. This allows using SQL drivers from modules.
author Timo Sirainen <tss@iki.fi>
date Sun, 05 Oct 2008 14:22:13 +0300
parents c283babd0ab1
children cf74d1e2a458
files src/dict/main.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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,11 +74,13 @@
 	/* 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;
 	if (path == NULL)