Module: kamailio
Branch: master
Commit: e34d70fbffc22f3c2173b960afcfbb6166060002
URL:
https://github.com/kamailio/kamailio/commit/e34d70fbffc22f3c2173b960afcfbb6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-08-31T10:00:03+02:00
tm: show ref count, lifetime, uas request mode in rpc tm.list
---
Modified: src/modules/tm/t_stats.c
---
Diff:
https://github.com/kamailio/kamailio/commit/e34d70fbffc22f3c2173b960afcfbb6…
Patch:
https://github.com/kamailio/kamailio/commit/e34d70fbffc22f3c2173b960afcfbb6…
---
diff --git a/src/modules/tm/t_stats.c b/src/modules/tm/t_stats.c
index 7643ac624c..5b1cc5fbbc 100644
--- a/src/modules/tm/t_stats.c
+++ b/src/modules/tm/t_stats.c
@@ -268,7 +268,7 @@ void tm_rpc_list(rpc_t* rpc, void* c)
lock_hash(r);
clist_foreach(&_tm_table->entries[r], tcell, next_c)
{
- rpc->struct_add(h, "ddSSSSSdd",
+ rpc->struct_add(h, "ddSSSSSsdddd",
"tindex", (unsigned)tcell->hash_index,
"tlabel", (unsigned)tcell->label,
"method", &tcell->method,
@@ -276,8 +276,15 @@ void tm_rpc_list(rpc_t* rpc, void* c)
"to", &tcell->to,
"callid", &tcell->callid,
"cseq", &tcell->cseq_n,
+ "uas_request", (tcell->uas.request)?"yes":"no",
"tflags", (unsigned)tcell->flags,
- "outgoings", (unsigned)tcell->nr_of_outgoings
+ "outgoings", (unsigned)tcell->nr_of_outgoings,
+#ifdef TM_DEL_UNREF
+ "ref_count", (unsigned)atomic_get(&tcell->ref_count),
+#else
+ "ref_count", tcell->ref_count,
+#endif
+ "lifetime", (unsigned)TICKS_TO_S(tcell->end_of_life)
);
}
unlock_hash(r);