summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ace/DEV_Connector.cpp2
-rw-r--r--ace/DEV_Connector.h2
-rw-r--r--ace/SPIPE_Connector.h2
-rw-r--r--ace/TLI_Connector.cpp49
-rw-r--r--ace/TLI_Connector.h2
-rw-r--r--ace/UPIPE_Connector.cpp3
-rw-r--r--ace/UPIPE_Connector.h2
7 files changed, 24 insertions, 38 deletions
diff --git a/ace/DEV_Connector.cpp b/ace/DEV_Connector.cpp
index b797b1148a0..75aa9bf2210 100644
--- a/ace/DEV_Connector.cpp
+++ b/ace/DEV_Connector.cpp
@@ -16,8 +16,6 @@ void
ACE_DEV_Connector::dump (void) const
{
ACE_TRACE ("ACE_DEV_Connector::dump");
-
- ACE_DEV::dump ();
}
ACE_DEV_Connector::ACE_DEV_Connector (void)
diff --git a/ace/DEV_Connector.h b/ace/DEV_Connector.h
index 9db7328b091..088fd8be1df 100644
--- a/ace/DEV_Connector.h
+++ b/ace/DEV_Connector.h
@@ -23,7 +23,7 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-class ACE_Export ACE_DEV_Connector : public ACE_DEV
+class ACE_Export ACE_DEV_Connector
{
// = TITLE
// Defines an active connection factory for the ACE_DEV wrappers.
diff --git a/ace/SPIPE_Connector.h b/ace/SPIPE_Connector.h
index e43550c018c..422e272e004 100644
--- a/ace/SPIPE_Connector.h
+++ b/ace/SPIPE_Connector.h
@@ -23,7 +23,7 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-class ACE_Export ACE_SPIPE_Connector : public ACE_SPIPE
+class ACE_Export ACE_SPIPE_Connector
{
// = TITLE
// Defines an active connection factory for the STREAM pipe
diff --git a/ace/TLI_Connector.cpp b/ace/TLI_Connector.cpp
index 68a9b3c9fac..289396fda21 100644
--- a/ace/TLI_Connector.cpp
+++ b/ace/TLI_Connector.cpp
@@ -46,12 +46,8 @@ ACE_TLI_Connector::connect (ACE_TLI_Stream &new_stream,
// Only open a new endpoint if we don't already have a valid handle.
if (new_stream.get_handle () == ACE_INVALID_HANDLE)
- {
- if (ACE_TLI::open (device, flags, info) == -1)
- return -1;
- }
- else // Borrow the handle from the NEW_STREAM.
- this->set_handle (new_stream.get_handle ());
+ if (new_stream.open (device, flags, info) == -1)
+ return -1;
if (local_sap != ACE_Addr::sap_any)
{
@@ -60,15 +56,15 @@ ACE_TLI_Connector::connect (ACE_TLI_Stream &new_stream,
struct t_bind *localaddr;
localaddr = (struct t_bind *)
- ::t_alloc (this->get_handle (), T_BIND, T_ADDR);
+ ::t_alloc (new_stream.get_handle (), T_BIND, T_ADDR);
if (localaddr == 0)
result = -1;
else
{
int one = 1;
- if (reuse_addr && this->set_option (SOL_SOCKET, SO_REUSEADDR,
- &one, sizeof one) == -1)
+ if (reuse_addr && new_stream.set_option (SOL_SOCKET, SO_REUSEADDR,
+ &one, sizeof one) == -1)
result = -1;
else
{
@@ -77,7 +73,7 @@ ACE_TLI_Connector::connect (ACE_TLI_Stream &new_stream,
localaddr->addr.len = local_sap.get_size ();
localaddr->addr.buf = (char *) local_sap.get_addr ();
- if (ACE_OS::t_bind (this->get_handle (), localaddr, localaddr) == -1)
+ if (ACE_OS::t_bind (new_stream.get_handle (), localaddr, localaddr) == -1)
result = -1;
ACE_OS::t_free ((char *) localaddr, T_BIND);
@@ -86,22 +82,22 @@ ACE_TLI_Connector::connect (ACE_TLI_Stream &new_stream,
if (result == -1)
{
- this->close ();
+ new_stream.close ();
return -1;
}
}
// Let TLI select the local endpoint addr.
- else if (ACE_OS::t_bind (this->get_handle (), 0, 0) == -1)
+ else if (ACE_OS::t_bind (new_stream.get_handle (), 0, 0) == -1)
return -1;
struct t_call *callptr = 0;
callptr = (struct t_call *)
- ACE_OS::t_alloc (this->get_handle (), T_CALL, T_ADDR);
+ ACE_OS::t_alloc (new_stream.get_handle (), T_CALL, T_ADDR);
if (callptr == 0)
{
- this->close ();
+ new_stream.close ();
return -1;
}
callptr->addr.maxlen = remote_sap.get_size ();
@@ -117,11 +113,11 @@ ACE_TLI_Connector::connect (ACE_TLI_Stream &new_stream,
if (timeout != 0) // Enable non-blocking, if required.
{
- if (this->enable (ACE_NONBLOCK) == -1)
+ if (new_stream.enable (ACE_NONBLOCK) == -1)
result = -1;
// Do a non-blocking connect.
- if (ACE_OS::t_connect (this->get_handle (), callptr, 0) == -1)
+ if (ACE_OS::t_connect (new_stream.get_handle (), callptr, 0) == -1)
{
result = -1;
@@ -134,19 +130,16 @@ ACE_TLI_Connector::connect (ACE_TLI_Stream &new_stream,
else
result = this->complete (new_stream, 0, timeout);
}
- else if (t_errno == TLOOK && this->look () == T_DISCONNECT)
- this->rcvdis ();
+ else if (t_errno == TLOOK && new_stream.look () == T_DISCONNECT)
+ new_stream.rcvdis ();
}
}
// Do a blocking connect to the server.
- else if (ACE_OS::t_connect (this->get_handle (), callptr, 0) == -1)
+ else if (ACE_OS::t_connect (new_stream.get_handle (), callptr, 0) == -1)
result = -1;
if (result != -1)
{
- // If everything succeeded transfer ownership to <new_stream>.
- new_stream.set_handle (this->get_handle ());
- this->set_handle (ACE_INVALID_HANDLE);
new_stream.set_rwflag (rwf);
#if defined (I_PUSH)
if (new_stream.get_rwflag ())
@@ -156,7 +149,7 @@ ACE_TLI_Connector::connect (ACE_TLI_Stream &new_stream,
else if (!(errno == EWOULDBLOCK || errno == ETIME))
{
// If things have gone wrong, close down and return an error.
- this->close ();
+ new_stream.close ();
new_stream.set_handle (ACE_INVALID_HANDLE);
}
@@ -173,11 +166,11 @@ ACE_TLI_Connector::complete (ACE_TLI_Stream &new_stream,
ACE_Time_Value *tv)
{
ACE_TRACE ("ACE_TLI_Connector::complete");
- ACE_HANDLE h = ACE::handle_timed_complete (this->get_handle (), tv, 1);
+ ACE_HANDLE h = ACE::handle_timed_complete (new_stream.get_handle (), tv, 1);
if (h == ACE_INVALID_HANDLE)
{
- this->close ();
+ new_stream.close ();
return -1;
}
else // We've successfully connected!
@@ -190,21 +183,19 @@ ACE_TLI_Connector::complete (ACE_TLI_Stream &new_stream,
name.maxlen = remote_sap->get_size ();
name.buf = (char *) remote_sap->get_addr ();
- if (ACE_OS::ioctl (this->get_handle (), TI_GETPEERNAME, &name) == -1)
+ if (ACE_OS::ioctl (new_stream.get_handle (), TI_GETPEERNAME, &name) == -1)
#else /* SunOS4 sucks... */
if (0)
#endif /* ACE_HAS_SVR4_TLI */
{
- this->close ();
+ new_stream.close ();
return -1;
}
}
- new_stream.set_handle (this->get_handle ());
// Start out with non-blocking disabled on the <new_stream>.
new_stream.disable (ACE_NONBLOCK);
- this->set_handle (ACE_INVALID_HANDLE);
return 0;
}
}
diff --git a/ace/TLI_Connector.h b/ace/TLI_Connector.h
index 1a34bef0e71..7b4d913f6d7 100644
--- a/ace/TLI_Connector.h
+++ b/ace/TLI_Connector.h
@@ -25,7 +25,7 @@
#if defined (ACE_HAS_TLI)
-class ACE_Export ACE_TLI_Connector : public ACE_TLI
+class ACE_Export ACE_TLI_Connector
{
// = TITLE
// Defines an active connection factory for the ACE_TLI C++
diff --git a/ace/UPIPE_Connector.cpp b/ace/UPIPE_Connector.cpp
index 5ea40131844..6136583ebee 100644
--- a/ace/UPIPE_Connector.cpp
+++ b/ace/UPIPE_Connector.cpp
@@ -79,9 +79,6 @@ ACE_UPIPE_Connector::connect (ACE_UPIPE_Stream &new_stream,
if (result == -1)
ACE_ERROR ((LM_ERROR, "ACE_UPIPE_Connector %p\n",
"no confirmation from server"));
-
- if (result == -1)
- this->close ();
else
// Close down the new_stream at this point in order to
// conserve handles. Note that we don't need the SPIPE
diff --git a/ace/UPIPE_Connector.h b/ace/UPIPE_Connector.h
index 5d605801c20..17e78076186 100644
--- a/ace/UPIPE_Connector.h
+++ b/ace/UPIPE_Connector.h
@@ -28,7 +28,7 @@
#if defined (ACE_HAS_THREADS)
-class ACE_Export ACE_UPIPE_Connector : public ACE_SPIPE
+class ACE_Export ACE_UPIPE_Connector
{
// = TITLE
// Defines an active connection factory for the