diff options
author | 2017-06-12 09:06:24 -0700 | |
---|---|---|
committer | 2017-06-12 09:06:24 -0700 | |
commit | 63068f3a7c678b9d7d42b85c010962f6878f24bb (patch) | |
tree | e20265c791cfececf6b6893e25276cd5fc6d16b5 /src/core/lib/security/context | |
parent | f8061e88eaee4973ceb82319cdb987741534dd8f (diff) | |
parent | 65b2ff9418b0cd97ff7d8bda2409ea6c7937b9a0 (diff) |
Merge branch 'master' of https://github.com/grpc/grpc into tracing-overhaul
Diffstat (limited to 'src/core/lib/security/context')
-rw-r--r-- | src/core/lib/security/context/security_context.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/core/lib/security/context/security_context.c b/src/core/lib/security/context/security_context.c index e7c3dd45c8..dffe6d2e91 100644 --- a/src/core/lib/security/context/security_context.c +++ b/src/core/lib/security/context/security_context.c @@ -18,6 +18,7 @@ #include <string.h> +#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/support/string.h" #include "src/core/lib/surface/api_trace.h" @@ -315,13 +316,8 @@ static const grpc_arg_pointer_vtable auth_context_pointer_vtable = { auth_context_pointer_cmp}; grpc_arg grpc_auth_context_to_arg(grpc_auth_context *p) { - grpc_arg arg; - memset(&arg, 0, sizeof(grpc_arg)); - arg.type = GRPC_ARG_POINTER; - arg.key = GRPC_AUTH_CONTEXT_ARG; - arg.value.pointer.p = p; - arg.value.pointer.vtable = &auth_context_pointer_vtable; - return arg; + return grpc_channel_arg_pointer_create(GRPC_AUTH_CONTEXT_ARG, p, + &auth_context_pointer_vtable); } grpc_auth_context *grpc_auth_context_from_arg(const grpc_arg *arg) { |