From fb93d195f2791ae26da71d0d44f5010e2361d0a8 Mon Sep 17 00:00:00 2001 From: ctiller Date: Mon, 15 Dec 2014 10:40:05 -0800 Subject: Fix mixing function, and make it universally used. Change on 2014/12/15 by ctiller ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=82155669 --- src/core/transport/chttp2/stream_encoder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/transport/chttp2') 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; -- cgit v1.2.3