Browse Source

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

jaybeepee 9 years ago
parent
commit
06df7d591e
1 changed files with 4 additions and 0 deletions
  1. 4 0
      modules/ims_usrloc_scscf/impurecord.c

+ 4 - 0
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");