Module: kamailio
Branch: 5.2
Commit: 8d1996ac6c6c7b1445bcb8f4589bfc3b1cfed805
URL:
https://github.com/kamailio/kamailio/commit/8d1996ac6c6c7b1445bcb8f4589bfc3…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-04-03T11:45:16+02:00
lib/srdb1: use the proper field for latency db limit
(cherry picked from commit 7560edb8aac6b60a5c4392db21c16e4096bf529d)
---
Modified: src/lib/srdb1/db_query.c
---
Diff:
https://github.com/kamailio/kamailio/commit/8d1996ac6c6c7b1445bcb8f4589bfc3…
Patch:
https://github.com/kamailio/kamailio/commit/8d1996ac6c6c7b1445bcb8f4589bfc3…
---
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);