diff options
Diffstat (limited to 'src/core/lib')
-rw-r--r-- | src/core/lib/iomgr/exec_ctx.c | 1 | ||||
-rw-r--r-- | src/core/lib/iomgr/tcp_client_posix.c | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/exec_ctx.c b/src/core/lib/iomgr/exec_ctx.c index 83bb436bd0..39ab396268 100644 --- a/src/core/lib/iomgr/exec_ctx.c +++ b/src/core/lib/iomgr/exec_ctx.c @@ -64,6 +64,7 @@ bool grpc_always_ready_to_finish(grpc_exec_ctx *exec_ctx, void *arg_ignored) { bool grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx) { bool did_something = 0; + gpr_log(GPR_DEBUG, "grpc_exec_ctx_flush"); GPR_TIMER_BEGIN("grpc_exec_ctx_flush", 0); for (;;) { if (!grpc_closure_list_empty(exec_ctx->closure_list)) { diff --git a/src/core/lib/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.c index 0144192b71..daa4eb51ee 100644 --- a/src/core/lib/iomgr/tcp_client_posix.c +++ b/src/core/lib/iomgr/tcp_client_posix.c @@ -35,6 +35,9 @@ #ifdef GRPC_POSIX_SOCKET +#include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/lib/iomgr/socket_utils_posix.h" + #include "src/core/lib/iomgr/tcp_client_posix.h" #include <errno.h> @@ -287,6 +290,24 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, *ep = NULL; + struct sockaddr_in *addr4 = (struct sockaddr_in *)addr->addr; + if (addr4->sin_family == AF_INET) { + char output[INET_ADDRSTRLEN]; + inet_ntop(AF_INET, &addr4->sin_addr, output, INET_ADDRSTRLEN); + gpr_log(GPR_DEBUG, + "native resolver gets a AF_INET result: \n" + " addr: %s\n", + output); + } else { + struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)addr->addr; + char output[INET6_ADDRSTRLEN]; + inet_ntop(AF_INET6, &addr6->sin6_addr, output, INET6_ADDRSTRLEN); + gpr_log(GPR_DEBUG, + "native resolver gets a AF_INET6 result: \n" + " addr: %s\n, sin6_scope_id: %d\n", + output, addr6->sin6_scope_id); + } + /* Use dualstack sockets where available. */ if (grpc_sockaddr_to_v4mapped(addr, &addr6_v4mapped)) { addr = &addr6_v4mapped; |