Преглед изворни кода

- proper query declaration for db_ops
- uncomented options for 2.1

Jan Janak пре 18 година
родитељ
комит
17efc53fe7
1 измењених фајлова са 10 додато и 7 уклоњено
  1. 10 7
      etc/ser-oob.cfg

+ 10 - 7
etc/ser-oob.cfg

@@ -150,9 +150,9 @@ listen=udp:192.168.1.1
 
 # ------------------- misc params -------------------------------------
 # ser 2.1 only
-# mlock_pages=yes
-# shm_force_alloc=yes
-# real_time=7
+mlock_pages=yes
+shm_force_alloc=yes
+real_time=7
 
 
 # ------------------- DNS params -------------------------------------
@@ -255,7 +255,7 @@ modparam("speeddial|auth_db|usrloc|acc_db|domain|uri_db|gflags|avp_db|db_ops", "
 # -- usrloc params --
 
 # db_mode 0 -- memory cached, 1 -- write thru, 2 -- delayed write
-modparam("usrloc", "db_mode", 2)
+modparam("usrloc", "db_mode", 1)
 # don't delete expired records from database on a per-contact basis -- that
 # results in bulky DB operations and can lead to synchronization issues
 # in server farm when for a time a server doesn't obtain re-reregistrations
@@ -364,6 +364,9 @@ modparam("exec", "setvars", 0);
 # -- timer module
 modparam("timer", "declare_timer", "ON_1MIN_TIMER=ON_1MIN_TIMER,60000,slow,enable");
 
+# -- db_ops module
+modparam("db_ops", "declare_handle", "reload")
+
 # -------------------------  request routing logic -------------------
 
 # main routing logic
@@ -1049,12 +1052,12 @@ route[ON_1MIN_TIMER] {
 	# easily remember the "last" status, we check for changed
 	# timestamp in 2 minute time-interval
 
-	db_query("select value from global_attrs where name='domain_data_version' and type=0 and cast(value as unsigned int) between unix_timestamp(now())-120 and unix_timestamp(now())", 0);
+	db_query("select value from global_attrs where name='domain_data_version' and type=0 and cast(value as unsigned int) between unix_timestamp(now())-120 and unix_timestamp(now())", "reload");
 
-	if (@db.fetch[0].count=="1") {
+	if (@db.fetch.reload.count=="1") {
 		# domain reload only available as fifo command
 		exec_msg("sercmd domain.reload"); 
 	}
-	db_close(0);
+	db_close("reload");
 }