summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Cleeland <chris.cleeland@gmail.com>1997-11-03 23:53:54 +0000
committerChris Cleeland <chris.cleeland@gmail.com>1997-11-03 23:53:54 +0000
commitfa8504ca1f373da4852caac549249c43e611cc9f (patch)
tree5aa3da85c1f6732feb0989499a6abb62c5e79bdb
parent7ddcd2be5f71cb98ed53a35c3dd7451c652b1e85 (diff)
downloadATCD-fa8504ca1f373da4852caac549249c43e611cc9f.tar.gz
TAO connector fix
-rw-r--r--ChangeLog-97b6
-rw-r--r--ace/Connector.cpp15
2 files changed, 16 insertions, 5 deletions
diff --git a/ChangeLog-97b b/ChangeLog-97b
index 7ce7edba9d0..c8baed6929b 100644
--- a/ChangeLog-97b
+++ b/ChangeLog-97b
@@ -4,6 +4,12 @@ Mon Nov 3 17:15:17 1997 Steve Huston <shuston@riverace.com>
ACE_CLASS_IS_NAMESPACE macro. Produces warnings on AIX and
shouldn't be needed.
+Mon Nov 3 15:49:18 1997 Chris Cleeland <cleeland@cs.wustl.edu>
+
+ * ace/Connector.cpp (connect): "Fixed" so that the service handler
+ pointer passed in by the caller doesn't change until the connect
+ completes without errors.
+
Mon Nov 3 14:16:37 1997 Nanbor Wang <nw1@cumbia.cs.wustl.edu>
* ace/SV_Semaphore_Complex.cpp (close): Changed to return 0
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.