diff options
author | Craig Tiller <ctiller@google.com> | 2016-11-18 12:45:16 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-11-18 12:45:16 -0800 |
commit | ac5f518016fbdce5f054e725be1eb1851ac4901d (patch) | |
tree | ca8270ae0986c479cbf8cd5a352547aedb9fd7ec /src/core/lib/security/transport | |
parent | e17029353010d0ef393d0feeb14df20321d6c984 (diff) | |
parent | b28c7e8710638b362e5bfdd7dd81a45241c376e8 (diff) |
Merge branch 'slice_with_exec_ctx' into eliminate_mdstr
Diffstat (limited to 'src/core/lib/security/transport')
-rw-r--r-- | src/core/lib/security/transport/client_auth_filter.c | 8 | ||||
-rw-r--r-- | src/core/lib/security/transport/server_auth_filter.c | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/core/lib/security/transport/client_auth_filter.c b/src/core/lib/security/transport/client_auth_filter.c index e2e4a09e62..d680c1ef13 100644 --- a/src/core/lib/security/transport/client_auth_filter.c +++ b/src/core/lib/security/transport/client_auth_filter.c @@ -256,17 +256,17 @@ static void auth_start_transport_op(grpc_exec_ctx *exec_ctx, grpc_mdelem md = l->md; /* Pointer comparison is OK for md_elems created from the same context. */ - if (grpc_slice_cmp(md->key, GRPC_MDSTR_AUTHORITY) == 0) { + if (grpc_slice_cmp(GRPC_MDKEY(md), GRPC_MDSTR_AUTHORITY) == 0) { if (calld->have_host) { grpc_slice_unref_internal(exec_ctx, calld->host); } - calld->host = grpc_slice_ref_internal(md->value); + calld->host = grpc_slice_ref_internal(GRPC_MDVALUE(md)); calld->have_host = true; - } else if (grpc_slice_cmp(md->key, GRPC_MDSTR_PATH) == 0) { + } else if (grpc_slice_cmp(GRPC_MDKEY(md), GRPC_MDSTR_PATH) == 0) { if (calld->have_method) { grpc_slice_unref_internal(exec_ctx, calld->method); } - calld->method = grpc_slice_ref_internal(md->value); + calld->method = grpc_slice_ref_internal(GRPC_MDVALUE(md)); calld->have_method = true; } } diff --git a/src/core/lib/security/transport/server_auth_filter.c b/src/core/lib/security/transport/server_auth_filter.c index e7c0f1a079..1c4843fc14 100644 --- a/src/core/lib/security/transport/server_auth_filter.c +++ b/src/core/lib/security/transport/server_auth_filter.c @@ -69,8 +69,8 @@ static grpc_metadata_array metadata_batch_to_md_array( for (l = batch->list.head; l != NULL; l = l->next) { grpc_metadata *usr_md = NULL; grpc_mdelem md = l->md; - grpc_slice key = md->key; - grpc_slice value = md->value; + grpc_slice key = GRPC_MDKEY(md); + grpc_slice value = GRPC_MDVALUE(md); if (result.count == result.capacity) { result.capacity = GPR_MAX(result.capacity + 8, result.capacity * 2); result.metadata = @@ -90,9 +90,9 @@ static grpc_mdelem remove_consumed_md(grpc_exec_ctx *exec_ctx, void *user_data, size_t i; for (i = 0; i < calld->num_consumed_md; i++) { const grpc_metadata *consumed_md = &calld->consumed_md[i]; - if (grpc_slice_cmp(md->key, consumed_md->key) == 0 && - grpc_slice_cmp(md->value, consumed_md->value) == 0) - return NULL; + if (grpc_slice_cmp(GRPC_MDKEY(md), consumed_md->key) == 0 && + grpc_slice_cmp(GRPC_MDKEY(md), consumed_md->value) == 0) + return GRPC_MDNULL; } return md; } |