[sr-dev] git:5.1:c3132d81: lib/srdb1: use the proper field for latency db limit

Daniel-Constantin Mierla miconda at gmail.com
Wed Apr 3 11:59:17 CEST 2019


Module: kamailio
Branch: 5.1
Commit: c3132d81f52197938b9be5616233d59ddc7126f2
URL: https://github.com/kamailio/kamailio/commit/c3132d81f52197938b9be5616233d59ddc7126f2

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-04-03T11:55:48+02:00

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

(cherry picked from commit 7560edb8aac6b60a5c4392db21c16e4096bf529d)
(cherry picked from commit 8d1996ac6c6c7b1445bcb8f4589bfc3b1cfed805)

---

Modified: src/lib/srdb1/db_query.c

---

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

---

diff --git a/src/lib/srdb1/db_query.c b/src/lib/srdb1/db_query.c
index 36b8139ed1..b1900e4c2e 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