aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2018-12-18 12:52:14 -0800
committerGravatar Yash Tibrewal <yashkt@google.com>2018-12-18 12:52:14 -0800
commit31a775b425eac37bb43c301cfb25e1f6a4bde106 (patch)
tree0d4be8ef5407c1319b2df9175a63cb07f3d7fead
parentbb303513dce4e78d898035b9f7f5ae11b7b452dd (diff)
Add missing argument
-rw-r--r--include/grpcpp/impl/codegen/call_op_set.h3
-rw-r--r--include/grpcpp/impl/codegen/interceptor_common.h1
-rw-r--r--test/cpp/end2end/client_interceptors_end2end_test.cc8
3 files changed, 5 insertions, 7 deletions
diff --git a/include/grpcpp/impl/codegen/call_op_set.h b/include/grpcpp/impl/codegen/call_op_set.h
index 3db9f48bff..1c0ccbab52 100644
--- a/include/grpcpp/impl/codegen/call_op_set.h
+++ b/include/grpcpp/impl/codegen/call_op_set.h
@@ -340,12 +340,11 @@ class CallOpSendMessage {
if (send_buf_.Valid()) {
interceptor_methods->AddInterceptionHookPoint(
experimental::InterceptionHookPoints::POST_SEND_MESSAGE);
- // We had already registered failed_send_ earlier. No need to do it again.
}
send_buf_.Clear();
// The contents of the SendMessage value that was previously set
// has had its references stolen by core's operations
- interceptor_methods->SetSendMessage(nullptr);
+ interceptor_methods->SetSendMessage(nullptr, &failed_send_);
}
void SetHijackingState(InterceptorBatchMethodsImpl* interceptor_methods) {
diff --git a/include/grpcpp/impl/codegen/interceptor_common.h b/include/grpcpp/impl/codegen/interceptor_common.h
index 321691236b..b01706af8d 100644
--- a/include/grpcpp/impl/codegen/interceptor_common.h
+++ b/include/grpcpp/impl/codegen/interceptor_common.h
@@ -403,6 +403,7 @@ class CancelInterceptorBatchMethods
false &&
"It is illegal to call GetSendMessageStatus on a method which "
"has a Cancel notification");
+ return false;
}
std::multimap<grpc::string, grpc::string>* GetSendInitialMetadata() override {
diff --git a/test/cpp/end2end/client_interceptors_end2end_test.cc b/test/cpp/end2end/client_interceptors_end2end_test.cc
index 33773e3b3b..c55eaab4d6 100644
--- a/test/cpp/end2end/client_interceptors_end2end_test.cc
+++ b/test/cpp/end2end/client_interceptors_end2end_test.cc
@@ -580,11 +580,9 @@ TEST_F(ClientInterceptorsStreamingEnd2endTest, ServerStreamingTest) {
TEST_F(ClientInterceptorsStreamingEnd2endTest, ClientStreamingHijackingTest) {
ChannelArguments args;
- auto creators = std::unique_ptr<std::vector<
- std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>>(
- new std::vector<
- std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>());
- creators->push_back(
+ std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
+ creators;
+ creators.push_back(
std::unique_ptr<ClientStreamingRpcHijackingInterceptorFactory>(
new ClientStreamingRpcHijackingInterceptorFactory()));
auto channel = experimental::CreateCustomChannelWithInterceptors(