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/src/Session.h | |
| 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/src/Session.h')
| -rw-r--r-- | cpp/bindings/qpid/dotnet/src/Session.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cpp/bindings/qpid/dotnet/src/Session.h b/cpp/bindings/qpid/dotnet/src/Session.h index 18dc09fb33..d34289b1bb 100644 --- a/cpp/bindings/qpid/dotnet/src/Session.h +++ b/cpp/bindings/qpid/dotnet/src/Session.h @@ -65,7 +65,9 @@ namespace Messaging { void Cleanup();
public:
- Session(::qpid::messaging::Session * sessionp,
+
+ // unmanaged clone
+ Session(const ::qpid::messaging::Session & sessionp,
Connection ^ connRef);
// copy constructor
@@ -83,9 +85,11 @@ namespace Messaging { }
else
{
- delete sessionp;
+ if (NULL != sessionp)
+ delete sessionp;
sessionp = new ::qpid::messaging::Session(
*(const_cast<Session %>(rhs).NativeSession) );
+ parentConnectionp = rhs.parentConnectionp;
}
return *this;
}
@@ -129,7 +133,6 @@ namespace Messaging { Receiver ^ CreateReceiver(System::String ^ address);
Receiver ^ CreateReceiver(Address ^ address);
- Receiver ^ CreateReceiver();
Sender ^ GetSender(System::String ^ name);
Receiver ^ GetReceiver(System::String ^ name);
|
