diff options
author | Steve Huston <shuston@riverace.com> | 2006-08-22 23:07:10 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 2006-08-22 23:07:10 +0000 |
commit | 0ca633f145d186087d8bf1ae53da0da30a71d111 (patch) | |
tree | 30ebdd4985fc13f078db12444c313c5602c98720 /ACE/protocols/ace/RMCast/Reassemble.cpp | |
parent | 3129e5b4c8e89ce523cc6b0bfaa9d097cd2e8e43 (diff) | |
download | ATCD-0ca633f145d186087d8bf1ae53da0da30a71d111.tar.gz |
:ChangeLogTag:Tue Aug 22 22:52:41 UTC 2006 Steve Huston <shuston@riverace.com
Diffstat (limited to 'ACE/protocols/ace/RMCast/Reassemble.cpp')
-rw-r--r-- | ACE/protocols/ace/RMCast/Reassemble.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/ACE/protocols/ace/RMCast/Reassemble.cpp b/ACE/protocols/ace/RMCast/Reassemble.cpp index 9fa3e0d0167..aa5354a40be 100644 --- a/ACE/protocols/ace/RMCast/Reassemble.cpp +++ b/ACE/protocols/ace/RMCast/Reassemble.cpp @@ -88,7 +88,19 @@ namespace ACE_RMCast new_msg->add (Profile_ptr (new To (to))); new_msg->add (Profile_ptr (new From (from))); - new_msg->add (Profile_ptr (new_data.release ())); + /* + * Heads up... we need to add the new_data to new_msg then + * unbind the entry that maps to new_data, which will decrement + * its reference count. If the bound/refcounted pointer acted + * polymorphically like a regular pointer does, we'd be able to + * just pass new_data to add(Profile_Ptr) and it would work. + * However, Profile_Ptr and Data_Ptr are not compatible, but + * we can use the secret knowledge that both are instances of the + * same template and that the pointers they contain really are + * hierarchically compatible, and do this funky cast to get + * the result we want. + */ + new_msg->add (*(reinterpret_cast<Profile_ptr*> (&new_data))); map_.unbind (from); |