[sr-dev] git:master:cf64fcef: corex: print socket name in rpc command output
Daniel-Constantin Mierla
miconda at gmail.com
Thu Apr 2 12:24:49 CEST 2020
Module: kamailio
Branch: master
Commit: cf64fcef56deee64ec324ccc64054e27d051d89a
URL: https://github.com/kamailio/kamailio/commit/cf64fcef56deee64ec324ccc64054e27d051d89a
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2020-04-02T11:38:01+02:00
corex: print socket name in rpc command output
---
Modified: src/modules/corex/corex_rpc.c
---
Diff: https://github.com/kamailio/kamailio/commit/cf64fcef56deee64ec324ccc64054e27d051d89a.diff
Patch: https://github.com/kamailio/kamailio/commit/cf64fcef56deee64ec324ccc64054e27d051d89a.patch
---
diff --git a/src/modules/corex/corex_rpc.c b/src/modules/corex/corex_rpc.c
index 11c8836333..8677c35d22 100644
--- a/src/modules/corex/corex_rpc.c
+++ b/src/modules/corex/corex_rpc.c
@@ -52,7 +52,7 @@ static void corex_rpc_list_sockets(rpc_t* rpc, void* ctx)
struct socket_info** list;
struct addr_info* ai;
unsigned short proto;
-
+
proto=PROTO_UDP;
do {
list=get_sock_info_list(proto);
@@ -79,7 +79,7 @@ static void corex_rpc_list_sockets(rpc_t* rpc, void* ctx)
rpc->fault(ctx, 500, "Internal error address structure");
return;
}
-
+
if (si->addr_info_lst)
{
@@ -95,10 +95,11 @@ static void corex_rpc_list_sockets(rpc_t* rpc, void* ctx)
}
}
- if(rpc->struct_add(th, "ssss",
+ if(rpc->struct_add(th, "sssss",
"PORT", si->port_no_str.s,
"MCAST", si->flags & SI_IS_MCAST ? "yes" : "no",
"MHOMED", si->flags & SI_IS_MHOMED? "yes" : "no",
+ "SOCKNAME", si->sockname.s? si->sockname.s : "-",
"ADVERTISE", si->useinfo.name.s?si->useinfo.name.s:"-")<0)
{
rpc->fault(ctx, 500, "Internal error attrs structure");
More information about the sr-dev
mailing list