From: Timo Sirainen Date: Mon, 17 Feb 2025 10:39:11 +0000 (+0200) Subject: auth: Allow configuring passdb/userdb sql to use auth-workers X-Git-Tag: 2.4.1~167 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc8b418647b58cf5166713bd638fe136d6228d29;p=thirdparty%2Fdovecot%2Fcore.git auth: Allow configuring passdb/userdb sql to use auth-workers If passdb/userdb_use_worker=yes, this overrides the sql-driver specific worker decision. --- diff --git a/src/auth/passdb-sql.c b/src/auth/passdb-sql.c index 614344f66a..db1990dc47 100644 --- a/src/auth/passdb-sql.c +++ b/src/auth/passdb-sql.c @@ -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); diff --git a/src/auth/userdb-sql.c b/src/auth/userdb-sql.c index 671f494d82..f97fe5e316 100644 --- a/src/auth/userdb-sql.c +++ b/src/auth/userdb-sql.c @@ -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);