From fbff577e09717f1f8304c713e08e8a278a11d8f0 Mon Sep 17 00:00:00 2001 From: Arnaud Simon Date: Fri, 17 Oct 2008 15:18:09 +0000 Subject: qpid-1372: added handling of empty message properties at the header level git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@705641 13f79535-47bb-0310-9956-ffa450edef68 --- dotnet/client-010/client/client/Message.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dotnet/client-010/client/client/Message.cs b/dotnet/client-010/client/client/Message.cs index 3e18b4d7b7..567ca5cae7 100644 --- a/dotnet/client-010/client/client/Message.cs +++ b/dotnet/client-010/client/client/Message.cs @@ -44,7 +44,7 @@ namespace org.apache.qpid.client { get { - if (_message.Header != null) + if (_message.Header != null && Header.Structs.Length > 1) return (MessageProperties) Header.Structs[0]; return null; } @@ -62,7 +62,12 @@ namespace org.apache.qpid.client get { if (Header != null) - return (DeliveryProperties) Header.Structs[1]; + { + if( Header.Structs.Length > 1 ) + return (DeliveryProperties)Header.Structs[1]; + return (DeliveryProperties)Header.Structs[0]; + } + return null; } set -- cgit v1.2.1