diff options
Diffstat (limited to 'include/grpc++/impl/codegen/call.h')
-rw-r--r-- | include/grpc++/impl/codegen/call.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/grpc++/impl/codegen/call.h b/include/grpc++/impl/codegen/call.h index af2c2b510c..6a2ac8b70c 100644 --- a/include/grpc++/impl/codegen/call.h +++ b/include/grpc++/impl/codegen/call.h @@ -574,7 +574,7 @@ class CallOpClientRecvStatus { op->data.recv_status_on_client.trailing_metadata = metadata_map_->arr(); op->data.recv_status_on_client.status = &status_code_; op->data.recv_status_on_client.status_details = &error_message_; - op->data.recv_status_on_client.error_string = nullptr; + op->data.recv_status_on_client.error_string = &error_string_; op->flags = 0; op->reserved = NULL; } @@ -591,14 +591,16 @@ class CallOpClientRecvStatus { *recv_status_ = Status(static_cast<StatusCode>(status_code_), grpc::string(GRPC_SLICE_START_PTR(error_message_), GRPC_SLICE_END_PTR(error_message_)), - binary_error_details); + binary_error_details, grpc::string(error_string_)); g_core_codegen_interface->grpc_slice_unref(error_message_); + g_core_codegen_interface->gpr_free((void*)error_string_); recv_status_ = nullptr; } private: MetadataMap* metadata_map_; Status* recv_status_; + const char* error_string_; grpc_status_code status_code_; grpc_slice error_message_; }; |