aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/grpc++/impl/codegen/call.h5
-rw-r--r--include/grpc++/impl/codegen/server_interface.h1
-rw-r--r--src/cpp/server/server_cc.cc3
3 files changed, 4 insertions, 5 deletions
diff --git a/include/grpc++/impl/codegen/call.h b/include/grpc++/impl/codegen/call.h
index 9165f4fd6c..dd6c83a14a 100644
--- a/include/grpc++/impl/codegen/call.h
+++ b/include/grpc++/impl/codegen/call.h
@@ -438,9 +438,9 @@ class CallOpServerSendStatus {
trailing_metadata_count_;
op->data.send_status_from_server.trailing_metadata = trailing_metadata_;
op->data.send_status_from_server.status = send_status_code_;
- grpc_slice status_details = SliceReferencingString(send_status_details_);
+ status_details_slice_ = SliceReferencingString(send_status_details_);
op->data.send_status_from_server.status_details =
- send_status_details_.empty() ? nullptr : &status_details;
+ send_status_details_.empty() ? nullptr : &status_details_slice_;
op->flags = 0;
op->reserved = NULL;
}
@@ -457,6 +457,7 @@ class CallOpServerSendStatus {
grpc::string send_status_details_;
size_t trailing_metadata_count_;
grpc_metadata* trailing_metadata_;
+ grpc_slice status_details_slice_;
};
class CallOpRecvInitialMetadata {
diff --git a/include/grpc++/impl/codegen/server_interface.h b/include/grpc++/impl/codegen/server_interface.h
index 666b9ff66e..af1bf6fa6f 100644
--- a/include/grpc++/impl/codegen/server_interface.h
+++ b/include/grpc++/impl/codegen/server_interface.h
@@ -152,7 +152,6 @@ class ServerInterface : public CallHook {
void* const tag_;
const bool delete_on_finalize_;
grpc_call* call_;
- grpc_metadata_array initial_metadata_array_;
};
class RegisteredAsyncRequest : public BaseAsyncRequest {
diff --git a/src/cpp/server/server_cc.cc b/src/cpp/server/server_cc.cc
index 06fa4a8538..dcc56eecbc 100644
--- a/src/cpp/server/server_cc.cc
+++ b/src/cpp/server/server_cc.cc
@@ -576,7 +576,6 @@ ServerInterface::BaseAsyncRequest::BaseAsyncRequest(
delete_on_finalize_(delete_on_finalize),
call_(nullptr) {
call_cq_->RegisterAvalanching(); // This op will trigger more ops
- memset(&initial_metadata_array_, 0, sizeof(initial_metadata_array_));
}
ServerInterface::BaseAsyncRequest::~BaseAsyncRequest() {
@@ -627,7 +626,7 @@ ServerInterface::GenericAsyncRequest::GenericAsyncRequest(
GPR_ASSERT(notification_cq);
GPR_ASSERT(call_cq);
grpc_server_request_call(server->server(), &call_, &call_details_,
- &initial_metadata_array_, call_cq->cq(),
+ context->client_metadata_.arr(), call_cq->cq(),
notification_cq->cq(), this);
}