diff options
author | Craig Tiller <ctiller@google.com> | 2015-06-16 13:00:27 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-06-16 13:00:27 -0700 |
commit | cdf52bc17296335ad5024f258337576aeb856afc (patch) | |
tree | 1982b25d023eb091630e5f809ff374014262d7fc /src/core/transport | |
parent | 9850510e52713ccaf0e49bfad1b8e68efe65a383 (diff) |
Fixing stuff
Diffstat (limited to 'src/core/transport')
-rw-r--r-- | src/core/transport/chttp2/stream_lists.c | 4 | ||||
-rw-r--r-- | src/core/transport/chttp2/writing.c | 4 | ||||
-rw-r--r-- | src/core/transport/chttp2_transport.c | 9 |
3 files changed, 10 insertions, 7 deletions
diff --git a/src/core/transport/chttp2/stream_lists.c b/src/core/transport/chttp2/stream_lists.c index 85f6bd3616..987dc1c11e 100644 --- a/src/core/transport/chttp2/stream_lists.c +++ b/src/core/transport/chttp2/stream_lists.c @@ -158,8 +158,8 @@ void grpc_chttp2_list_add_writing_stream( int grpc_chttp2_list_have_writing_streams( grpc_chttp2_transport_writing *transport_writing) { - return stream_list_empty(TRANSPORT_FROM_WRITING(transport_writing), - GRPC_CHTTP2_LIST_WRITING); + return !stream_list_empty(TRANSPORT_FROM_WRITING(transport_writing), + GRPC_CHTTP2_LIST_WRITING); } int grpc_chttp2_list_pop_writing_stream( diff --git a/src/core/transport/chttp2/writing.c b/src/core/transport/chttp2/writing.c index 6cc19aec83..4b2ee948c7 100644 --- a/src/core/transport/chttp2/writing.c +++ b/src/core/transport/chttp2/writing.c @@ -130,12 +130,14 @@ int grpc_chttp2_unlocking_check_writes( transport_global->incoming_window += window_delta; } - return transport_writing->outbuf.length > 0 || + return transport_writing->outbuf.count > 0 || grpc_chttp2_list_have_writing_streams(transport_writing); } void grpc_chttp2_perform_writes( grpc_chttp2_transport_writing *transport_writing, grpc_endpoint *endpoint) { + GPR_ASSERT(transport_writing->outbuf.count > 0 || grpc_chttp2_list_have_writing_streams(transport_writing)); + finalize_outbuf(transport_writing); GPR_ASSERT(transport_writing->outbuf.count > 0); diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 6198b786fe..7fdff42f02 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -227,10 +227,11 @@ static void init_transport(grpc_chttp2_transport *t, grpc_chttp2_stream_map_init(&t->new_stream_map, 8); /* copy in initial settings to all setting sets */ - for (i = 0; i < NUM_SETTING_SETS; i++) { - for (j = 0; j < GRPC_CHTTP2_NUM_SETTINGS; j++) { - t->global.settings[i][j] = - grpc_chttp2_settings_parameters[j].default_value; + for (i = 0; i < GRPC_CHTTP2_NUM_SETTINGS; i++) { + t->parsing.settings[i] = grpc_chttp2_settings_parameters[i].default_value; + for (j = 0; j < NUM_SETTING_SETS; j++) { + t->global.settings[j][i] = + grpc_chttp2_settings_parameters[i].default_value; } } t->global.dirtied_local_settings = 1; |