summaryrefslogtreecommitdiff
path: root/ACE/ace/Acceptor.cpp
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2012-12-17 09:33:03 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2012-12-17 09:33:03 +0000
commit7d279a23f8301bf5f1db214175463606e85def76 (patch)
treed97a38ed0fb802ee848edf8fbcfc064758f93b44 /ACE/ace/Acceptor.cpp
parent7e4c1e0cdc16b3814749109c055f81963afdd44b (diff)
downloadATCD-7d279a23f8301bf5f1db214175463606e85def76.tar.gz
Mon Dec 17 09:31:49 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl>
* ace/Acceptor.cpp: Fixed one-shot acceptor, could call null ptr * ace/Throughput_Stats.cpp: Simplified code * protocols/tests/RMCast/Receiver.cpp: Fixed incorrect argument to memcpy
Diffstat (limited to 'ACE/ace/Acceptor.cpp')
-rw-r--r--ACE/ace/Acceptor.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/ACE/ace/Acceptor.cpp b/ACE/ace/Acceptor.cpp
index f78c74882b8..01d6e92c3e2 100644
--- a/ACE/ace/Acceptor.cpp
+++ b/ACE/ace/Acceptor.cpp
@@ -288,7 +288,9 @@ ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::accept_svc_handler
bool reset_new_handle;
if (reactor)
- reset_new_handle = reactor->uses_event_associations ();
+ {
+ reset_new_handle = reactor->uses_event_associations ();
+ }
else
{
// Acceptor is closed, so reject this call
@@ -1142,16 +1144,20 @@ ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_input (ACE_HANDLE
// created handle. This is because the newly created handle will
// inherit the properties of the listen handle, including its event
// associations.
- bool const reset_new_handle = this->reactor ()->uses_event_associations ();
+ ACE_Reactor *reactor = this->reactor ();
+ bool reset_new_handle;
// There is a use-case whereby this object will be gone upon return
// from shared_accept - if the Svc_Handler deletes this Oneshot_Acceptor
// during the shared_accept/activation steps. So, do whatever we need
// to do with this object before calling shared_accept.
- if (this->reactor ())
- this->reactor ()->remove_handler
- (this,
- ACE_Event_Handler::ACCEPT_MASK | ACE_Event_Handler::DONT_CALL);
+ if (reactor)
+ {
+ reset_new_handle = reactor->uses_event_associations ();
+ reactor->remove_handler
+ (this,
+ ACE_Event_Handler::ACCEPT_MASK | ACE_Event_Handler::DONT_CALL);
+ }
if (this->shared_accept (this->svc_handler_, // stream
0, // remote address