mirror of https://git.kore.io/kore.git
Check connection string right before we connect
This commit is contained in:
parent
6cabe00740
commit
a35a5182a7
|
@ -56,9 +56,6 @@ char *pgsql_conn_string = NULL;
|
|||
void
|
||||
kore_pgsql_init(void)
|
||||
{
|
||||
if (pgsql_conn_string == NULL)
|
||||
fatal("No pgsql connection string set");
|
||||
|
||||
pgsql_conn_count = 0;
|
||||
TAILQ_INIT(&pgsql_conn_free);
|
||||
}
|
||||
|
@ -247,6 +244,9 @@ pgsql_conn_create(struct http_request *req, int idx)
|
|||
{
|
||||
struct pgsql_conn *conn;
|
||||
|
||||
if (pgsql_conn_string == NULL)
|
||||
fatal("pgsql_conn_create: no connection string");
|
||||
|
||||
pgsql_conn_count++;
|
||||
conn = kore_malloc(sizeof(*conn));
|
||||
kore_debug("pgsql_conn_create(): %p", conn);
|
||||
|
|
Loading…
Reference in New Issue