summaryrefslogtreecommitdiff
path: root/ace/ACE.cpp
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>1997-09-26 17:00:22 +0000
committerSteve Huston <shuston@riverace.com>1997-09-26 17:00:22 +0000
commit72c9c0b99db3635d5599ba3c8acab1ef1a953eda (patch)
tree59a841b77b9d01fb0cb8a300920073fc5bc0bf88 /ace/ACE.cpp
parent808e76aaef994439631399cc38178d490e99b34a (diff)
downloadATCD-72c9c0b99db3635d5599ba3c8acab1ef1a953eda.tar.gz
Fixed handle checks in handle_timed_complete to correctly determine
handle settings on BSD and TLI sockets.
Diffstat (limited to 'ace/ACE.cpp')
-rw-r--r--ace/ACE.cpp12
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;