aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
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
parent5ea46ab2482c3724fbc7fd0aab55f324fb65999c (diff)
Add a unit test
Diffstat (limited to 'src')
-rw-r--r--src/core/security/client_auth_filter.c6
-rw-r--r--src/cpp/common/secure_auth_context.cc6
2 files changed, 8 insertions, 4 deletions
diff --git a/src/core/security/client_auth_filter.c b/src/core/security/client_auth_filter.c
index 9f1eae813b..bf3b546fee 100644
--- a/src/core/security/client_auth_filter.c
+++ b/src/core/security/client_auth_filter.c
@@ -214,10 +214,12 @@ static void auth_start_transport_op(grpc_call_element *elem,
sec_ctx = op->context[GRPC_CONTEXT_SECURITY].value;
if (sec_ctx->auth_context == NULL) {
sec_ctx->auth_context =
- grpc_auth_context_ref(chand->security_connector->base.auth_context);
+ GRPC_AUTH_CONTEXT_REF(chand->security_connector->base.auth_context,
+ "client_auth_filter");
} else {
sec_ctx->auth_context->chained =
- grpc_auth_context_ref(chand->security_connector->base.auth_context);
+ GRPC_AUTH_CONTEXT_REF(chand->security_connector->base.auth_context,
+ "client_auth_filter chained");
}
}
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_) {