aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/channel/compress_filter.c
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2015-06-23 17:07:12 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2015-06-23 17:07:12 -0700
commit92ce5885592e4b854ce56857feb23b55741781e0 (patch)
tree18f8590f5e71bf9cb8705252f74643d03c0921a9 /src/core/channel/compress_filter.c
parente75d4c85315c4260f8eea5516dfba986982a6771 (diff)
Fixed bad merge.
Diffstat (limited to 'src/core/channel/compress_filter.c')
-rw-r--r--src/core/channel/compress_filter.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/channel/compress_filter.c b/src/core/channel/compress_filter.c
index ad42bbb61c..d617c4f1fd 100644
--- a/src/core/channel/compress_filter.c
+++ b/src/core/channel/compress_filter.c
@@ -166,8 +166,8 @@ static void process_send_ops(grpc_call_element *elem,
sop->data.begin_message.length = calld->slices.length;
sop->data.begin_message.flags |= GRPC_WRITE_INTERNAL_COMPRESS;
} else {
- /* either because the user requested the exception or because compressing
- * would have resulted in a larger output */
+ /* either because the user requested the exception or because
+ * compressing would have resulted in a larger output */
calld->compression_algorithm = GRPC_COMPRESS_NONE;
/* reset the flag compression bit */
sop->data.begin_message.flags &= ~GRPC_WRITE_INTERNAL_COMPRESS;
@@ -181,9 +181,10 @@ static void process_send_ops(grpc_call_element *elem,
break;
case GRPC_OP_SLICE:
if (did_compress) {
- GPR_ASSERT(j < calld->slices.count);
gpr_slice_unref(sop->data.slice);
- sop->data.slice = gpr_slice_ref(calld->slices.slices[j++]);
+ if (j < calld->slices.count) {
+ sop->data.slice = gpr_slice_ref(calld->slices.slices[j++]);
+ }
}
break;
case GRPC_NO_OP: