diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-07-15 07:49:41 -0700 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-07-15 07:49:41 -0700 |
commit | 4ed8e401cf6e1813f38cedf37a46d962b3306d8d (patch) | |
tree | ebe6ce23e7fc77a8f090c3a9b12ad243e43dceea /src/core/transport/chttp2 | |
parent | 54f8a39a84f9bbde330c2523d59f6a800d548eef (diff) | |
parent | 0ea6be31be37d1dfa7a3475d37532483b0510bef (diff) |
Merge github.com:grpc/grpc into flow-like-lava-to-a-barnyard
Diffstat (limited to 'src/core/transport/chttp2')
-rw-r--r-- | src/core/transport/chttp2/frame_data.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/transport/chttp2/frame_data.c b/src/core/transport/chttp2/frame_data.c index 0ad62a9999..7e3980159e 100644 --- a/src/core/transport/chttp2/frame_data.c +++ b/src/core/transport/chttp2/frame_data.c @@ -89,12 +89,9 @@ grpc_chttp2_parse_error grpc_chttp2_data_parser_parse( fh_0: case GRPC_CHTTP2_DATA_FH_0: p->frame_type = *cur; - if (++cur == end) { - p->state = GRPC_CHTTP2_DATA_FH_1; - return GRPC_CHTTP2_PARSE_OK; - } switch (p->frame_type) { case 0: + /* noop */ break; case 1: gpr_log(GPR_ERROR, "Compressed GRPC frames not yet supported"); @@ -103,6 +100,10 @@ grpc_chttp2_parse_error grpc_chttp2_data_parser_parse( gpr_log(GPR_ERROR, "Bad GRPC frame type 0x%02x", p->frame_type); return GRPC_CHTTP2_STREAM_ERROR; } + if (++cur == end) { + p->state = GRPC_CHTTP2_DATA_FH_1; + return GRPC_CHTTP2_PARSE_OK; + } /* fallthrough */ case GRPC_CHTTP2_DATA_FH_1: p->frame_size = ((gpr_uint32)*cur) << 24; |