# HG changeset patch # User Timo Sirainen # Date 1223205733 -10800 # Node ID 5ed1662b3f5e592e1276a5459f8c59f5f06e77fe # Parent c283babd0ab1f2f5797f584cfa519a82fde54eb9 dict: Register dicts only after loading modules. This allows using SQL drivers from modules. 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,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)