浏览代码

modules_k/usrloc: Only run timer when timer_interval > 0

- This is useful on DB only multi-server systems when the database is
  cleaned up outside of Kamailio.
- This is a re-instatement of something that worked before the
  addition of GRUU.
Peter Dunkley 13 年之前
父节点
当前提交
b13434ff7f
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      modules_k/usrloc/ul_mod.c

+ 4 - 1
modules_k/usrloc/ul_mod.c

@@ -315,7 +315,10 @@ static int mod_init(void)
 
 	/* Register cache timer */
 	if(ul_timer_procs<=0)
-		register_timer(ul_core_timer, 0, timer_interval);
+	{
+		if (timer_interval > 0)
+			register_timer(ul_core_timer, 0, timer_interval);
+	}
 	else
 		register_sync_timers(ul_timer_procs);