aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/channel/message_size_filter.c
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-11-18 17:14:49 -0800
committerGravatar Craig Tiller <ctiller@google.com>2016-11-18 17:14:49 -0800
commit480e1d8d9fcf2165f09412318f75dd3f6e01fb96 (patch)
tree46c9ff5f836d4eb94976d56f2f94977288d2ab81 /src/core/lib/channel/message_size_filter.c
parent50d6e7e79a7fd2c821fe95bb04a532b19032f8e3 (diff)
parent501a4fc19c6f1a1ce5f7eab78a3398d4b09605b7 (diff)
Merge github.com:grpc/grpc into eliminate_mdstr
Diffstat (limited to 'src/core/lib/channel/message_size_filter.c')
-rw-r--r--src/core/lib/channel/message_size_filter.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/core/lib/channel/message_size_filter.c b/src/core/lib/channel/message_size_filter.c
index bddfba4770..debd41cca2 100644
--- a/src/core/lib/channel/message_size_filter.c
+++ b/src/core/lib/channel/message_size_filter.c
@@ -34,6 +34,7 @@
#include <limits.h>
#include <string.h>
+#include <grpc/impl/codegen/grpc_types.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
@@ -42,10 +43,6 @@
#include "src/core/lib/support/string.h"
#include "src/core/lib/transport/service_config.h"
-#define DEFAULT_MAX_SEND_MESSAGE_LENGTH -1 // Unlimited.
-// The protobuf library will (by default) start warning at 100 megs.
-#define DEFAULT_MAX_RECV_MESSAGE_LENGTH (4 * 1024 * 1024)
-
typedef struct message_size_limits {
int max_send_size;
int max_recv_size;
@@ -205,20 +202,20 @@ static void init_channel_elem(grpc_exec_ctx* exec_ctx,
GPR_ASSERT(!args->is_last);
channel_data* chand = elem->channel_data;
memset(chand, 0, sizeof(*chand));
- chand->max_send_size = DEFAULT_MAX_SEND_MESSAGE_LENGTH;
- chand->max_recv_size = DEFAULT_MAX_RECV_MESSAGE_LENGTH;
+ chand->max_send_size = GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH;
+ chand->max_recv_size = GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH;
for (size_t i = 0; i < args->channel_args->num_args; ++i) {
if (strcmp(args->channel_args->args[i].key,
GRPC_ARG_MAX_SEND_MESSAGE_LENGTH) == 0) {
- const grpc_integer_options options = {DEFAULT_MAX_SEND_MESSAGE_LENGTH, 0,
- INT_MAX};
+ const grpc_integer_options options = {
+ GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH, 0, INT_MAX};
chand->max_send_size =
grpc_channel_arg_get_integer(&args->channel_args->args[i], options);
}
if (strcmp(args->channel_args->args[i].key,
GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH) == 0) {
- const grpc_integer_options options = {DEFAULT_MAX_RECV_MESSAGE_LENGTH, 0,
- INT_MAX};
+ const grpc_integer_options options = {
+ GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH, 0, INT_MAX};
chand->max_recv_size =
grpc_channel_arg_get_integer(&args->channel_args->args[i], options);
}