Merge branch 'minimal' into minimal_test

reviewable/pr10449/r1
Craig Tiller 8 years ago
commit 6461c34e4e
  1. 36
      BUILD
  2. 28
      src/core/lib/surface/init.c

36
BUILD

@ -75,6 +75,8 @@ grpc_cc_library(
"grpc_transport_chttp2_client_secure",
"grpc_transport_chttp2_server_insecure",
"grpc_transport_chttp2_server_secure",
"grpc_max_age_filter",
"grpc_message_size_filter",
],
)
@ -112,6 +114,8 @@ grpc_cc_library(
"grpc_resolver_sockaddr",
"grpc_transport_chttp2_client_insecure",
"grpc_transport_chttp2_server_insecure",
"grpc_max_age_filter",
"grpc_message_size_filter",
],
)
@ -436,8 +440,6 @@ grpc_cc_library(
"src/core/lib/channel/handshaker_registry.c",
"src/core/lib/channel/http_client_filter.c",
"src/core/lib/channel/http_server_filter.c",
"src/core/ext/filters/max_age/max_age_filter.c",
"src/core/ext/filters/message_size/message_size_filter.c",
"src/core/lib/compression/compression.c",
"src/core/lib/compression/message_compress.c",
"src/core/lib/debug/trace.c",
@ -564,8 +566,6 @@ grpc_cc_library(
"src/core/lib/channel/handshaker_registry.h",
"src/core/lib/channel/http_client_filter.h",
"src/core/lib/channel/http_server_filter.h",
"src/core/ext/filters/max_age/max_age_filter.h",
"src/core/ext/filters/message_size/message_size_filter.h",
"src/core/lib/compression/algorithm_metadata.h",
"src/core/lib/compression/message_compress.h",
"src/core/lib/debug/trace.h",
@ -736,6 +736,34 @@ grpc_cc_library(
],
)
grpc_cc_library(
name = "grpc_max_age_filter",
srcs = [
"src/core/ext/filters/max_age/max_age_filter.c",
],
hdrs = [
"src/core/ext/filters/max_age/max_age_filter.h",
],
language = "c",
deps = [
"grpc_base",
],
)
grpc_cc_library(
name = "grpc_message_size_filter",
srcs = [
"src/core/ext/filters/message_size/message_size_filter.c",
],
hdrs = [
"src/core/ext/filters/message_size/message_size_filter.h",
],
language = "c",
deps = [
"grpc_base",
],
)
grpc_cc_library(
name = "grpc_codegen",
language = "c",

@ -105,6 +105,22 @@ static bool maybe_add_http_filter(grpc_exec_ctx *exec_ctx,
return true;
}
typedef struct {
const grpc_channel_filter *filter;
const char *controlling_channel_arg;
bool default_on;
} maybe_prepend_filter_args;
static const maybe_prepend_filter_args message_size_args = {
&grpc_message_size_filter, NULL, true};
static bool maybe_prepend_filter(grpc_exec_ctx *exec_ctx,
grpc_channel_stack_builder *builder,
void *arg) {
return grpc_channel_stack_builder_prepend_filter(
builder, (const grpc_channel_filter *)arg, NULL, NULL);
}
static void register_builtin_channel_init() {
grpc_channel_init_register_stage(
GRPC_CLIENT_DIRECT_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
@ -113,6 +129,18 @@ static void register_builtin_channel_init() {
GRPC_SERVER_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY, prepend_filter,
(void *)&grpc_server_deadline_filter);
grpc_channel_init_register_stage(
<<<<<<< HEAD
=======
GRPC_CLIENT_SUBCHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
maybe_prepend_filter, (void *)&message_size_args);
grpc_channel_init_register_stage(
GRPC_CLIENT_DIRECT_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
prepend_filter, (void *)&grpc_message_size_filter);
grpc_channel_init_register_stage(
GRPC_SERVER_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY, prepend_filter,
(void *)&grpc_message_size_filter);
grpc_channel_init_register_stage(
>>>>>>> 6b97e5344f4dddcdad1e0525b733162c0025b770
GRPC_CLIENT_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY, prepend_filter,
(void *)&grpc_compress_filter);
grpc_channel_init_register_stage(

Loading…
Cancel
Save