diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index a2090853864..c51ffa44930 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -338,7 +338,7 @@ typedef struct grpc_op { * Otherwise, \a compression_level won't be considered */ struct { uint8_t is_set; - grpc_compression_level compression_level; + grpc_compression_level level; } maybe_compression_level; } send_initial_metadata; grpc_byte_buffer *send_message; diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 6fc91cb7ea9..54c93f88297 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1370,8 +1370,7 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx, bool level_set = false; if (op->data.send_initial_metadata.maybe_compression_level.is_set) { effective_compression_level = - op->data.send_initial_metadata.maybe_compression_level - .compression_level; + op->data.send_initial_metadata.maybe_compression_level.level; level_set = true; } else { const grpc_compression_options copts = diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m index 27723afb0e9..a3fa5938cdd 100644 --- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m +++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m @@ -73,7 +73,7 @@ _op.data.send_initial_metadata.count = metadata.count; _op.data.send_initial_metadata.metadata = metadata.grpc_metadataArray; _op.data.send_initial_metadata.maybe_compression_level.is_set = false; - _op.data.send_initial_metadata.maybe_compression_level.compression_level = 0; + _op.data.send_initial_metadata.maybe_compression_level.level = 0; _handler = handler; } return self; diff --git a/test/core/end2end/tests/compressed_payload.c b/test/core/end2end/tests/compressed_payload.c index 34947fbe9d8..ec5c012238e 100644 --- a/test/core/end2end/tests/compressed_payload.c +++ b/test/core/end2end/tests/compressed_payload.c @@ -379,7 +379,7 @@ static void request_with_payload_template( op->data.send_initial_metadata.count = 0; if (set_server_level) { op->data.send_initial_metadata.maybe_compression_level.is_set = true; - op->data.send_initial_metadata.maybe_compression_level.compression_level = + op->data.send_initial_metadata.maybe_compression_level.level = server_compression_level; } op->flags = 0;