diff --git a/build.yaml b/build.yaml index 2677dae0fb44505d75a27d9bbc2db606f81a9cfe..f5bdec6601fe516bca76d69c58d08cad502f0414 100644 --- a/build.yaml +++ b/build.yaml @@ -808,6 +808,7 @@ filegroups: plugin: grpc_workaround_cronet_compression_filter uses: - grpc_base + - grpc_server_backward_compatibility - name: nanopb headers: - third_party/nanopb/pb.h diff --git a/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c b/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c index 57f0f0ae41924825792a355ee1ddfe672af57164..ba4f958e186b846c818b5bdffb0a2bd424971a73 100644 --- a/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c +++ b/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c @@ -112,7 +112,8 @@ static void start_transport_stream_op_batch( } if (op->send_message) { - /* Send message happens after client's user-agent (initial metadata) is received, so workaround_active must be set already */ + /* Send message happens after client's user-agent (initial metadata) is + * received, so workaround_active must be set already */ if (calld->workaround_active) { op->payload->send_message.send_message->flags |= GRPC_WRITE_NO_COMPRESS; } @@ -204,15 +205,16 @@ const grpc_channel_filter grpc_workaround_cronet_compression_filter = { static bool register_workaround_cronet_compression( grpc_exec_ctx* exec_ctx, grpc_channel_stack_builder* builder, void* arg) { - const grpc_channel_args *channel_args = + const grpc_channel_args* channel_args = grpc_channel_stack_builder_get_channel_arguments(builder); - const grpc_arg *a = - grpc_channel_args_find(channel_args, GRPC_ARG_WORKAROUND_CRONET_COMPRESSION); + const grpc_arg* a = grpc_channel_args_find( + channel_args, GRPC_ARG_WORKAROUND_CRONET_COMPRESSION); if (a == NULL) { return true; } if (a->type != GRPC_ARG_INTEGER) { - gpr_log(GPR_ERROR, "%s ignored: it must be an integer", GRPC_ARG_WORKAROUND_CRONET_COMPRESSION); + gpr_log(GPR_ERROR, "%s ignored: it must be an integer", + GRPC_ARG_WORKAROUND_CRONET_COMPRESSION); return true; } if (a->value.integer == 0) { diff --git a/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h b/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h index 289223477f2b3050597f09268fd14293a9f413d0..def30f223619856795e7831a0b03348c5777cd8b 100644 --- a/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h +++ b/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h @@ -29,11 +29,11 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#ifndef GRPC_CORE_EXT_FILTERS_WORKAROUNDS_WORKAROUND_CRONET_COMPRESSION -#define GRPC_CORE_EXT_FILTERS_WORKAROUNDS_WORKAROUND_CRONET_COMPRESSION +#ifndef GRPC_CORE_EXT_FILTERS_WORKAROUNDS_WORKAROUND_CRONET_COMPRESSION_FILTER_H +#define GRPC_CORE_EXT_FILTERS_WORKAROUNDS_WORKAROUND_CRONET_COMPRESSION_FILTER_H #include "src/core/lib/channel/channel_stack.h" extern const grpc_channel_filter grpc_workaround_cronet_compression_filter; -#endif /* GRPC_CORE_EXT_FILTERS_WORKAROUNDS_WORKAROUND_CRONET_COMPRESSION */ +#endif /* GRPC_CORE_EXT_FILTERS_WORKAROUNDS_WORKAROUND_CRONET_COMPRESSION_FILTER_H */ diff --git a/src/core/ext/filters/workarounds/workaround_utils.c b/src/core/ext/filters/workarounds/workaround_utils.c index fef81395b0dedeabea906534603feb48c928f0de..09d54f8a76151fccac626682cbe03858603e651a 100644 --- a/src/core/ext/filters/workarounds/workaround_utils.c +++ b/src/core/ext/filters/workarounds/workaround_utils.c @@ -41,7 +41,9 @@ static void destroy_user_agent_md(void *user_agent_md) { static user_agent_parser user_agent_parsers[GRPC_MAX_WORKAROUND_ID]; grpc_user_agent_md *grpc_parse_user_agent(grpc_mdelem md) { - grpc_user_agent_md *user_agent_md = (grpc_user_agent_md*)grpc_mdelem_get_user_data(md, destroy_user_agent_md); + grpc_user_agent_md *user_agent_md = + (grpc_user_agent_md *)grpc_mdelem_get_user_data(md, + destroy_user_agent_md); if (NULL != user_agent_md) { return user_agent_md; diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index 25acc88a55ea0de866e63e2d8aff285cd5e279a8..29e142d87c26ff2d635482afbe976b926a848ab3 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -8780,7 +8780,8 @@ { "deps": [ "gpr", - "grpc_base" + "grpc_base", + "grpc_server_backward_compatibility" ], "headers": [ "src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h"