diff --git a/include/grpc++/client_context.h b/include/grpc++/client_context.h index ee28f360cbe..c4724cc1f01 100644 --- a/include/grpc++/client_context.h +++ b/include/grpc++/client_context.h @@ -138,12 +138,14 @@ class ClientContext { void AddMetadata(const grpc::string& meta_key, const grpc::string& meta_value); - const std::multimap& GetServerInitialMetadata() { + const std::multimap& + GetServerInitialMetadata() { GPR_ASSERT(initial_metadata_received_); return recv_initial_metadata_; } - const std::multimap& GetServerTrailingMetadata() { + const std::multimap& + GetServerTrailingMetadata() { // TODO(yangg) check finished return trailing_metadata_; } @@ -234,8 +236,8 @@ class ClientContext { mutable std::shared_ptr auth_context_; struct census_context* census_context_; std::multimap send_initial_metadata_; - std::multimap recv_initial_metadata_; - std::multimap trailing_metadata_; + std::multimap recv_initial_metadata_; + std::multimap trailing_metadata_; grpc_call* propagate_from_call_; PropagationOptions propagation_options_; diff --git a/include/grpc++/server_context.h b/include/grpc++/server_context.h index ce3cb47a237..a165d84944c 100644 --- a/include/grpc++/server_context.h +++ b/include/grpc++/server_context.h @@ -103,7 +103,7 @@ class ServerContext { bool IsCancelled() const; - const std::multimap& client_metadata() { + const std::multimap& client_metadata() { return client_metadata_; } @@ -185,7 +185,7 @@ class ServerContext { CompletionQueue* cq_; bool sent_initial_metadata_; mutable std::shared_ptr auth_context_; - std::multimap client_metadata_; + std::multimap client_metadata_; std::multimap initial_metadata_; std::multimap trailing_metadata_;