|
|
|
@ -42,6 +42,7 @@ |
|
|
|
|
#include <grpc/support/port_platform.h> |
|
|
|
|
#include <grpc/support/string_util.h> |
|
|
|
|
|
|
|
|
|
#include "src/core/lib/iomgr/socket_utils.h" |
|
|
|
|
#include "src/core/lib/iomgr/unix_sockets_posix.h" |
|
|
|
|
#include "src/core/lib/support/string.h" |
|
|
|
|
|
|
|
|
@ -155,9 +156,8 @@ int grpc_sockaddr_to_string(char **out, const struct sockaddr *addr, |
|
|
|
|
ip = &addr6->sin6_addr; |
|
|
|
|
port = ntohs(addr6->sin6_port); |
|
|
|
|
} |
|
|
|
|
/* Windows inet_ntop wants a mutable ip pointer */ |
|
|
|
|
if (ip != NULL && |
|
|
|
|
inet_ntop(addr->sa_family, (void *)ip, ntop_buf, sizeof(ntop_buf)) != |
|
|
|
|
grpc_inet_ntop(addr->sa_family, ip, ntop_buf, sizeof(ntop_buf)) != |
|
|
|
|
NULL) { |
|
|
|
|
ret = gpr_join_host_port(out, ntop_buf, port); |
|
|
|
|
} else { |
|
|
|
|