Commit 2279d82a authored by Sebastien Decugis's avatar Sebastien Decugis
Browse files

Add check for pthread-safety of lib pgsql

parent e17df646
......@@ -77,6 +77,11 @@ int acct_db_init(void)
TRACE_ENTRY();
CHECK_PARAMS( acct_config && acct_config->conninfo && acct_config->tablename );
CHECK_PARAMS_DO( PQisthreadsafe() == 1, {
fd_log_debug("You PostGreSQL installation is not thread-safe!\n");
return EINVAL;
} );
/* Use the information from acct_config to create the connection and prepare the query */
conn = PQconnectdb(acct_config->conninfo);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment