clang-format

pull/7846/head
Mark D. Roth 8 years ago
parent c3c6fafef8
commit c09e21f546
  1. 4
      src/core/ext/client_config/subchannel.c
  2. 27
      src/core/ext/transport/chttp2/transport/chttp2_transport.c

@ -349,8 +349,8 @@ grpc_subchannel *grpc_subchannel_create(grpc_exec_ctx *exec_ctx,
if (0 == if (0 ==
strcmp(c->args->args[i].key, GRPC_ARG_MAX_RECONNECT_BACKOFF_MS)) { strcmp(c->args->args[i].key, GRPC_ARG_MAX_RECONNECT_BACKOFF_MS)) {
const grpc_integer_options options = {-1, 0, INT_MAX}; const grpc_integer_options options = {-1, 0, INT_MAX};
const int value = grpc_channel_arg_get_integer(&c->args->args[i], const int value =
options); grpc_channel_arg_get_integer(&c->args->args[i], options);
if (value >= 0) { if (value >= 0) {
gpr_backoff_init( gpr_backoff_init(
&c->backoff_state, GRPC_SUBCHANNEL_RECONNECT_BACKOFF_MULTIPLIER, &c->backoff_state, GRPC_SUBCHANNEL_RECONNECT_BACKOFF_MULTIPLIER,

@ -341,8 +341,8 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
GRPC_ARG_MAX_CONCURRENT_STREAMS); GRPC_ARG_MAX_CONCURRENT_STREAMS);
} else { } else {
const grpc_integer_options options = {-1, 0, INT_MAX}; const grpc_integer_options options = {-1, 0, INT_MAX};
const int value = grpc_channel_arg_get_integer(&channel_args->args[i], const int value =
options); grpc_channel_arg_get_integer(&channel_args->args[i], options);
if (value >= 0) { if (value >= 0) {
push_setting(exec_ctx, t, push_setting(exec_ctx, t,
GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS, GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS,
@ -352,8 +352,8 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
} else if (0 == strcmp(channel_args->args[i].key, } else if (0 == strcmp(channel_args->args[i].key,
GRPC_ARG_HTTP2_INITIAL_SEQUENCE_NUMBER)) { GRPC_ARG_HTTP2_INITIAL_SEQUENCE_NUMBER)) {
const grpc_integer_options options = {-1, 0, INT_MAX}; const grpc_integer_options options = {-1, 0, INT_MAX};
const int value = grpc_channel_arg_get_integer(&channel_args->args[i], const int value =
options); grpc_channel_arg_get_integer(&channel_args->args[i], options);
if (value >= 0) { if (value >= 0) {
if ((t->global.next_stream_id & 1) != (value & 1)) { if ((t->global.next_stream_id & 1) != (value & 1)) {
gpr_log(GPR_ERROR, "%s: low bit must be %d on %s", gpr_log(GPR_ERROR, "%s: low bit must be %d on %s",
@ -367,16 +367,16 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
} else if (0 == strcmp(channel_args->args[i].key, } else if (0 == strcmp(channel_args->args[i].key,
GRPC_ARG_HTTP2_STREAM_LOOKAHEAD_BYTES)) { GRPC_ARG_HTTP2_STREAM_LOOKAHEAD_BYTES)) {
const grpc_integer_options options = {-1, 5, INT_MAX}; const grpc_integer_options options = {-1, 5, INT_MAX};
const int value = grpc_channel_arg_get_integer(&channel_args->args[i], const int value =
options); grpc_channel_arg_get_integer(&channel_args->args[i], options);
if (value >= 0) { if (value >= 0) {
t->global.stream_lookahead = (uint32_t)value; t->global.stream_lookahead = (uint32_t)value;
} }
} else if (0 == strcmp(channel_args->args[i].key, } else if (0 == strcmp(channel_args->args[i].key,
GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_DECODER)) { GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_DECODER)) {
const grpc_integer_options options = {-1, 0, INT_MAX}; const grpc_integer_options options = {-1, 0, INT_MAX};
const int value = grpc_channel_arg_get_integer(&channel_args->args[i], const int value =
options); grpc_channel_arg_get_integer(&channel_args->args[i], options);
if (value >= 0) { if (value >= 0) {
push_setting(exec_ctx, t, GRPC_CHTTP2_SETTINGS_HEADER_TABLE_SIZE, push_setting(exec_ctx, t, GRPC_CHTTP2_SETTINGS_HEADER_TABLE_SIZE,
(uint32_t)value); (uint32_t)value);
@ -384,18 +384,17 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
} else if (0 == strcmp(channel_args->args[i].key, } else if (0 == strcmp(channel_args->args[i].key,
GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_ENCODER)) { GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_ENCODER)) {
const grpc_integer_options options = {-1, 0, INT_MAX}; const grpc_integer_options options = {-1, 0, INT_MAX};
const int value = grpc_channel_arg_get_integer(&channel_args->args[i], const int value =
options); grpc_channel_arg_get_integer(&channel_args->args[i], options);
if (value >= 0) { if (value >= 0) {
grpc_chttp2_hpack_compressor_set_max_usable_size( grpc_chttp2_hpack_compressor_set_max_usable_size(
&t->writing.hpack_compressor, &t->writing.hpack_compressor, (uint32_t)value);
(uint32_t)value);
} }
} else if (0 == strcmp(channel_args->args[i].key, } else if (0 == strcmp(channel_args->args[i].key,
GRPC_ARG_MAX_METADATA_SIZE)) { GRPC_ARG_MAX_METADATA_SIZE)) {
const grpc_integer_options options = {-1, 0, INT_MAX}; const grpc_integer_options options = {-1, 0, INT_MAX};
const int value = grpc_channel_arg_get_integer(&channel_args->args[i], const int value =
options); grpc_channel_arg_get_integer(&channel_args->args[i], options);
if (value >= 0) { if (value >= 0) {
push_setting(exec_ctx, t, GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE, push_setting(exec_ctx, t, GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE,
(uint32_t)value); (uint32_t)value);

Loading…
Cancel
Save