]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Allow configuring passdb/userdb sql to use auth-workers
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 17 Feb 2025 10:39:11 +0000 (12:39 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 24 Feb 2025 09:38:59 +0000 (09:38 +0000)
If passdb/userdb_use_worker=yes, this overrides the sql-driver specific
worker decision.

src/auth/passdb-sql.c
src/auth/userdb-sql.c

index 614344f66a4d0df607f580d424b6286e3cb6f47e..db1990dc47297f70f5404b303ee15e74cb34d55f 100644 (file)
@@ -321,7 +321,8 @@ static void passdb_sql_init(struct passdb_module *_module)
        enum sql_db_flags flags;
 
        flags = sql_get_flags(module->db);
-       module->module.blocking = (flags & SQL_DB_FLAG_BLOCKING) != 0;
+       if (!module->module.blocking)
+               module->module.blocking = (flags & SQL_DB_FLAG_BLOCKING) != 0;
 
        if (!module->module.blocking || worker)
                db_sql_connect(module->db);
index 671f494d82fbfb9f632452b92015f1e6ad5f388c..f97fe5e316c632c1e467834be528903624da7e23 100644 (file)
@@ -334,7 +334,8 @@ static void userdb_sql_init(struct userdb_module *_module)
        enum sql_db_flags flags;
 
        flags = sql_get_flags(module->db);
-       _module->blocking = (flags & SQL_DB_FLAG_BLOCKING) != 0;
+       if (!_module->blocking)
+               _module->blocking = (flags & SQL_DB_FLAG_BLOCKING) != 0;
 
        if (!_module->blocking || worker)
                db_sql_connect(module->db);