From 19b80941c4972707758c6361896bd4c95e5aef97 Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Mon, 3 Sep 2018 13:59:41 +0300 Subject: [PATCH] auth: Use sql_init_full --- src/auth/db-sql.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/auth/db-sql.c b/src/auth/db-sql.c index 698f95e5b7..79936aed75 100644 --- a/src/auth/db-sql.c +++ b/src/auth/db-sql.c @@ -63,6 +63,7 @@ static const char *parse_setting(const char *key, const char *value, struct db_sql_connection *db_sql_init(const char *config_path, bool userdb) { struct db_sql_connection *conn; + struct sql_settings set; const char *error; pool_t pool; @@ -106,7 +107,12 @@ struct db_sql_connection *db_sql_init(const char *config_path, bool userdb) i_fatal("sql: connect string not set in configuration file %s", config_path); } - conn->db = sql_init(conn->set.driver, conn->set.connect); + i_zero(&set); + set.driver = conn->set.driver; + set.connect_string = conn->set.connect; + if (sql_init_full(&set, &conn->db, &error) < 0) { + i_fatal("sql: %s", error); + } conn->next = connections; connections = conn;