]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dict: Register dicts only after loading modules. This allows using SQL drivers from...
authorTimo Sirainen <tss@iki.fi>
Sun, 5 Oct 2008 11:22:13 +0000 (14:22 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 5 Oct 2008 11:22:13 +0000 (14:22 +0300)
--HG--
branch : HEAD

src/dict/main.c

index 716be34fe46882043abd5b9959ef1b6c2af2ed9e..e2b78145c4344de720ca9d754c27d4e8673ca2df 100644 (file)
@@ -74,11 +74,13 @@ 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;
        if (path == NULL)