aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/transport/chttp2/stream_lists.c
diff options
context:
space:
mode:
authorGravatar Julien Boeuf <jboeuf@google.com>2015-07-10 08:35:04 -0700
committerGravatar Julien Boeuf <jboeuf@google.com>2015-07-10 08:35:04 -0700
commit0b1b1a5999fd52fb85face2be75e5037355a689e (patch)
tree82ac8317433cffd95afe437270482878812a951b /src/core/transport/chttp2/stream_lists.c
parentb037bb648884c01a12d272d9b4e528d304a4213d (diff)
parentb652fc0d172e0eb1023282fa6ee24eb41cbbea85 (diff)
Merge branch 'master' of github.com:grpc/grpc into flexible_default_creds
Diffstat (limited to 'src/core/transport/chttp2/stream_lists.c')
-rw-r--r--src/core/transport/chttp2/stream_lists.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/transport/chttp2/stream_lists.c b/src/core/transport/chttp2/stream_lists.c
index 85691b32d2..4fea058c19 100644
--- a/src/core/transport/chttp2/stream_lists.c
+++ b/src/core/transport/chttp2/stream_lists.c
@@ -354,9 +354,14 @@ void grpc_chttp2_register_stream(grpc_chttp2_transport *t,
stream_list_add_tail(t, s, GRPC_CHTTP2_LIST_ALL_STREAMS);
}
-void grpc_chttp2_unregister_stream(grpc_chttp2_transport *t,
+int grpc_chttp2_unregister_stream(grpc_chttp2_transport *t,
grpc_chttp2_stream *s) {
- stream_list_remove(t, s, GRPC_CHTTP2_LIST_ALL_STREAMS);
+ stream_list_maybe_remove(t, s, GRPC_CHTTP2_LIST_ALL_STREAMS);
+ return stream_list_empty(t, GRPC_CHTTP2_LIST_ALL_STREAMS);
+}
+
+int grpc_chttp2_has_streams(grpc_chttp2_transport *t) {
+ return !stream_list_empty(t, GRPC_CHTTP2_LIST_ALL_STREAMS);
}
void grpc_chttp2_for_all_streams(