Browse code

core: print address family for rpc core.sockets_list

Daniel-Constantin Mierla authored on 16/09/2022 14:45:21
Showing 1 changed files
... ...
@@ -988,7 +988,8 @@ static void core_sockets_list(rpc_t* rpc, void* c)
988 988
 		for(si=list?*list:0; si; si=si->next){
989 989
 			rpc->struct_add(hr, "{", "socket", &ha);
990 990
 			if (si->addr_info_lst){
991
-				rpc->struct_add(ha, "ss",
991
+				rpc->struct_add(ha, "sss",
992
+						"af", get_af_name(si->address.af),
992 993
 						"proto", get_proto_name(proto),
993 994
 						"address", si->address_str.s);
994 995
 				for (ai=si->addr_info_lst; ai; ai=ai->next)
... ...
@@ -1003,7 +1004,8 @@ static void core_sockets_list(rpc_t* rpc, void* c)
1003 1004
 				printf("             %s: %s",
1004 1005
 						get_proto_name(proto),
1005 1006
 						si->name.s);
1006
-				rpc->struct_add(ha, "ss",
1007
+				rpc->struct_add(ha, "sss",
1008
+						"af", get_af_name(si->address.af),
1007 1009
 						"proto", get_proto_name(proto),
1008 1010
 						"address", si->name.s);
1009 1011
 				if (!(si->flags & SI_IS_IP))