Address review comments
This commit is contained in:
parent
69b8fe02b6
commit
d36283ab59
|
|
@ -30,15 +30,13 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Parses the first \a name_length bytes of \a name as a
|
||||
* grpc_compression_algorithm instance, updating \a algorithm. Returns 1 upon
|
||||
* success, 0 otherwise. */
|
||||
/** Parses the \a slice as a grpc_compression_algorithm instance and updating \a
|
||||
* algorithm. Returns 1 upon success, 0 otherwise. */
|
||||
GRPCAPI int grpc_compression_algorithm_parse(
|
||||
grpc_slice value, grpc_compression_algorithm *algorithm);
|
||||
|
||||
/** Parses the first \a name_length bytes of \a name as a
|
||||
* grpc_stream_compression_algorithm instance, updating \a algorithm. Returns 1
|
||||
* upon success, 0 otherwise. */
|
||||
/** Parses the \a slice as a grpc_stream_compression_algorithm instance and
|
||||
* updating \a algorithm. Returns 1 upon success, 0 otherwise. */
|
||||
int grpc_stream_compression_algorithm_parse(
|
||||
grpc_slice name, grpc_stream_compression_algorithm *algorithm);
|
||||
|
||||
|
|
|
|||
|
|
@ -125,17 +125,19 @@ static grpc_error *process_send_initial_metadata(
|
|||
GRPC_MDVALUE(md), &stream_compression_algorithm)) {
|
||||
char *val = grpc_slice_to_c_string(GRPC_MDVALUE(md));
|
||||
gpr_log(GPR_ERROR,
|
||||
"Invalid compression algorithm: '%s' (unknown). Ignoring.", val);
|
||||
"Invalid stream compression algorithm: '%s' (unknown). Ignoring.",
|
||||
val);
|
||||
gpr_free(val);
|
||||
stream_compression_algorithm = GRPC_STREAM_COMPRESS_NONE;
|
||||
}
|
||||
if (!GPR_BITGET(channeld->enabled_stream_compression_algorithms_bitset,
|
||||
stream_compression_algorithm)) {
|
||||
char *val = grpc_slice_to_c_string(GRPC_MDVALUE(md));
|
||||
gpr_log(GPR_ERROR,
|
||||
"Invalid compression algorithm: '%s' (previously disabled). "
|
||||
"Ignoring.",
|
||||
val);
|
||||
gpr_log(
|
||||
GPR_ERROR,
|
||||
"Invalid stream compression algorithm: '%s' (previously disabled). "
|
||||
"Ignoring.",
|
||||
val);
|
||||
gpr_free(val);
|
||||
stream_compression_algorithm = GRPC_STREAM_COMPRESS_NONE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue