aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2017-07-17 15:16:26 -0700
committerGravatar Muxi Yan <mxyan@google.com>2017-07-17 15:16:39 -0700
commitcf7c318fd3c0deb31c93b8b1f6c593ee33dee4c7 (patch)
tree4ed809e6c3b2a8669b9a8cd10d18b6cdb52cf831
parentc5f4200e8339fefc600814ee14156828f8a67a62 (diff)
parent26b33dedc2c065213070e4f820ca65365f712150 (diff)
Merge changes in transport from #11780
-rw-r--r--src/core/ext/transport/chttp2/transport/chttp2_transport.c19
-rw-r--r--src/core/ext/transport/chttp2/transport/writing.c4
2 files changed, 11 insertions, 12 deletions
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c
index 48b9ee6f01..fbf54c00e6 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c
+++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c
@@ -1692,8 +1692,8 @@ void grpc_chttp2_maybe_complete_recv_message(grpc_exec_ctx *exec_ctx,
&s->frame_storage);
grpc_slice_buffer_reset_and_unref_internal(
exec_ctx, &s->unprocessed_incoming_frames_buffer);
- error =
- GRPC_ERROR_CREATE_FROM_STATIC_STRING("Stream decompression error.");
+ error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Stream decompression error.");
} else {
error = grpc_deframe_unprocessed_incoming_frames(
exec_ctx, &s->data_parser, s, &s->decompressed_data_buffer,
@@ -1754,16 +1754,14 @@ void grpc_chttp2_maybe_complete_recv_trailing_metadata(grpc_exec_ctx *exec_ctx,
* maybe decompress the next 5 bytes in the stream. */
bool end_of_context;
if (!s->stream_decompression_ctx) {
- s->stream_decompression_ctx =
- grpc_stream_compression_context_create(
- GRPC_STREAM_COMPRESSION_DECOMPRESS);
+ s->stream_decompression_ctx = grpc_stream_compression_context_create(
+ GRPC_STREAM_COMPRESSION_DECOMPRESS);
}
if (!grpc_stream_decompress(s->stream_decompression_ctx,
&s->frame_storage,
- &s->unprocessed_incoming_frames_buffer,
- NULL, 5, &end_of_context)) {
- grpc_slice_buffer_reset_and_unref_internal(exec_ctx,
- &s->frame_storage);
+ &s->unprocessed_incoming_frames_buffer, NULL,
+ 5, &end_of_context)) {
+ grpc_slice_buffer_reset_and_unref_internal(exec_ctx, &s->frame_storage);
grpc_slice_buffer_reset_and_unref_internal(
exec_ctx, &s->unprocessed_incoming_frames_buffer);
s->seen_error = true;
@@ -1777,7 +1775,8 @@ void grpc_chttp2_maybe_complete_recv_trailing_metadata(grpc_exec_ctx *exec_ctx,
}
}
}
- if (s->read_closed && s->frame_storage.length == 0 && s->unprocessed_incoming_frames_buffer.length == 0 &&
+ if (s->read_closed && s->frame_storage.length == 0 &&
+ s->unprocessed_incoming_frames_buffer.length == 0 &&
(!pending_data || s->seen_error) &&
s->recv_trailing_metadata_finished != NULL) {
grpc_chttp2_incoming_metadata_buffer_publish(
diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c
index d7221eaf30..dd20ff61ae 100644
--- a/src/core/ext/transport/chttp2/transport/writing.c
+++ b/src/core/ext/transport/chttp2/transport/writing.c
@@ -315,8 +315,8 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write(
[GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE],
GPR_MIN(stream_outgoing_window, t->outgoing_window));
if (max_outgoing > 0) {
- bool is_last_data_frame;
- bool is_last_frame;
+ bool is_last_data_frame = false;
+ bool is_last_frame = false;
if (s->stream_compression_send_enabled) {
while ((s->flow_controlled_buffer.length > 0 ||
s->compressed_data_buffer.length > 0) &&