diff options
author | Steve Huston <shuston@riverace.com> | 1997-09-26 17:00:22 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 1997-09-26 17:00:22 +0000 |
commit | 8175cb37f34dcf65ee13029a0b85ad384bef3d53 (patch) | |
tree | 59a841b77b9d01fb0cb8a300920073fc5bc0bf88 /ace | |
parent | a5a97e9992d02df334a12531d89414cb80f1a064 (diff) | |
download | ATCD-8175cb37f34dcf65ee13029a0b85ad384bef3d53.tar.gz |
Fixed handle checks in handle_timed_complete to correctly determine
handle settings on BSD and TLI sockets.
Diffstat (limited to 'ace')
-rw-r--r-- | ace/ACE.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ace/ACE.cpp b/ace/ACE.cpp index 19b7bbdea19..36b4b758f21 100644 --- a/ace/ACE.cpp +++ b/ace/ACE.cpp @@ -1099,6 +1099,7 @@ ACE::handle_timed_complete (ACE_HANDLE h, ACE_TRACE ("ACE::handle_timed_complete"); ACE_Handle_Set rd_handles; ACE_Handle_Set wr_handles; + int need_to_check; #if defined (ACE_WIN32) ACE_Handle_Set ex_handles; @@ -1129,16 +1130,19 @@ ACE::handle_timed_complete (ACE_HANDLE h, errno = ETIME; return ACE_INVALID_HANDLE; } + // Check if the handle is ready for reading and the handle is *not* // ready for writing, which may indicate a problem. But we need to // make sure... #if defined (ACE_WIN32) - else if (rd_handles.is_set (h) || ex_handles.is_set (h)) -#elif defined (ACE_HAS_TLI) - else if (is_tli && rd_handles.is_set (h) && !wr_handles.is_set (h)) + need_to_check = (rd_handles.is_set (h) || ex_handles.is_set (h)); #else - else if (rd_handles.is_set (h)) + if (is_tli) + need_to_check = (rd_handles.is_set (h) && !wr_handles.is_set (h)); + else + need_to_check = rd_handles.is_set (h); #endif /* ACE_WIN32 */ + if (need_to_check) { char dummy; |