mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-22 10:49:02 +00:00
Always get numeric host/ports instead of names.
This commit is contained in:
parent
42da0a0184
commit
c342c103ae
@ -100,7 +100,7 @@ bool natt_open_port(struct natt_status *status, struct sockaddr *addr, socklen_t
|
||||
return false;
|
||||
|
||||
/* figure out the internal info */
|
||||
if (getnameinfo(addr, addrlen, host, PATH_MAX_LENGTH, port_str, 6, 0) != 0)
|
||||
if (getnameinfo(addr, addrlen, host, PATH_MAX_LENGTH, port_str, 6, NI_NUMERICHOST|NI_NUMERICSERV) != 0)
|
||||
return false;
|
||||
proto_str = (proto == SOCKET_PROTOCOL_UDP) ? "UDP" : "TCP";
|
||||
|
||||
|
@ -1076,7 +1076,7 @@ static void announce_nat_traversal(netplay_t *netplay)
|
||||
{
|
||||
if (getnameinfo((const struct sockaddr *) &netplay->nat_traversal_state.ext_inet4_addr,
|
||||
sizeof(struct sockaddr_in),
|
||||
host, PATH_MAX_LENGTH, port, 6, 0) != 0)
|
||||
host, PATH_MAX_LENGTH, port, 6, NI_NUMERICHOST|NI_NUMERICSERV) != 0)
|
||||
return;
|
||||
|
||||
}
|
||||
@ -1085,7 +1085,7 @@ static void announce_nat_traversal(netplay_t *netplay)
|
||||
{
|
||||
if (getnameinfo((const struct sockaddr *) &netplay->nat_traversal_state.ext_inet6_addr,
|
||||
sizeof(struct sockaddr_in6),
|
||||
host, PATH_MAX_LENGTH, port, 6, 0) != 0)
|
||||
host, PATH_MAX_LENGTH, port, 6, NI_NUMERICHOST|NI_NUMERICSERV) != 0)
|
||||
return;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user