diff options
author | Craig Tiller <ctiller@google.com> | 2016-05-13 07:19:24 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-05-13 07:19:24 -0700 |
commit | 36364adad51e3693109b272383185b8a05acb5a2 (patch) | |
tree | e9c76c850b2b4542c7fcc843bc629bccddee9a85 | |
parent | d039722f0628159376fc3afe34b9de490b261863 (diff) | |
parent | a10bdd684b01ec6100bdb41cd825af4f0840a269 (diff) |
Merge pull request #32 from markdroth/error
A couple of fixes for iomgr and endpoint_tests.
-rw-r--r-- | src/core/lib/iomgr/ev_poll_and_epoll_posix.c | 4 | ||||
-rw-r--r-- | test/core/iomgr/endpoint_tests.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c index 836db6b3ce..86187dd0c1 100644 --- a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c +++ b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c @@ -1400,7 +1400,7 @@ static grpc_error *multipoll_with_poll_pollset_maybe_work_and_unlock( if (r < 0) { if (errno != EINTR) { - gpr_log(GPR_ERROR, "poll() failed: %s", strerror(errno)); + work_combine_error(&error, GRPC_OS_ERROR(errno, "poll")); } for (i = 2; i < pfd_count; i++) { fd_end_poll(exec_ctx, &watchers[i], 0, 0); @@ -1693,7 +1693,7 @@ static grpc_error *multipoll_with_epoll_pollset_maybe_work_and_unlock( if (poll_rv < 0) { if (errno != EINTR) { - gpr_log(GPR_ERROR, "poll() failed: %s", strerror(errno)); + work_combine_error(&error, GRPC_OS_ERROR(errno, "poll")); } } else if (poll_rv == 0) { /* do nothing */ diff --git a/test/core/iomgr/endpoint_tests.c b/test/core/iomgr/endpoint_tests.c index 8eec10414d..522e9ad8b8 100644 --- a/test/core/iomgr/endpoint_tests.c +++ b/test/core/iomgr/endpoint_tests.c @@ -151,7 +151,7 @@ static void read_and_write_test_write_handler(grpc_exec_ctx *exec_ctx, gpr_slice *slices = NULL; size_t nslices; - if (error != GRPC_ERROR_NONE) { + if (error == GRPC_ERROR_NONE) { state->bytes_written += state->current_write_size; if (state->target_bytes - state->bytes_written < state->current_write_size) { @@ -171,7 +171,7 @@ static void read_and_write_test_write_handler(grpc_exec_ctx *exec_ctx, gpr_log(GPR_INFO, "Write handler done"); gpr_mu_lock(g_mu); - state->write_done = 1 + (error != GRPC_ERROR_NONE); + state->write_done = 1 + (error == GRPC_ERROR_NONE); GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(g_pollset, NULL)); gpr_mu_unlock(g_mu); } |