diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-06-15 17:14:41 -0700 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-06-15 17:14:41 -0700 |
commit | cfb5db927cb36c5958392dda6009532db661dc0a (patch) | |
tree | ea7f9321cff44d141d067d10188e2a86f6d68451 /src/core/transport | |
parent | 6459db484afadcd34a9f5f7cebe79450f2b4a32c (diff) |
Implement lookup stream
Diffstat (limited to 'src/core/transport')
-rw-r--r-- | src/core/transport/chttp2_transport.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 9577300e41..404a6339c5 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -62,6 +62,10 @@ int grpc_flowctl_trace = 0; ((grpc_chttp2_transport *)((char *)(tw)-offsetof(grpc_chttp2_transport, \ writing))) +#define TRANSPORT_FROM_PARSING(tw) \ + ((grpc_chttp2_transport *)((char *)(tw)-offsetof(grpc_chttp2_transport, \ + parsing))) + #define TRANSPORT_FROM_GLOBAL(tg) \ ((grpc_chttp2_transport *)((char *)(tg)-offsetof(grpc_chttp2_transport, \ global))) @@ -420,6 +424,13 @@ static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { unref_transport(t); } +grpc_chttp2_stream_parsing *grpc_chttp2_parsing_lookup_stream( + grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id) { + grpc_chttp2_transport *t = TRANSPORT_FROM_PARSING(transport_parsing); + grpc_chttp2_stream *s = grpc_chttp2_stream_map_find(&t->parsing_stream_map, id); + return &s->parsing; +} + #if 0 static void remove_from_stream_map(grpc_chttp2_transport *t, grpc_chttp2_stream *s) { if (s->global.id == 0) return; |