|
@@ -29,6 +29,7 @@
|
|
|
#include "../../mem/mem.h"
|
|
|
#include "../../dprint.h"
|
|
|
#include "../../ut.h"
|
|
|
+#include "../../tls_hooks_init.h"
|
|
|
#include <string.h>
|
|
|
#include <time.h>
|
|
|
|
|
@@ -74,6 +75,9 @@ struct pg_con* db_postgres_new_connection(struct db_id* id)
|
|
|
ZSW(id->database));
|
|
|
}
|
|
|
|
|
|
+ /* don't attempt to re-init openssl if done already */
|
|
|
+ if(tls_loaded()) PQinitSSL(0);
|
|
|
+
|
|
|
ptr->con = PQsetdbLogin(id->host, ports, NULL, NULL, id->database, id->username, id->password);
|
|
|
LM_DBG("PQsetdbLogin(%p)\n", ptr->con);
|
|
|
|