diff options
-rw-r--r-- | ace/OS.i | 2 | ||||
-rw-r--r-- | ace/ReactorEx.cpp | 8 |
2 files changed, 7 insertions, 3 deletions
@@ -2679,6 +2679,8 @@ ACE_OS::inet_aton (const char *host_name, struct in_addr *addr) ACE_OS::memcpy ((void *) addr, (void *) &ip_addr, sizeof ip_addr); return 1; } + else + return 1; } ACE_INLINE char * diff --git a/ace/ReactorEx.cpp b/ace/ReactorEx.cpp index fb2969f69d2..21bcc46f161 100644 --- a/ace/ReactorEx.cpp +++ b/ace/ReactorEx.cpp @@ -212,7 +212,7 @@ ACE_ReactorEx::dispatch (ACE_Event_Handler *wait_all_callback) int ACE_ReactorEx::dispatch (size_t index) { - while (index < active_handles_) + for (;;) { // Tim, if this call fails is there really anything we // can/should do about it? It seems that regardless of the @@ -221,6 +221,10 @@ ACE_ReactorEx::dispatch (size_t index) this->dispatch_handler (index); index++; + // We're done. + if (index >= this->active_handles_) + return 0; + DWORD wait_status = ::WaitForMultipleObjects (active_handles_ - index, &handles_[index], @@ -244,8 +248,6 @@ ACE_ReactorEx::dispatch (size_t index) index += waitstatus - WAIT_ABANDONED_0; } } - - return 0; } // Dispatches a single handler. Returns 0 on success, -1 if the |