diff options
author | Yang Gao <yangg@google.com> | 2015-02-11 13:59:25 -0800 |
---|---|---|
committer | Yang Gao <yangg@google.com> | 2015-02-11 13:59:25 -0800 |
commit | 23822932262c5a3eb9404be59d5512fe4c88f18d (patch) | |
tree | 26a806350f5f88c8900a5bf85c5767eb9225a735 /src/cpp | |
parent | 1464bc175d4f2beaad9eb93ccbd859268755678e (diff) |
Make it compile
Diffstat (limited to 'src/cpp')
-rw-r--r-- | src/cpp/client/client_unary_call.cc | 2 | ||||
-rw-r--r-- | src/cpp/common/call.cc | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/cpp/client/client_unary_call.cc b/src/cpp/client/client_unary_call.cc index 73be3cff8c..6825398612 100644 --- a/src/cpp/client/client_unary_call.cc +++ b/src/cpp/client/client_unary_call.cc @@ -52,7 +52,7 @@ Status BlockingUnaryCall(ChannelInterface *channel, const RpcMethod &method, buf.AddSendMessage(request); buf.AddRecvMessage(result); buf.AddClientSendClose(); - buf.AddClientRecvStatus(&status); + buf.AddClientRecvStatus(nullptr, &status); // TODO metadata call.PerformOps(&buf); cq.Pluck(&buf); return status; diff --git a/src/cpp/common/call.cc b/src/cpp/common/call.cc index 607958df89..765baa06ca 100644 --- a/src/cpp/common/call.cc +++ b/src/cpp/common/call.cc @@ -43,6 +43,7 @@ namespace grpc { void CallOpBuffer::Reset(void* next_return_tag) { return_tag_ = next_return_tag; + send_initial_metadata_ = false; initial_metadata_count_ = 0; gpr_free(initial_metadata_); @@ -106,7 +107,7 @@ void FillMetadataMap(grpc_metadata_array* arr, arr->metadata[i].key, {arr->metadata[i].value, arr->metadata[i].value_length})); } grpc_metadata_array_destroy(arr); - grpc_metadata_array_init(&recv_trailing_metadata_arr_); + grpc_metadata_array_init(arr); } } // namespace @@ -114,7 +115,7 @@ void CallOpBuffer::AddSendInitialMetadata( std::multimap<grpc::string, grpc::string>* metadata) { send_initial_metadata_ = true; initial_metadata_count_ = metadata->size(); - initial_metadata_ = FillMetadata(metadata); + initial_metadata_ = FillMetadataArray(metadata); } void CallOpBuffer::AddSendInitialMetadata(ClientContext *ctx) { @@ -142,7 +143,7 @@ void CallOpBuffer::AddClientRecvStatus( void CallOpBuffer::AddServerSendStatus( std::multimap<grpc::string, grpc::string>* metadata, const Status& status) { trailing_metadata_count_ = metadata->size(); - trailing_metadata_ = FillMetadata(metadata); + trailing_metadata_ = FillMetadataArray(metadata); send_status_ = &status; } @@ -219,7 +220,7 @@ void CallOpBuffer::FinalizeResult(void **tag, bool *status) { *tag = return_tag_; // Process received initial metadata if (recv_initial_metadata_) { - FillMetadataMap(&recv_initial_metadata_, recv_initial_metadata_); + FillMetadataMap(&recv_initial_metadata_arr_, recv_initial_metadata_); } // Parse received message if any. if (recv_message_ && recv_message_buf_) { |