diff options
author | David Garcia Quintas <dgq@google.com> | 2015-07-23 04:58:20 -0700 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2015-07-23 04:58:20 -0700 |
commit | 7c0d914cce379f14a1adfae9374641967c45d7b2 (patch) | |
tree | 5357b9b9b4d376ad6f165cbb47777823240bc59b /src | |
parent | 607dd2eeb7edb055c3cda8c2206d5cfc99ef8190 (diff) |
wip for accept-encoding into tests
Diffstat (limited to 'src')
-rw-r--r-- | src/core/surface/call.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/surface/call.c b/src/core/surface/call.c index 9d02d365b5..0e97110e5e 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -479,6 +479,12 @@ static void set_compression_algorithm(grpc_call *call, call->compression_algorithm = algo; } +grpc_compression_algorithm grpc_call_get_compression_algorithm( + const grpc_call *call) { + return call->compression_algorithm; +} + + static void set_encodings_accepted_by_peer(grpc_call *call, const gpr_slice accept_encoding_slice) { size_t i; @@ -1350,7 +1356,7 @@ static gpr_uint32 decode_compression(grpc_mdelem *md) { void *user_data = grpc_mdelem_get_user_data(md, destroy_compression); if (user_data) { algorithm = - ((grpc_compression_level)(gpr_intptr)user_data) - COMPRESS_OFFSET; + ((grpc_compression_algorithm)(gpr_intptr)user_data) - COMPRESS_OFFSET; } else { const char *md_c_str = grpc_mdstr_as_c_string(md->value); if (!grpc_compression_algorithm_parse(md_c_str, strlen(md_c_str), |