fixed wrong change

pull/6463/head
David Garcia Quintas 9 years ago
parent 303d3082a0
commit 0b405d54d4
  1. 2
      src/core/lib/compression/message_compress.c
  2. 2
      src/core/lib/surface/byte_buffer_reader.c

@ -194,5 +194,5 @@ int grpc_msg_decompress(grpc_compression_algorithm algorithm,
break; break;
} }
gpr_log(GPR_ERROR, "invalid compression algorithm %d", algorithm); gpr_log(GPR_ERROR, "invalid compression algorithm %d", algorithm);
return -1; /* to distinguish it from GRPC_COMPRESS_NONE */ return 0;
} }

@ -64,7 +64,7 @@ void grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader,
if (is_compressed(reader->buffer_in)) { if (is_compressed(reader->buffer_in)) {
if (grpc_msg_decompress(reader->buffer_in->data.raw.compression, if (grpc_msg_decompress(reader->buffer_in->data.raw.compression,
&reader->buffer_in->data.raw.slice_buffer, &reader->buffer_in->data.raw.slice_buffer,
&decompressed_slices_buffer) < 0) { &decompressed_slices_buffer) == 0) {
gpr_log(GPR_ERROR, gpr_log(GPR_ERROR,
"Unexpected error decompressing data for algorithm with enum " "Unexpected error decompressing data for algorithm with enum "
"value '%d'. Reading data as if it were uncompressed.", "value '%d'. Reading data as if it were uncompressed.",

Loading…
Cancel
Save