diff options
author | Mark D. Roth <roth@google.com> | 2016-06-23 13:14:05 -0700 |
---|---|---|
committer | Mark D. Roth <roth@google.com> | 2016-06-23 13:14:05 -0700 |
commit | 5d11e43ce34b371fb0ab1fa69e541a4d513025b8 (patch) | |
tree | 3b06efde7e6ddde1bd7340e18f0cd5b5656d7a40 /src/core/lib/surface | |
parent | 09e669878f57e4e4a56bb920d4e3e48615fde55d (diff) |
Added test for filter whose call initialization fails, and fixed bugs
uncovered by the test.
Diffstat (limited to 'src/core/lib/surface')
-rw-r--r-- | src/core/lib/surface/call.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 2e89393815..d68afff39f 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -270,12 +270,10 @@ grpc_call *grpc_call_create( intptr_t status; if (!grpc_error_get_int(error, GRPC_ERROR_INT_GRPC_STATUS, &status)) status = GRPC_STATUS_UNKNOWN; - const char* error_string = grpc_error_string(error); - received_status* status_struct = &call->status[STATUS_FROM_CORE]; - status_struct->is_set = true; - status_struct->code = status; - status_struct->details = grpc_mdstr_from_string(error_string); - grpc_error_free_string(error_string); + const char* error_str = grpc_error_get_str(error, + GRPC_ERROR_STR_DESCRIPTION); + close_with_status(&exec_ctx, call, status, + error_str == NULL ? "unknown error" : error_str); grpc_error_unref(error); } if (cq != NULL) { |