Module: kamailio
Branch: master
Commit: a57465ff47d46fb5d64c692a72f42767598adbb4
URL:
https://github.com/kamailio/kamailio/commit/a57465ff47d46fb5d64c692a72f4276…
Author: shuntongzhang <shuntongzhang(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-04-27T22:55:52+02:00
usrloc: add more attributes to the result of ul.dump
---
Modified: src/modules/usrloc/ul_rpc.c
---
Diff:
https://github.com/kamailio/kamailio/commit/a57465ff47d46fb5d64c692a72f4276…
Patch:
https://github.com/kamailio/kamailio/commit/a57465ff47d46fb5d64c692a72f4276…
---
diff --git a/src/modules/usrloc/ul_rpc.c b/src/modules/usrloc/ul_rpc.c
index d8be315..35f78e9 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;