[sr-dev] git:master:7560edb8: lib/srdb1: use the proper field for latency db limit

Daniel-Constantin Mierla miconda at gmail.com
Tue Apr 2 13:46:50 CEST 2019


Module: kamailio
Branch: master
Commit: 7560edb8aac6b60a5c4392db21c16e4096bf529d
URL: https://github.com/kamailio/kamailio/commit/7560edb8aac6b60a5c4392db21c16e4096bf529d

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-04-02T13:45:56+02:00

lib/srdb1: use the proper field for latency db limit

---

Modified: src/lib/srdb1/db_query.c

---

Diff:  https://github.com/kamailio/kamailio/commit/7560edb8aac6b60a5c4392db21c16e4096bf529d.diff
Patch: https://github.com/kamailio/kamailio/commit/7560edb8aac6b60a5c4392db21c16e4096bf529d.patch

---

diff --git a/src/lib/srdb1/db_query.c b/src/lib/srdb1/db_query.c
index 4bb235fab1..e6f237d654 100644
--- a/src/lib/srdb1/db_query.c
+++ b/src/lib/srdb1/db_query.c
@@ -47,14 +47,14 @@ static inline int db_do_submit_query(const db1_con_t* _h, const str *_query,
 	int ret;
 	unsigned int ms = 0;
 
-	if(unlikely(cfg_get(core, core_cfg, latency_limit_action)>0))
+	if(unlikely(cfg_get(core, core_cfg, latency_limit_db)>0))
 		ms = TICKS_TO_MS(get_ticks_raw());
 
 	ret = submit_query(_h, _query);
 
-	if(unlikely(cfg_get(core, core_cfg, latency_limit_action)>0)) {
+	if(unlikely(cfg_get(core, core_cfg, latency_limit_db)>0)) {
 		ms = TICKS_TO_MS(get_ticks_raw()) - ms;
-		if(ms >= cfg_get(core, core_cfg, latency_limit_action)) {
+		if(ms >= cfg_get(core, core_cfg, latency_limit_db)) {
 				LOG(cfg_get(core, core_cfg, latency_log),
 					"alert - query execution too long [%u ms] for [%.*s]\n",
 				   ms, _query->len<50?_query->len:50, _query->s);




More information about the sr-dev mailing list