Module: kamailio
Branch: 5.0
Commit: 93d063ba0d278a609c714a62ddbeec33162099b4
URL:
https://github.com/kamailio/kamailio/commit/93d063ba0d278a609c714a62ddbeec3…
Author: shuntongzhang <shuntongzhang(a)gmail.com>
Committer: Charles Chance <charles.chance(a)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/93d063ba0d278a609c714a62ddbeec3…
Patch:
https://github.com/kamailio/kamailio/commit/93d063ba0d278a609c714a62ddbeec3…
---
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;