diff options
author | Muxi Yan <mxyan@google.com> | 2018-01-19 12:20:15 -0800 |
---|---|---|
committer | Muxi Yan <mxyan@google.com> | 2018-01-19 12:20:15 -0800 |
commit | fb061c329ac5086b62619b118191574f3fd27a79 (patch) | |
tree | 6a855770d7218425a2cd53bc378800c30d6c8525 /src/core/lib/compression | |
parent | 032e9b32dc5978a042bdda5c3031ae6cbd928973 (diff) | |
parent | 9813858908da2e7deaa58d91f4030e6881e364e3 (diff) |
Merge remote-tracking branch 'upstream/master' into fix-stream-compression-config-interface
Diffstat (limited to 'src/core/lib/compression')
-rw-r--r-- | src/core/lib/compression/stream_compression_gzip.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/lib/compression/stream_compression_gzip.cc b/src/core/lib/compression/stream_compression_gzip.cc index 9d829b31db..897f3918a7 100644 --- a/src/core/lib/compression/stream_compression_gzip.cc +++ b/src/core/lib/compression/stream_compression_gzip.cc @@ -114,7 +114,8 @@ static bool gzip_flate(grpc_stream_compression_context_gzip* ctx, if (ctx->zs.avail_out == 0) { grpc_slice_buffer_add(out, slice_out); } else if (ctx->zs.avail_out < slice_size) { - slice_out.data.refcounted.length -= ctx->zs.avail_out; + size_t len = GRPC_SLICE_LENGTH(slice_out); + GRPC_SLICE_SET_LENGTH(slice_out, len - ctx->zs.avail_out); grpc_slice_buffer_add(out, slice_out); } else { grpc_slice_unref_internal(slice_out); |