diff options
author | Phil Mesnier <mesnier_p@ociweb.com> | 2006-11-03 00:38:39 +0000 |
---|---|---|
committer | Phil Mesnier <mesnier_p@ociweb.com> | 2006-11-03 00:38:39 +0000 |
commit | d11b6e372facaaa19160c5b2c754c50df31ad734 (patch) | |
tree | 402c1ffc8af91ac2d971cd498cef6d3b167bcbe1 /ACE/ace/Select_Reactor_Base.inl | |
parent | cce1c9c19f081a519e29ab636a86f468399ed63b (diff) | |
download | ATCD-d11b6e372facaaa19160c5b2c754c50df31ad734.tar.gz |
Fri Nov 3 00:32:27 UTC 2006 Phil Mesnier <mesnier_p@ociweb.com>
Diffstat (limited to 'ACE/ace/Select_Reactor_Base.inl')
-rw-r--r-- | ACE/ace/Select_Reactor_Base.inl | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/ACE/ace/Select_Reactor_Base.inl b/ACE/ace/Select_Reactor_Base.inl index 16bdd67b2b8..88890778b70 100644 --- a/ACE/ace/Select_Reactor_Base.inl +++ b/ACE/ace/Select_Reactor_Base.inl @@ -33,7 +33,8 @@ ACE_Select_Reactor_Handler_Repository::unbind (ACE_HANDLE handle, // Do not refactor this code to optimize the call to the unbind impl. // To resolve bug 2653, unbind must be called even when find_eh returns // event_handlers_.end(). - return (handle == ACE_INVALID_HANDLE) ? -1 + + return !this->handle_in_range (handle) ? -1 : this->unbind (handle, this->find_eh (handle), mask); @@ -46,15 +47,18 @@ ACE_Select_Reactor_Handler_Repository::find (ACE_HANDLE handle) ACE_Event_Handler * eh = 0; - map_type::iterator const pos = this->find_eh (handle); - - if (pos != this->event_handlers_.end ()) + if (this->handle_in_range (handle)) { + map_type::iterator const pos = this->find_eh (handle); + + if (pos != this->event_handlers_.end ()) + { #ifdef ACE_WIN32 - eh = (*pos).item (); + eh = (*pos).item (); #else - eh = *pos; + eh = *pos; #endif /* ACE_WIN32 */ + } } // Don't bother setting errno. It isn't used in the select()-based // reactors and incurs a TSS access. |