Merge pull request #16104 from yashykt/finalinfo

Allow error strings in final_info to propagate to filters on call des…
pull/12283/head^2
Yash Tibrewal 7 years ago committed by GitHub
commit af1edd806e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/core/lib/channel/channel_stack.h
  2. 3
      src/core/lib/surface/call.cc

@ -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:

@ -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); }

Loading…
Cancel
Save