[sr-dev] git:master:06df7d59: modules/ims_usrloc_scscf: do not use DB functions if db_mode not enabled.

jaybeepee jason.penton at gmail.com
Thu Jun 2 16:30:37 CEST 2016


Module: kamailio
Branch: master
Commit: 06df7d591e56d48ddbc100e5be4dc917731fc1a4
URL: https://github.com/kamailio/kamailio/commit/06df7d591e56d48ddbc100e5be4dc917731fc1a4

Author: jaybeepee <jason.penton at gmail.com>
Committer: jaybeepee <jason.penton at gmail.com>
Date: 2016-06-02T16:30:21+02:00

modules/ims_usrloc_scscf: do not use DB functions if db_mode not enabled.

---

Modified: modules/ims_usrloc_scscf/impurecord.c

---

Diff:  https://github.com/kamailio/kamailio/commit/06df7d591e56d48ddbc100e5be4dc917731fc1a4.diff
Patch: https://github.com/kamailio/kamailio/commit/06df7d591e56d48ddbc100e5be4dc917731fc1a4.patch

---

diff --git a/modules/ims_usrloc_scscf/impurecord.c b/modules/ims_usrloc_scscf/impurecord.c
index 9dd82ed..ceee7e5 100644
--- a/modules/ims_usrloc_scscf/impurecord.c
+++ b/modules/ims_usrloc_scscf/impurecord.c
@@ -332,6 +332,10 @@ static str rollback = str_init("ROLLBACK");
 static str autocommit_on = str_init("SET AUTOCOMMIT=1");
 
 static inline void start_dbtransaction() {
+    
+    if (db_mode == NO_DB) 
+        return;
+    
     if (ul_dbf.raw_query(ul_dbh, &autocommit_off, NULL) < 0) {
         LM_ERR("could not "
                 "set autocommit off!\n");




More information about the sr-dev mailing list