[sr-dev] git:5.0:93d063ba: usrloc: add more attributes to the result of ul.dump

Charles Chance charles.chance at sipcentric.com
Thu Nov 9 16:16:37 CET 2017


Module: kamailio
Branch: 5.0
Commit: 93d063ba0d278a609c714a62ddbeec33162099b4
URL: https://github.com/kamailio/kamailio/commit/93d063ba0d278a609c714a62ddbeec33162099b4

Author: shuntongzhang <shuntongzhang at gmail.com>
Committer: Charles Chance <charles.chance at sipcentric.com>
Date: 2017-11-09T15:16:01Z

usrloc: add more attributes to the result of ul.dump

(cherry picked from commit a57465ff47d46fb5d64c692a72f42767598adbb4)

---

Modified: src/modules/usrloc/ul_rpc.c

---

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

---

diff --git a/src/modules/usrloc/ul_rpc.c b/src/modules/usrloc/ul_rpc.c
index 7411be6b93..6133db8acd 100644
--- a/src/modules/usrloc/ul_rpc.c
+++ b/src/modules/usrloc/ul_rpc.c
@@ -180,14 +180,29 @@ int rpc_dump_contact(rpc_t* rpc, void* ctx, void *ih, ucontact_t* c)
 		rpc->fault(ctx, 500, "Internal error adding reg_id");
 		return -1;
 	}
+    if(rpc->struct_add(vh, "d", "Server-Id", c->server_id)<0)
+	{
+		rpc->fault(ctx, 500, "Internal error adding server_id");
+		return -1;
+	}
+    if(rpc->struct_add(vh, "d", "Tcpconn-Id", c->tcpconn_id)<0)
+	{
+		rpc->fault(ctx, 500, "Internal error adding tcpconn_id");
+		return -1;
+	}
+    if(rpc->struct_add(vh, "d", "Keepalive", c->keepalive)<0)
+	{
+		rpc->fault(ctx, 500, "Internal error adding keepalive");
+		return -1;
+	}
 	if(rpc->struct_add(vh, "d", "Last-Keepalive", (int)c->last_keepalive)<0)
 	{
-		rpc->fault(ctx, 500, "Internal error adding reg_id");
+		rpc->fault(ctx, 500, "Internal error adding last_keepalive");
 		return -1;
 	}
 	if(rpc->struct_add(vh, "d", "Last-Modified", (int)c->last_modified)<0)
 	{
-		rpc->fault(ctx, 500, "Internal error adding reg_id");
+		rpc->fault(ctx, 500, "Internal error adding last_modified");
 		return -1;
 	}
 	return 0;




More information about the sr-dev mailing list