diff options
author | Craig Tiller <ctiller@google.com> | 2015-04-20 08:47:52 -0700 |
---|---|---|
committer | Yang Gao <yangg@google.com> | 2015-04-20 10:29:40 -0700 |
commit | 84b88847776aff3a350d6e59f7a19659e8930354 (patch) | |
tree | 0fd5e167bdb6d00e9c1188d287d4dd7bafcac948 /src/core/transport/chttp2 | |
parent | f1021031962159ffa2fe0e9cb68a9ab5080c3854 (diff) |
Tidying up proof of concept
Diffstat (limited to 'src/core/transport/chttp2')
-rw-r--r-- | src/core/transport/chttp2/frame.h | 2 | ||||
-rw-r--r-- | src/core/transport/chttp2/frame_settings.c | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/core/transport/chttp2/frame.h b/src/core/transport/chttp2/frame.h index cd1d47342f..ac76c4cc9c 100644 --- a/src/core/transport/chttp2/frame.h +++ b/src/core/transport/chttp2/frame.h @@ -54,7 +54,7 @@ typedef struct { gpr_uint8 process_ping_reply; gpr_uint8 goaway; - gpr_uint32 initial_window_update; + gpr_int64 initial_window_update; gpr_uint32 window_update; gpr_uint32 goaway_last_stream_index; gpr_uint32 goaway_error; diff --git a/src/core/transport/chttp2/frame_settings.c b/src/core/transport/chttp2/frame_settings.c index 9b9374e0fd..2ffce730d5 100644 --- a/src/core/transport/chttp2/frame_settings.c +++ b/src/core/transport/chttp2/frame_settings.c @@ -218,9 +218,13 @@ grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse( return GRPC_CHTTP2_CONNECTION_ERROR; } } - if (parser->id == 4 && parser->incoming_settings[parser->id] != parser->value) { - state->initial_window_update = parser->value - parser->incoming_settings[parser->id]; - gpr_log(GPR_DEBUG, "adding %d for initial_window change", state->window_update); + if (parser->id == GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE && + parser->incoming_settings[parser->id] != parser->value) { + state->initial_window_update = + (gpr_int64)parser->value - + parser->incoming_settings[parser->id]; + gpr_log(GPR_DEBUG, "adding %d for initial_window change", + (int)state->initial_window_update); } parser->incoming_settings[parser->id] = parser->value; if (grpc_http_trace) { |