Module: kamailio
Branch: master
Commit: e5b4cfdad888b72f53a95d1bdd9a8f5ba36588af
URL:
https://github.com/kamailio/kamailio/commit/e5b4cfdad888b72f53a95d1bdd9a8f5…
Author: jaybeepee <jason.penton(a)gmail.com>
Committer: jaybeepee <jason.penton(a)gmail.com>
Date: 2016-03-08T11:08:15+02:00
modules/cdp: print diameter session-id for slow diameter responses (useful for debug)
---
Modified: modules/cdp/api_process.c
---
Diff:
https://github.com/kamailio/kamailio/commit/e5b4cfdad888b72f53a95d1bdd9a8f5…
Patch:
https://github.com/kamailio/kamailio/commit/e5b4cfdad888b72f53a95d1bdd9a8f5…
---
diff --git a/modules/cdp/api_process.c b/modules/cdp/api_process.c
index 56ca2db..e53dda7 100644
--- a/modules/cdp/api_process.c
+++ b/modules/cdp/api_process.c
@@ -108,7 +108,10 @@ int api_callback(peer *p,AAAMessage *msg,void* ptr)
long elapsed_usecs = (stop.tv_sec - t->started.tv_sec)*1000000 +
(stop.tv_usec - t->started.tv_usec);
long elapsed_msecs = elapsed_usecs/1000;
if (elapsed_msecs > *latency_threshold_p) {
- LM_ERR("Received diameter response outside of threshold (%d) -
%ld\n", *latency_threshold_p, elapsed_msecs);
+ if (msg->sessionId && msg->sessionId->data)
+ LM_ERR("Received diameter response outside of threshold (%d) -
%ld (session-id: [%.*s])\n", *latency_threshold_p, elapsed_msecs,
msg->sessionId->data.len, msg->sessionId->data.s);
+ else
+ LM_ERR("Received diameter response outside of threshold (%d) -
%ld (no session-id)\n", *latency_threshold_p, elapsed_msecs);
}
counter_inc(cdp_cnts_h.replies_received);
counter_add(cdp_cnts_h.replies_response_time, elapsed_msecs);