aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp/common/secure_auth_context.cc
diff options
context:
space:
mode:
authorGravatar yang-g <yangg@google.com>2015-07-06 15:05:48 -0700
committerGravatar yang-g <yangg@google.com>2015-07-06 15:05:48 -0700
commit8068f869747529fe800586bd2a7cb34b0573dcae (patch)
treec7ee3f65e93818f77e72c7f03e8bddee77e50340 /src/cpp/common/secure_auth_context.cc
parent5ea46ab2482c3724fbc7fd0aab55f324fb65999c (diff)
Add a unit test
Diffstat (limited to 'src/cpp/common/secure_auth_context.cc')
-rw-r--r--src/cpp/common/secure_auth_context.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cpp/common/secure_auth_context.cc b/src/cpp/common/secure_auth_context.cc
index 4e616b913e..d3606af0f6 100644
--- a/src/cpp/common/secure_auth_context.cc
+++ b/src/cpp/common/secure_auth_context.cc
@@ -38,9 +38,11 @@
namespace grpc {
SecureAuthContext::SecureAuthContext(grpc_auth_context* ctx)
- : ctx_(grpc_auth_context_ref(ctx)) {}
+ : ctx_(GRPC_AUTH_CONTEXT_REF(ctx, "SecureAuthContext")) {}
-SecureAuthContext::~SecureAuthContext() { grpc_auth_context_unref(ctx_); }
+SecureAuthContext::~SecureAuthContext() {
+ GRPC_AUTH_CONTEXT_UNREF(ctx_, "SecureAuthContext");
+}
std::vector<grpc::string> SecureAuthContext::GetPeerIdentity() const {
if (!ctx_) {