diff options
author | Ted Ross <tross@apache.org> | 2010-08-20 13:58:20 +0000 |
---|---|---|
committer | Ted Ross <tross@apache.org> | 2010-08-20 13:58:20 +0000 |
commit | 5269fc0e04984b2d196d5eaf96e206e034d21184 (patch) | |
tree | 2c5c273773ce707de712e7691a00003639c0f281 /cpp/bindings/qpid/dotnet/examples/csharp.example.drain/csharp.example.drain.cs | |
parent | fdfefb5e9721cb85d70a81928044f61b7f48ccf3 (diff) | |
download | qpid-python-5269fc0e04984b2d196d5eaf96e206e034d21184.tar.gz |
QPID-2798 - C++ Messaging Client .NET binding fails to clone managed objects correctly
Patch from Chuck Rolke
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@987510 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/bindings/qpid/dotnet/examples/csharp.example.drain/csharp.example.drain.cs')
-rw-r--r-- | cpp/bindings/qpid/dotnet/examples/csharp.example.drain/csharp.example.drain.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cpp/bindings/qpid/dotnet/examples/csharp.example.drain/csharp.example.drain.cs b/cpp/bindings/qpid/dotnet/examples/csharp.example.drain/csharp.example.drain.cs index 2d763a306d..dc38590f0a 100644 --- a/cpp/bindings/qpid/dotnet/examples/csharp.example.drain/csharp.example.drain.cs +++ b/cpp/bindings/qpid/dotnet/examples/csharp.example.drain/csharp.example.drain.cs @@ -43,8 +43,9 @@ namespace Org.Apache.Qpid.Messaging.Examples { Duration timeout = options.Forever ?
DurationConstants.FORVER :
DurationConstants.SECOND * options.Timeout;
- Message message = new Message();
- while (receiver.Fetch(message, timeout))
+ Message message;
+
+ while ((message = receiver.Fetch(timeout)) != null)
{
Dictionary<string, object> properties = new Dictionary<string, object>();
properties = message.Properties;
|