Skip to content

Commit

Permalink
auth: Use sql_init_full
Browse files Browse the repository at this point in the history
  • Loading branch information
cmouse authored and villesavolainen committed Nov 14, 2018
1 parent 0dc7ed0 commit 19b8094
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/auth/db-sql.c
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 19b8094

Please sign in to comment.