瀏覽代碼

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

jaybeepee 9 年之前
父節點
當前提交
06df7d591e
共有 1 個文件被更改,包括 4 次插入0 次删除
  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");