Skip to content

Commit

Permalink
corex: print socket name in rpc command output
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Apr 2, 2020
1 parent 76889de commit cf64fce
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/modules/corex/corex_rpc.c
Expand Up @@ -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);
Expand All @@ -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)
{

Expand All @@ -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");
Expand Down

0 comments on commit cf64fce

Please sign in to comment.