diff options
author | Jan Tattermusch <jtattermusch@google.com> | 2016-06-21 18:17:27 -0700 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2016-06-22 11:59:01 -0700 |
commit | 0d896ef906f6a57f10832764611598d457d0e947 (patch) | |
tree | 30d1719b185d8e31acabbac70c407d5218f33951 /src/csharp | |
parent | acbf8c290afe4f3f0e690162f17b63df8096280f (diff) |
fix reading of compressed byte_buffer in C#
Diffstat (limited to 'src/csharp')
-rw-r--r-- | src/csharp/ext/grpc_csharp_ext.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index 4782654250..9b8d050ea5 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -249,10 +249,12 @@ grpcsharp_batch_context_recv_initial_metadata( GPR_EXPORT intptr_t GPR_CALLTYPE grpcsharp_batch_context_recv_message_length( const grpcsharp_batch_context *ctx) { + grpc_byte_buffer_reader reader; if (!ctx->recv_message) { return -1; } - return (intptr_t)grpc_byte_buffer_length(ctx->recv_message); + grpc_byte_buffer_reader_init(&reader, ctx->recv_message); + return (intptr_t)grpc_byte_buffer_length(reader.buffer_out); } /* |