aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/transport/chttp2
diff options
context:
space:
mode:
authorGravatar ctiller <ctiller@google.com>2014-12-15 10:40:05 -0800
committerGravatar Michael Lumish <mlumish@google.com>2014-12-15 14:37:56 -0800
commitfb93d195f2791ae26da71d0d44f5010e2361d0a8 (patch)
tree06e57a69f08e971596a5dba7cb9d2d78dd8f8887 /src/core/transport/chttp2
parent482a5be0b98e796ba0d084c7fdbf0755742ffb69 (diff)
Fix mixing function, and make it universally used.
Change on 2014/12/15 by ctiller <ctiller@google.com> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=82155669
Diffstat (limited to 'src/core/transport/chttp2')
-rw-r--r--src/core/transport/chttp2/stream_encoder.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/transport/chttp2/stream_encoder.c b/src/core/transport/chttp2/stream_encoder.c
index 07eeb0a474..8595a59879 100644
--- a/src/core/transport/chttp2/stream_encoder.c
+++ b/src/core/transport/chttp2/stream_encoder.c
@@ -175,7 +175,7 @@ static gpr_uint8 *add_tiny_header_data(framer_state *st, int len) {
static void add_elem(grpc_chttp2_hpack_compressor *c, grpc_mdelem *elem) {
gpr_uint32 key_hash = elem->key->hash;
- gpr_uint32 elem_hash = key_hash ^ elem->value->hash;
+ gpr_uint32 elem_hash = GRPC_MDSTR_KV_HASH(key_hash, elem->value->hash);
gpr_uint32 new_index = c->tail_remote_index + c->table_elems + 1;
gpr_uint32 elem_size = 32 + GPR_SLICE_LENGTH(elem->key->slice) +
GPR_SLICE_LENGTH(elem->value->slice);
@@ -354,7 +354,7 @@ static gpr_uint32 dynidx(grpc_chttp2_hpack_compressor *c, gpr_uint32 index) {
static void hpack_enc(grpc_chttp2_hpack_compressor *c, grpc_mdelem *elem,
framer_state *st) {
gpr_uint32 key_hash = elem->key->hash;
- gpr_uint32 elem_hash = key_hash ^ elem->value->hash;
+ gpr_uint32 elem_hash = GRPC_MDSTR_KV_HASH(key_hash, elem->value->hash);
size_t decoder_space_usage;
gpr_uint32 indices_key;
int should_add_elem;