Merge pull request #17725 from yashykt/oserrorinfo

OS Error - The error description should be the error string
pull/17732/head
Yash Tibrewal 6 years ago committed by GitHub
commit 40b35dec12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/core/lib/iomgr/error.cc
  2. 2
      src/core/lib/iomgr/resolve_address_posix.cc

@ -765,7 +765,7 @@ grpc_error* grpc_os_error(const char* file, int line, int err,
grpc_error_set_str(
grpc_error_set_int(
grpc_error_create(file, line,
grpc_slice_from_static_string("OS Error"),
grpc_slice_from_static_string(strerror(err)),
nullptr, 0),
GRPC_ERROR_INT_ERRNO, err),
GRPC_ERROR_STR_OS_ERROR,

@ -105,7 +105,7 @@ static grpc_error* posix_blocking_resolve_address(
grpc_error_set_str(
grpc_error_set_str(
grpc_error_set_int(
GRPC_ERROR_CREATE_FROM_STATIC_STRING("OS Error"),
GRPC_ERROR_CREATE_FROM_STATIC_STRING(gai_strerror(s)),
GRPC_ERROR_INT_ERRNO, s),
GRPC_ERROR_STR_OS_ERROR,
grpc_slice_from_static_string(gai_strerror(s))),

Loading…
Cancel
Save