aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.Core/Internal/BatchContextSafeHandle.cs
diff options
context:
space:
mode:
authorGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2017-01-20 13:39:08 -0800
committerGravatar GitHub <noreply@github.com>2017-01-20 13:39:08 -0800
commit28ec869b5a2567cd30a6e3bcc0efbee0ab0ae7f5 (patch)
treebe591d8c9033c3c4aa064b458acc8e7fe62d7598 /src/csharp/Grpc.Core/Internal/BatchContextSafeHandle.cs
parentbd827887ffbb57a95990130f585913b13f44a5b7 (diff)
parent2b5cf1ff2681bb94fa1e3651f8ccfc14bdfa71b2 (diff)
Merge pull request #8842 from ctiller/metadata_filter
Metadata handling rewrite
Diffstat (limited to 'src/csharp/Grpc.Core/Internal/BatchContextSafeHandle.cs')
-rw-r--r--src/csharp/Grpc.Core/Internal/BatchContextSafeHandle.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/csharp/Grpc.Core/Internal/BatchContextSafeHandle.cs b/src/csharp/Grpc.Core/Internal/BatchContextSafeHandle.cs
index 26449ee539..0e4a77be81 100644
--- a/src/csharp/Grpc.Core/Internal/BatchContextSafeHandle.cs
+++ b/src/csharp/Grpc.Core/Internal/BatchContextSafeHandle.cs
@@ -71,7 +71,9 @@ namespace Grpc.Core.Internal
// Gets data of recv_status_on_client completion.
public ClientSideStatus GetReceivedStatusOnClient()
{
- string details = Marshal.PtrToStringAnsi(Native.grpcsharp_batch_context_recv_status_on_client_details(this));
+ UIntPtr detailsLength;
+ IntPtr detailsPtr = Native.grpcsharp_batch_context_recv_status_on_client_details(this, out detailsLength);
+ string details = Marshal.PtrToStringAnsi(detailsPtr, (int) detailsLength.ToUInt32());
var status = new Status(Native.grpcsharp_batch_context_recv_status_on_client_status(this), details);
IntPtr metadataArrayPtr = Native.grpcsharp_batch_context_recv_status_on_client_trailing_metadata(this);