Module: kamailio
Branch: master
Commit: 7560edb8aac6b60a5c4392db21c16e4096bf529d
URL:
https://github.com/kamailio/kamailio/commit/7560edb8aac6b60a5c4392db21c16e4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)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/7560edb8aac6b60a5c4392db21c16e4…
Patch:
https://github.com/kamailio/kamailio/commit/7560edb8aac6b60a5c4392db21c16e4…
---
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);