[sr-dev] git:master:ed9a2cd7: tm: print tm cell in rpc tm.list output

Daniel-Constantin Mierla miconda at gmail.com
Sun Sep 24 12:01:40 CEST 2017


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-09-24T11:50:31+02:00

tm: print tm cell in rpc tm.list output

---

Modified: src/modules/tm/t_stats.c

---

Diff:  https://github.com/kamailio/kamailio/commit/ed9a2cd7a938095ef923a263b8a2a3760e8396de.diff
Patch: https://github.com/kamailio/kamailio/commit/ed9a2cd7a938095ef923a263b8a2a3760e8396de.patch

---

diff --git a/src/modules/tm/t_stats.c b/src/modules/tm/t_stats.c
index 6b26aedba0..5917b46a88 100644
--- a/src/modules/tm/t_stats.c
+++ b/src/modules/tm/t_stats.c
@@ -258,6 +258,7 @@ void tm_rpc_list(rpc_t* rpc, void* c)
 	int r;
 	void* h;
 	tm_cell_t *tcell;
+	char pbuf[32];
 
 	for (r=0; r<TABLE_ENTRIES; r++) {
 		lock_hash(r);
@@ -272,7 +273,9 @@ void tm_rpc_list(rpc_t* rpc, void* c)
 		}
 		clist_foreach(&_tm_table->entries[r], tcell, next_c)
 		{
-			rpc->struct_add(h, "ddSSSSSsdddd",
+			snprintf(pbuf, 31, "%p", (void*)tcell);
+			rpc->struct_add(h, "sddSSSSSsdddd",
+					"cell", pbuf,
 					"tindex", (unsigned)tcell->hash_index,
 					"tlabel", (unsigned)tcell->label,
 					"method", &tcell->method,




More information about the sr-dev mailing list