diff options
Diffstat (limited to 'src/core/ext/filters/http/http_filters_plugin.cc')
-rw-r--r-- | src/core/ext/filters/http/http_filters_plugin.cc | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/core/ext/filters/http/http_filters_plugin.cc b/src/core/ext/filters/http/http_filters_plugin.cc index 8f5b856317..064e66e323 100644 --- a/src/core/ext/filters/http/http_filters_plugin.cc +++ b/src/core/ext/filters/http/http_filters_plugin.cc @@ -27,25 +27,25 @@ #include "src/core/lib/transport/transport_impl.h" typedef struct { - const grpc_channel_filter *filter; - const char *control_channel_arg; + const grpc_channel_filter* filter; + const char* control_channel_arg; } optional_filter; static optional_filter compress_filter = { &grpc_message_compress_filter, GRPC_ARG_ENABLE_PER_MESSAGE_COMPRESSION}; static bool is_building_http_like_transport( - grpc_channel_stack_builder *builder) { - grpc_transport *t = grpc_channel_stack_builder_get_transport(builder); + grpc_channel_stack_builder* builder) { + grpc_transport* t = grpc_channel_stack_builder_get_transport(builder); return t != NULL && strstr(t->vtable->name, "http"); } -static bool maybe_add_optional_filter(grpc_exec_ctx *exec_ctx, - grpc_channel_stack_builder *builder, - void *arg) { +static bool maybe_add_optional_filter(grpc_exec_ctx* exec_ctx, + grpc_channel_stack_builder* builder, + void* arg) { if (!is_building_http_like_transport(builder)) return true; - optional_filter *filtarg = (optional_filter *)arg; - const grpc_channel_args *channel_args = + optional_filter* filtarg = (optional_filter*)arg; + const grpc_channel_args* channel_args = grpc_channel_stack_builder_get_channel_arguments(builder); bool enable = grpc_channel_arg_get_bool( grpc_channel_args_find(channel_args, filtarg->control_channel_arg), @@ -55,12 +55,12 @@ static bool maybe_add_optional_filter(grpc_exec_ctx *exec_ctx, : true; } -static bool maybe_add_required_filter(grpc_exec_ctx *exec_ctx, - grpc_channel_stack_builder *builder, - void *arg) { +static bool maybe_add_required_filter(grpc_exec_ctx* exec_ctx, + grpc_channel_stack_builder* builder, + void* arg) { return is_building_http_like_transport(builder) ? grpc_channel_stack_builder_prepend_filter( - builder, (const grpc_channel_filter *)arg, NULL, NULL) + builder, (const grpc_channel_filter*)arg, NULL, NULL) : true; } @@ -77,13 +77,13 @@ extern "C" void grpc_http_filters_init(void) { maybe_add_optional_filter, &compress_filter); grpc_channel_init_register_stage( GRPC_CLIENT_SUBCHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY, - maybe_add_required_filter, (void *)&grpc_http_client_filter); + maybe_add_required_filter, (void*)&grpc_http_client_filter); grpc_channel_init_register_stage( GRPC_CLIENT_DIRECT_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY, - maybe_add_required_filter, (void *)&grpc_http_client_filter); + maybe_add_required_filter, (void*)&grpc_http_client_filter); grpc_channel_init_register_stage( GRPC_SERVER_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY, - maybe_add_required_filter, (void *)&grpc_http_server_filter); + maybe_add_required_filter, (void*)&grpc_http_server_filter); } extern "C" void grpc_http_filters_shutdown(void) {} |