Module: kamailio
Branch: master
Commit: 83966b2aaee656c0b18098f7e477190a8cb32c5c
URL:
https://github.com/kamailio/kamailio/commit/83966b2aaee656c0b18098f7e477190…
Author: Henning Westerholt <hw(a)skalatan.de>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2019-04-05T11:03:51+02:00
sqlops: fix reversed logic in db re-connecting handling (GH #1821)
---
Modified: src/modules/sqlops/sql_api.c
---
Diff:
https://github.com/kamailio/kamailio/commit/83966b2aaee656c0b18098f7e477190…
Patch:
https://github.com/kamailio/kamailio/commit/83966b2aaee656c0b18098f7e477190…
---
diff --git a/src/modules/sqlops/sql_api.c b/src/modules/sqlops/sql_api.c
index 87c4f2f229..f39da7fed8 100644
--- a/src/modules/sqlops/sql_api.c
+++ b/src/modules/sqlops/sql_api.c
@@ -161,7 +161,7 @@ int sql_connect(int mode)
sc->dbh = sc->dbf.init(&sc->db_url);
if (sc->dbh==NULL)
{
- if(mode) {
+ if(!mode) {
LM_ERR("failed to connect to the database [%.*s]\n",
sc->name.len, sc->name.s);
return -1;