[sr-dev] git:master:e34d70fb: tm: show ref count, lifetime, uas request mode in rpc tm.list

Daniel-Constantin Mierla miconda at gmail.com
Thu Aug 31 10:04:41 CEST 2017


Module: kamailio
Branch: master
Commit: e34d70fbffc22f3c2173b960afcfbb6166060002
URL: https://github.com/kamailio/kamailio/commit/e34d70fbffc22f3c2173b960afcfbb6166060002

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at 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/e34d70fbffc22f3c2173b960afcfbb6166060002.diff
Patch: https://github.com/kamailio/kamailio/commit/e34d70fbffc22f3c2173b960afcfbb6166060002.patch

---

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);




More information about the sr-dev mailing list