summaryrefslogtreecommitdiff
path: root/ace/TLI_Stream.cpp
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>2001-06-26 22:22:00 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>2001-06-26 22:22:00 +0000
commit21bcb5c01dec9f2a48508d32ed81105a1f572a39 (patch)
tree0179d1b62c0d265155bc983f163d85b9bf40d953 /ace/TLI_Stream.cpp
parent6cc7a3cb585b1327e989fc6c53d48dce6b41a9a5 (diff)
downloadATCD-21bcb5c01dec9f2a48508d32ed81105a1f572a39.tar.gz
ChangeLogTag:Tue Jun 26 16:22:24 2001 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu>
Diffstat (limited to 'ace/TLI_Stream.cpp')
-rw-r--r--ace/TLI_Stream.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/ace/TLI_Stream.cpp b/ace/TLI_Stream.cpp
index 6804c19d8b9..548aaf612c0 100644
--- a/ace/TLI_Stream.cpp
+++ b/ace/TLI_Stream.cpp
@@ -58,18 +58,19 @@ ACE_TLI_Stream::active_close (void)
ACE_TRACE ("ACE_TLI_Stream::active_close");
char buf;
- if (this->sndrel () == ACE_INVALID_HANDLE)
- return ACE_INVALID_HANDLE;
- if (this->recv (&buf, sizeof buf) == ACE_INVALID_HANDLE)
+ if (this->sndrel () == -1)
+ return -1;
+ else if (this->recv (&buf, sizeof buf) == -1)
{
if (t_errno == TLOOK && this->look () == T_ORDREL)
{
- if (this->rcvrel () == ACE_INVALID_HANDLE)
- return ACE_INVALID_HANDLE;
+ if (this->rcvrel () == -1)
+ return -1;
}
else
- return ACE_INVALID_HANDLE;
+ return -1;
}
+
return this->close ();
}
@@ -80,10 +81,12 @@ int
ACE_TLI_Stream::passive_close (void)
{
ACE_TRACE ("ACE_TLI_Stream::passive_close");
- if (this->rcvrel () == ACE_INVALID_HANDLE)
- return ACE_INVALID_HANDLE;
- if (this->sndrel () == ACE_INVALID_HANDLE)
- return ACE_INVALID_HANDLE;
+
+ if (this->rcvrel () == -1)
+ return -1;
+ else if (this->sndrel () == -1)
+ return -1;
+
return this->close ();
}
@@ -91,7 +94,8 @@ int
ACE_TLI_Stream::close (void)
{
ACE_TRACE ("ACE_TLI_Stream::close");
- int fd = this->get_handle ();
+
+ ACE_HANDLE fd = this->get_handle ();
this->set_handle (ACE_INVALID_HANDLE);