From e8b912389729d6af79ab99bd555afa28acf277bc 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@705641 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/dotnet/client-010/client/client/Message.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qpid/dotnet/client-010/client/client/Message.cs b/qpid/dotnet/client-010/client/client/Message.cs index 3e18b4d7b7..567ca5cae7 100644 --- a/qpid/dotnet/client-010/client/client/Message.cs +++ b/qpid/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