summaryrefslogtreecommitdiff
path: root/TAO/tao/Asynch_Reply_Dispatcher_Base.cpp
diff options
context:
space:
mode:
authormsmit <msmit@remedy.nl>2009-03-31 10:06:45 +0000
committermsmit <msmit@remedy.nl>2009-03-31 10:06:45 +0000
commit990644326411e525e737d688105a0b9505485e20 (patch)
tree492f575f48613dacbe7458477d7f2c538d99ffea /TAO/tao/Asynch_Reply_Dispatcher_Base.cpp
parentd955bd531bef53000b03603b8e342b3e94ce66f3 (diff)
downloadATCD-990644326411e525e737d688105a0b9505485e20.tar.gz
Tue Mar 31 10:44:16 UTC 2009 Marcel Smit <msmit@remedy.nl>
* tao/Asynch_Reply_Dispatcher_Base.cpp: * tao/Asynch_Reply_Dispatcher_Base.h: * tao/Asynch_Reply_Dispatcher_Base.inl: * tao/DynamicInterface/DII_Reply_Dispatcher.cpp: * tao/Exclusive_TMS.cpp: * tao/Exclusive_TMS.h: * tao/LocateRequest_Invocation.cpp: * tao/Messaging/Asynch_Reply_Dispatcher.cpp: * tao/Muxed_TMS.cpp: * tao/Muxed_TMS.h: * tao/Reply_Dispatcher.cpp: * tao/Reply_Dispatcher.h: * tao/Synch_Invocation.cpp: * tao/Transport_Mux_Strategy.h: Refactored Reply Dispatchers. It's now possible to make a CORBA call (synchronous or asynchronous) during an AMI reply dispatch without running into a deadlock. Also, the reply dispatchers are now created on the heap, using an ACE_Intrusive_Auto_Ptr. This fixes Bugzilla 3567. * tests/Big_AMI/client.cpp: Using a different CORBA:Object_var for ior. * NEWS: Listed this change.
Diffstat (limited to 'TAO/tao/Asynch_Reply_Dispatcher_Base.cpp')
-rw-r--r--TAO/tao/Asynch_Reply_Dispatcher_Base.cpp44
1 files changed, 3 insertions, 41 deletions
diff --git a/TAO/tao/Asynch_Reply_Dispatcher_Base.cpp b/TAO/tao/Asynch_Reply_Dispatcher_Base.cpp
index f2d00f91526..1ed5613102e 100644
--- a/TAO/tao/Asynch_Reply_Dispatcher_Base.cpp
+++ b/TAO/tao/Asynch_Reply_Dispatcher_Base.cpp
@@ -19,9 +19,9 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
// Constructor.
TAO_Asynch_Reply_Dispatcher_Base::TAO_Asynch_Reply_Dispatcher_Base (
TAO_ORB_Core *orb_core,
- ACE_Allocator *allocator
- )
- : db_ (sizeof buf_,
+ ACE_Allocator *allocator)
+ : TAO_Reply_Dispatcher (allocator)
+ , db_ (sizeof buf_,
ACE_Message_Block::MB_DATA,
this->buf_,
orb_core->input_cdr_buffer_allocator (),
@@ -36,9 +36,7 @@ TAO_Asynch_Reply_Dispatcher_Base::TAO_Asynch_Reply_Dispatcher_Base (
orb_core)
, transport_ (0)
, lock_ (0)
- , refcount_ (1)
, is_reply_dispatched_ (false)
- , allocator_ (allocator)
{
// @@ NOTE: Need a seperate option for this..
this->lock_ =
@@ -67,42 +65,6 @@ TAO_Asynch_Reply_Dispatcher_Base::transport (TAO_Transport *t)
this->transport_->add_reference ();
}
-void
-TAO_Asynch_Reply_Dispatcher_Base::incr_refcount (void)
-{
- ACE_GUARD (ACE_Lock,
- mutex,
- *this->lock_);
- ++this->refcount_;
-}
-
-void
-TAO_Asynch_Reply_Dispatcher_Base::decr_refcount (void)
-{
- {
- ACE_GUARD (ACE_Lock,
- mutex,
- *this->lock_);
- --this->refcount_;
-
- if (this->refcount_ > 0)
- return;
- }
-
- if (this->allocator_)
- {
- ACE_DES_FREE (this,
- this->allocator_->free,
- TAO_Asynch_Reply_Dispatcher_Base);
- }
- else
- {
- delete this;
- }
-
- return;
-}
-
bool
TAO_Asynch_Reply_Dispatcher_Base::try_dispatch_reply (void)
{