summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2002-01-08 22:31:26 +0000
committerSteve Huston <shuston@riverace.com>2002-01-08 22:31:26 +0000
commit4b97e7388725ab20f4f5ea7f71ab74c7e3b87c9b (patch)
treeeb0cf34ef0e59fd2771e706e6e065f010ca14146
parent07368b1ed861c48558f6b8d5c23fd81ffb2674d9 (diff)
downloadATCD-4b97e7388725ab20f4f5ea7f71ab74c7e3b87c9b.tar.gz
ChangeLogTag:Tue Jan 8 17:29:33 2002 Steve Huston <shuston@riverace.com>
-rw-r--r--ChangeLog21
-rw-r--r--ChangeLogs/ChangeLog-02a21
-rw-r--r--ChangeLogs/ChangeLog-03a21
-rw-r--r--ace/SSL/SSL_SOCK_Connector.cpp60
4 files changed, 87 insertions, 36 deletions
diff --git a/ChangeLog b/ChangeLog
index 5fa13a4e470..25dda4bcca7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,14 +1,19 @@
-Tue Jan 8 15:51:06 2002 Don Hinton <dhinton@gmx.net>
+Tue Jan 8 17:29:33 2002 Steve Huston <shuston@riverace.com>
- * ace/Get_Opt.cpp
- * ace/Service_Config.cpp:
+ * ace/SSL/SSL_SOCK_Connector.cpp: Don't try to dereference a 0
+ timeout pointer. Gack. Thanks to Ossama for pointing this out.
- Moved the template instantiations from Service_Config.cpp to
- Get_Opt.cpp where they belong.
+Tue Jan 8 15:51:06 2002 Don Hinton <dhinton@gmx.net>
- * ace/Get_Opt.{h.cpp}: Replaced ACE_TString with ACE_TCHAR for
- type of member variable ACE_Get_Opt_Long_Option since it
- wasn't really needed and took up space.
+ * ace/Get_Opt.cpp
+ * ace/Service_Config.cpp:
+
+ Moved the template instantiations from Service_Config.cpp to
+ Get_Opt.cpp where they belong.
+
+ * ace/Get_Opt.{h.cpp}: Replaced ACE_TString with ACE_TCHAR for
+ type of member variable ACE_Get_Opt_Long_Option since it
+ wasn't really needed and took up space.
Tue Jan 8 10:43:48 2002 Ossama Othman <ossama@uci.edu>
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index 5fa13a4e470..25dda4bcca7 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,14 +1,19 @@
-Tue Jan 8 15:51:06 2002 Don Hinton <dhinton@gmx.net>
+Tue Jan 8 17:29:33 2002 Steve Huston <shuston@riverace.com>
- * ace/Get_Opt.cpp
- * ace/Service_Config.cpp:
+ * ace/SSL/SSL_SOCK_Connector.cpp: Don't try to dereference a 0
+ timeout pointer. Gack. Thanks to Ossama for pointing this out.
- Moved the template instantiations from Service_Config.cpp to
- Get_Opt.cpp where they belong.
+Tue Jan 8 15:51:06 2002 Don Hinton <dhinton@gmx.net>
- * ace/Get_Opt.{h.cpp}: Replaced ACE_TString with ACE_TCHAR for
- type of member variable ACE_Get_Opt_Long_Option since it
- wasn't really needed and took up space.
+ * ace/Get_Opt.cpp
+ * ace/Service_Config.cpp:
+
+ Moved the template instantiations from Service_Config.cpp to
+ Get_Opt.cpp where they belong.
+
+ * ace/Get_Opt.{h.cpp}: Replaced ACE_TString with ACE_TCHAR for
+ type of member variable ACE_Get_Opt_Long_Option since it
+ wasn't really needed and took up space.
Tue Jan 8 10:43:48 2002 Ossama Othman <ossama@uci.edu>
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index 5fa13a4e470..25dda4bcca7 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,14 +1,19 @@
-Tue Jan 8 15:51:06 2002 Don Hinton <dhinton@gmx.net>
+Tue Jan 8 17:29:33 2002 Steve Huston <shuston@riverace.com>
- * ace/Get_Opt.cpp
- * ace/Service_Config.cpp:
+ * ace/SSL/SSL_SOCK_Connector.cpp: Don't try to dereference a 0
+ timeout pointer. Gack. Thanks to Ossama for pointing this out.
- Moved the template instantiations from Service_Config.cpp to
- Get_Opt.cpp where they belong.
+Tue Jan 8 15:51:06 2002 Don Hinton <dhinton@gmx.net>
- * ace/Get_Opt.{h.cpp}: Replaced ACE_TString with ACE_TCHAR for
- type of member variable ACE_Get_Opt_Long_Option since it
- wasn't really needed and took up space.
+ * ace/Get_Opt.cpp
+ * ace/Service_Config.cpp:
+
+ Moved the template instantiations from Service_Config.cpp to
+ Get_Opt.cpp where they belong.
+
+ * ace/Get_Opt.{h.cpp}: Replaced ACE_TString with ACE_TCHAR for
+ type of member variable ACE_Get_Opt_Long_Option since it
+ wasn't really needed and took up space.
Tue Jan 8 10:43:48 2002 Ossama Othman <ossama@uci.edu>
diff --git a/ace/SSL/SSL_SOCK_Connector.cpp b/ace/SSL/SSL_SOCK_Connector.cpp
index 3ee84bcaaa6..dff2b9539b6 100644
--- a/ace/SSL/SSL_SOCK_Connector.cpp
+++ b/ace/SSL/SSL_SOCK_Connector.cpp
@@ -175,8 +175,13 @@ ACE_SSL_SOCK_Connector::connect (ACE_SSL_SOCK_Stream &new_stream,
// Take into account the time to complete the basic TCP handshake
// and the SSL handshake.
- ACE_Time_Value timeout_copy (*timeout); // Need a scribblable copy
- ACE_Countdown_Time countdown (&timeout_copy);
+ ACE_Time_Value time_copy;
+ ACE_Countdown_Time countdown (&time_copy);
+ if (timeout != 0)
+ {
+ time_copy += *timeout;
+ countdown.start ();
+ }
if (this->connector_.connect (new_stream.peer (),
remote_sap,
@@ -191,9 +196,16 @@ ACE_SSL_SOCK_Connector::connect (ACE_SSL_SOCK_Stream &new_stream,
else if (new_stream.get_handle () == ACE_INVALID_HANDLE)
new_stream.set_handle (new_stream.peer ().get_handle ());
- (void) countdown.update ();
+ // If using a timeout, update the countdown timer to reflect the time
+ // spent on the connect itself, then pass the remaining time to
+ // ssl_connect to bound the time on the handshake.
+ if (timeout != 0)
+ {
+ countdown.update ();
+ timeout = &time_copy;
+ }
- return this->ssl_connect (new_stream, &timeout_copy);
+ return this->ssl_connect (new_stream, timeout);
}
int
@@ -214,8 +226,13 @@ ACE_SSL_SOCK_Connector::connect (ACE_SSL_SOCK_Stream &new_stream,
// Take into account the time to complete the basic TCP handshake
// and the SSL handshake.
- ACE_Time_Value timeout_copy (*timeout); // Need a scribblable copy
- ACE_Countdown_Time countdown (&timeout_copy);
+ ACE_Time_Value time_copy;
+ ACE_Countdown_Time countdown (&time_copy);
+ if (timeout != 0)
+ {
+ time_copy += *timeout;
+ countdown.start ();
+ }
if (this->connector_.connect (new_stream.peer (),
remote_sap,
@@ -233,9 +250,16 @@ ACE_SSL_SOCK_Connector::connect (ACE_SSL_SOCK_Stream &new_stream,
else if (new_stream.get_handle () == ACE_INVALID_HANDLE)
new_stream.set_handle (new_stream.peer ().get_handle ());
- (void) countdown.update ();
+ // If using a timeout, update the countdown timer to reflect the time
+ // spent on the connect itself, then pass the remaining time to
+ // ssl_connect to bound the time on the handshake.
+ if (timeout != 0)
+ {
+ countdown.update ();
+ timeout = &time_copy;
+ }
- return this->ssl_connect (new_stream, &timeout_copy);
+ return this->ssl_connect (new_stream, timeout);
}
// Try to complete a non-blocking connection.
@@ -249,8 +273,13 @@ ACE_SSL_SOCK_Connector::complete (ACE_SSL_SOCK_Stream &new_stream,
// Take into account the time to complete the basic TCP handshake
// and the SSL handshake.
- ACE_Time_Value timeout_copy (*tv); // Need a scribblable copy
- ACE_Countdown_Time countdown (&timeout_copy);
+ ACE_Time_Value time_copy;
+ ACE_Countdown_Time countdown (&time_copy);
+ if (tv != 0)
+ {
+ time_copy += *tv;
+ countdown.start ();
+ }
if (this->connector_.complete (new_stream.peer (),
remote_sap,
@@ -259,9 +288,16 @@ ACE_SSL_SOCK_Connector::complete (ACE_SSL_SOCK_Stream &new_stream,
else if (new_stream.get_handle () == ACE_INVALID_HANDLE)
new_stream.set_handle (new_stream.peer ().get_handle ());
- (void) countdown.update ();
+ // If using a timeout, update the countdown timer to reflect the time
+ // spent on the connect itself, then pass the remaining time to
+ // ssl_connect to bound the time on the handshake.
+ if (tv != 0)
+ {
+ countdown.update ();
+ tv = &time_copy;
+ }
- return this->ssl_connect (new_stream, &timeout_copy);
+ return this->ssl_connect (new_stream, tv);
}