diff options
Diffstat (limited to 'ACE/ace/SOCK_Connector.cpp')
-rw-r--r-- | ACE/ace/SOCK_Connector.cpp | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/ACE/ace/SOCK_Connector.cpp b/ACE/ace/SOCK_Connector.cpp index d9040f9b4e2..f45361473f7 100644 --- a/ACE/ace/SOCK_Connector.cpp +++ b/ACE/ace/SOCK_Connector.cpp @@ -81,11 +81,9 @@ ACE_SOCK_Connector::shared_connect_start (ACE_SOCK_Stream &new_stream, if (local_sap != ACE_Addr::sap_any) { sockaddr *laddr = reinterpret_cast<sockaddr *> (local_sap.get_addr ()); - int size = local_sap.get_size (); + int const size = local_sap.get_size (); - if (ACE_OS::bind (new_stream.get_handle (), - laddr, - size) == -1) + if (ACE_OS::bind (new_stream.get_handle (), laddr, size) == -1) { // Save/restore errno. ACE_Errno_Guard error (errno); @@ -148,9 +146,7 @@ ACE_SOCK_Connector::shared_connect_finish (ACE_SOCK_Stream &new_stream, #endif /* ACE_WIN32 */ } // Wait synchronously using timeout. - else if (this->complete (new_stream, - 0, - timeout) == -1) + else if (this->complete (new_stream, 0, timeout) == -1) error = errno; else return 0; @@ -177,7 +173,6 @@ ACE_SOCK_Connector::shared_connect_finish (ACE_SOCK_Stream &new_stream, } // Actively connect and produce a new ACE_SOCK_Stream if things go well... - int ACE_SOCK_Connector::connect (ACE_SOCK_Stream &new_stream, const ACE_Addr &remote_sap, @@ -204,9 +199,7 @@ ACE_SOCK_Connector::connect (ACE_SOCK_Stream &new_stream, reinterpret_cast<sockaddr *> (remote_sap.get_addr ()), remote_sap.get_size ()); - return this->shared_connect_finish (new_stream, - timeout, - result); + return this->shared_connect_finish (new_stream, timeout, result); } #if !defined (ACE_HAS_WINCE) @@ -242,9 +235,7 @@ ACE_SOCK_Connector::connect (ACE_SOCK_Stream &new_stream, remote_sap.get_size (), qos_params); - return this->shared_connect_finish (new_stream, - timeout, - result); + return this->shared_connect_finish (new_stream, timeout, result); } #endif // ACE_HAS_WINCE @@ -256,8 +247,7 @@ ACE_SOCK_Connector::complete (ACE_SOCK_Stream &new_stream, const ACE_Time_Value *tv) { ACE_TRACE ("ACE_SOCK_Connector::complete"); - ACE_HANDLE h = ACE::handle_timed_complete (new_stream.get_handle (), - tv); + ACE_HANDLE h = ACE::handle_timed_complete (new_stream.get_handle (), tv); // We failed to get connected. if (h == ACE_INVALID_HANDLE) { @@ -268,8 +258,7 @@ ACE_SOCK_Connector::complete (ACE_SOCK_Stream &new_stream, // then retry to see if it's a real failure. ACE_Time_Value time (0, ACE_NON_BLOCKING_BUG_DELAY); ACE_OS::sleep (time); - h = ACE::handle_timed_complete (new_stream.get_handle (), - tv); + h = ACE::handle_timed_complete (new_stream.get_handle (), tv); if (h == ACE_INVALID_HANDLE) { #endif /* ACE_WIN32 */ |