diff options
author | Chris Cleeland <chris.cleeland@gmail.com> | 1997-11-03 23:53:54 +0000 |
---|---|---|
committer | Chris Cleeland <chris.cleeland@gmail.com> | 1997-11-03 23:53:54 +0000 |
commit | fa8504ca1f373da4852caac549249c43e611cc9f (patch) | |
tree | 5aa3da85c1f6732feb0989499a6abb62c5e79bdb /ace/Connector.cpp | |
parent | 7ddcd2be5f71cb98ed53a35c3dd7451c652b1e85 (diff) | |
download | ATCD-fa8504ca1f373da4852caac549249c43e611cc9f.tar.gz |
TAO connector fix
Diffstat (limited to 'ace/Connector.cpp')
-rw-r--r-- | ace/Connector.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/ace/Connector.cpp b/ace/Connector.cpp index f992709ba3e..8f5c496574e 100644 --- a/ace/Connector.cpp +++ b/ace/Connector.cpp @@ -334,10 +334,11 @@ ACE_Connector<SH, PR_CO_2>::connect (SH *&sh, { ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::connect"); + SH* new_sh = sh; // If the user hasn't supplied us with a <SVC_HANDLER> we'll use the // factory method to create one. Otherwise, things will remain as // they are... - if (this->make_svc_handler (sh) == -1) + if (this->make_svc_handler (new_sh) == -1) return -1; ACE_Time_Value *timeout; @@ -349,7 +350,7 @@ ACE_Connector<SH, PR_CO_2>::connect (SH *&sh, timeout = (ACE_Time_Value *) synch_options.time_value (); // Delegate to connection strategy. - if (this->connect_svc_handler (sh, + if (this->connect_svc_handler (new_sh, remote_addr, timeout, local_addr, @@ -367,6 +368,7 @@ ACE_Connector<SH, PR_CO_2>::connect (SH *&sh, // here because if something goes wrong that will reset // errno this will be detected by the caller (since -1 is // being returned...). + sh = new_sh; this->create_AST (sh, synch_options); } else @@ -377,14 +379,17 @@ ACE_Connector<SH, PR_CO_2>::connect (SH *&sh, int error = errno; // Make sure to close down the Channel to avoid descriptor // leaks. - sh->close (0); + new_sh->close (0); errno = error; } return -1; } else - // Activate immediately if we are connected. - return this->activate_svc_handler (sh); + { + // Activate immediately if we are connected. + sh = new_sh; + return this->activate_svc_handler (sh); + } } // Initiate connection to peer. |