diff options
Diffstat (limited to 'ace')
-rw-r--r-- | ace/Acceptor.cpp | 8 | ||||
-rw-r--r-- | ace/Priority_Reactor.cpp | 8 | ||||
-rw-r--r-- | ace/Strategies_T.cpp | 1 |
3 files changed, 6 insertions, 11 deletions
diff --git a/ace/Acceptor.cpp b/ace/Acceptor.cpp index 3f93a231775..53297383d74 100644 --- a/ace/Acceptor.cpp +++ b/ace/Acceptor.cpp @@ -257,14 +257,13 @@ template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::activate_svc_handler (SVC_HANDLER *svc_handler) { - ACE_Trace::start_tracing (); ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::activate_svc_handler"); int result = 0; // See if we should enable non-blocking I/O on the <svc_handler>'s // peer. - if (ACE_BIT_ENABLED (this->flags_, ACE_NONBLOCK) != 0) + if (ACE_BIT_ENABLED (this->flags_, ACE_NONBLOCK)) { if (svc_handler->peer ().enable (ACE_NONBLOCK) == -1) result = -1; @@ -273,13 +272,12 @@ ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::activate_svc_handler else if (svc_handler->peer ().disable (ACE_NONBLOCK) == -1) result = -1; - if (svc_handler->open ((void *) this) == -1) + if (result == 0 && svc_handler->open ((void *) this) == -1) result = -1; - + if (result == -1) svc_handler->close (0); - ACE_Trace::stop_tracing (); return result; } diff --git a/ace/Priority_Reactor.cpp b/ace/Priority_Reactor.cpp index 29ec6a9550f..bd9d48ab12e 100644 --- a/ace/Priority_Reactor.cpp +++ b/ace/Priority_Reactor.cpp @@ -23,8 +23,8 @@ ACE_ALLOC_HOOK_DEFINE(ACE_Priority_Reactor) const int npriorities = ACE_Event_Handler::HI_PRIORITY - ACE_Event_Handler::LO_PRIORITY + 1; -ACE_INLINE -void ACE_Priority_Reactor::init_bucket (void) +ACE_INLINE void +ACE_Priority_Reactor::init_bucket (void) { // Allocate enough space for all the handles. // TODO: This can be wrong, maybe we should use other kind of @@ -38,10 +38,6 @@ void ACE_Priority_Reactor::init_bucket (void) int i; for (i = 0; i < npriorities; ++i) { - this->bucket_[i] = 0; - } - for (i = 0; i < npriorities; ++i) - { ACE_NEW (this->bucket_[i], QUEUE (this->tuple_allocator_)); } } diff --git a/ace/Strategies_T.cpp b/ace/Strategies_T.cpp index db904cc0552..cde17d72709 100644 --- a/ace/Strategies_T.cpp +++ b/ace/Strategies_T.cpp @@ -361,6 +361,7 @@ ACE_Reactive_Strategy<SVC_HANDLER>::activate_svc_handler (SVC_HANDLER *svc_handl if (result == -1) svc_handler->close (0); + return result; } |