diff options
author | 2015-07-01 10:36:27 -0700 | |
---|---|---|
committer | 2015-07-01 10:36:27 -0700 | |
commit | 17be5dc7969f21d99a40cb116f84067eee54923b (patch) | |
tree | dedca68b24c2b84cb50263cb4152013287c468b9 /src/core/transport/chttp2/stream_lists.c | |
parent | 2a6e35677906200e27f20127882efe1028873a42 (diff) |
Fix a list management bug exposed by new locking scheme in client_channel
Diffstat (limited to 'src/core/transport/chttp2/stream_lists.c')
-rw-r--r-- | src/core/transport/chttp2/stream_lists.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core/transport/chttp2/stream_lists.c b/src/core/transport/chttp2/stream_lists.c index c6ba12fca8..f04e763387 100644 --- a/src/core/transport/chttp2/stream_lists.c +++ b/src/core/transport/chttp2/stream_lists.c @@ -282,6 +282,24 @@ int grpc_chttp2_list_pop_closed_waiting_for_parsing( return r; } +void grpc_chttp2_list_add_cancelled_waiting_for_writing( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global) { + stream_list_add(TRANSPORT_FROM_GLOBAL(transport_global), + STREAM_FROM_GLOBAL(stream_global), + GRPC_CHTTP2_LIST_CANCELLED_WAITING_FOR_WRITING); +} + +int grpc_chttp2_list_pop_cancelled_waiting_for_writing( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global **stream_global) { + grpc_chttp2_stream *stream; + int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream, + GRPC_CHTTP2_LIST_CANCELLED_WAITING_FOR_WRITING); + *stream_global = &stream->global; + return r; +} + void grpc_chttp2_list_add_incoming_window_updated( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global) { |