diff options
author | 2015-07-09 12:56:29 -0700 | |
---|---|---|
committer | 2015-07-09 12:56:29 -0700 | |
commit | d53bc8925b5884d16da3738d11885dcf48ea48e4 (patch) | |
tree | b31d0f75d5998c78f2fabb71ee1e2a0ccc4812cc | |
parent | 3315a845efaf2116cce6184b459f8bb4e642bdde (diff) |
Add missing pieces
-rw-r--r-- | src/cpp/common/secure_create_auth_context.cc | 5 | ||||
-rw-r--r-- | test/core/end2end/tests/request_response_with_payload_and_call_creds.c | 3 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/cpp/common/secure_create_auth_context.cc b/src/cpp/common/secure_create_auth_context.cc index 21994945f8..d81f4bbc4a 100644 --- a/src/cpp/common/secure_create_auth_context.cc +++ b/src/cpp/common/secure_create_auth_context.cc @@ -43,9 +43,8 @@ std::shared_ptr<const AuthContext> CreateAuthContext(grpc_call* call) { if (call == nullptr) { return std::shared_ptr<const AuthContext>(); } - grpc_auth_context* context = - const_cast<grpc_auth_context*>(grpc_call_auth_context(call)); - return std::shared_ptr<const AuthContext>(new SecureAuthContext(context)); + return std::shared_ptr<const AuthContext>( + new SecureAuthContext(grpc_call_auth_context(call))); } } // namespace grpc diff --git a/test/core/end2end/tests/request_response_with_payload_and_call_creds.c b/test/core/end2end/tests/request_response_with_payload_and_call_creds.c index 665ad3d2a6..b5c743b405 100644 --- a/test/core/end2end/tests/request_response_with_payload_and_call_creds.c +++ b/test/core/end2end/tests/request_response_with_payload_and_call_creds.c @@ -173,7 +173,7 @@ static void request_response_with_payload_and_call_creds( size_t details_capacity = 0; int was_cancelled = 2; grpc_credentials *creds = NULL; - const grpc_auth_context *s_auth_context = NULL; + grpc_auth_context *s_auth_context = NULL; c = grpc_channel_create_call(f.client, f.cq, "/foo", "foo.test.google.fr", deadline); @@ -239,6 +239,7 @@ static void request_response_with_payload_and_call_creds( s_auth_context = grpc_call_auth_context(s); GPR_ASSERT(s_auth_context != NULL); print_auth_context(0, s_auth_context); + grpc_auth_context_release(s_auth_context); /* Cannot set creds on the server call object. */ GPR_ASSERT(grpc_call_set_credentials(s, NULL) != GRPC_CALL_OK); |