From 0b405d54d496acc331f1511353b26e9f9a0e4598 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 9 May 2016 15:58:22 -0700 Subject: fixed wrong change --- src/core/lib/compression/message_compress.c | 2 +- src/core/lib/surface/byte_buffer_reader.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/lib/compression/message_compress.c b/src/core/lib/compression/message_compress.c index 699719a523..cbe0b5a285 100644 --- a/src/core/lib/compression/message_compress.c +++ b/src/core/lib/compression/message_compress.c @@ -194,5 +194,5 @@ int grpc_msg_decompress(grpc_compression_algorithm algorithm, break; } gpr_log(GPR_ERROR, "invalid compression algorithm %d", algorithm); - return -1; /* to distinguish it from GRPC_COMPRESS_NONE */ + return 0; } diff --git a/src/core/lib/surface/byte_buffer_reader.c b/src/core/lib/surface/byte_buffer_reader.c index c7f941525d..c97079f638 100644 --- a/src/core/lib/surface/byte_buffer_reader.c +++ b/src/core/lib/surface/byte_buffer_reader.c @@ -64,7 +64,7 @@ void grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader, if (is_compressed(reader->buffer_in)) { if (grpc_msg_decompress(reader->buffer_in->data.raw.compression, &reader->buffer_in->data.raw.slice_buffer, - &decompressed_slices_buffer) < 0) { + &decompressed_slices_buffer) == 0) { gpr_log(GPR_ERROR, "Unexpected error decompressing data for algorithm with enum " "value '%d'. Reading data as if it were uncompressed.", -- cgit v1.2.3