diff options
author | Yash Tibrewal <yashkt@google.com> | 2018-07-24 10:43:59 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-24 10:43:59 -0700 |
commit | af1edd806ec5f4b7ad8c34a98515614be55d10c3 (patch) | |
tree | 1f036a1e8bda76e4b1f6f533b78be35c46c26f4f | |
parent | 1fd9b62ceed4372852a887a4a075fd2e2e029ead (diff) | |
parent | bcf271c416affe9871a43c8583d4295e8d73159a (diff) |
Merge pull request #16104 from yashykt/finalinfo
Allow error strings in final_info to propagate to filters on call des…
-rw-r--r-- | src/core/lib/channel/channel_stack.h | 2 | ||||
-rw-r--r-- | src/core/lib/surface/call.cc | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 7581f937b6..35c3fb01ea 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -82,7 +82,7 @@ typedef struct { typedef struct { grpc_call_stats stats; grpc_status_code final_status; - const char** error_string; + const char* error_string; } grpc_call_final_info; /* Channel filters specify: diff --git a/src/core/lib/surface/call.cc b/src/core/lib/surface/call.cc index 88e015ce22..847bb87f7e 100644 --- a/src/core/lib/surface/call.cc +++ b/src/core/lib/surface/call.cc @@ -561,7 +561,7 @@ static void destroy_call(void* call, grpc_error* error) { } get_final_status(c, set_status_value_directly, &c->final_info.final_status, - nullptr, c->final_info.error_string); + nullptr, &(c->final_info.error_string)); c->final_info.stats.latency = gpr_time_sub(gpr_now(GPR_CLOCK_MONOTONIC), c->start_time); @@ -573,6 +573,7 @@ static void destroy_call(void* call, grpc_error* error) { grpc_call_stack_destroy(CALL_STACK_FROM_CALL(c), &c->final_info, GRPC_CLOSURE_INIT(&c->release_call, release_call, c, grpc_schedule_on_exec_ctx)); + gpr_free(static_cast<void*>(const_cast<char*>(c->final_info.error_string))); } void grpc_call_ref(grpc_call* c) { gpr_ref(&c->ext_ref); } |