diff options
author | Anthony Neal <aneal@zeroc.com> | 2001-12-05 14:21:37 +0000 |
---|---|---|
committer | Anthony Neal <aneal@zeroc.com> | 2001-12-05 14:21:37 +0000 |
commit | 06791cc88e39b51523399593eb2a33d93395d2d2 (patch) | |
tree | b4650d4b60870a4a90dcead43a06f86a03460155 /cpp/src | |
parent | depend (diff) | |
download | ice-06791cc88e39b51523399593eb2a33d93395d2d2.tar.bz2 ice-06791cc88e39b51523399593eb2a33d93395d2d2.tar.xz ice-06791cc88e39b51523399593eb2a33d93395d2d2.zip |
Fixed a bug regarding the readSelect() timeout during handshake. My bad.
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/SslConnectionOpenSSL.cpp | 2 | ||||
-rw-r--r-- | cpp/src/Ice/SslConnectionOpenSSLClient.cpp | 8 | ||||
-rw-r--r-- | cpp/src/Ice/SslConnectionOpenSSLServer.cpp | 8 |
3 files changed, 7 insertions, 11 deletions
diff --git a/cpp/src/Ice/SslConnectionOpenSSL.cpp b/cpp/src/Ice/SslConnectionOpenSSL.cpp index 3b150bb3f49..9e982281e15 100644 --- a/cpp/src/Ice/SslConnectionOpenSSL.cpp +++ b/cpp/src/Ice/SslConnectionOpenSSL.cpp @@ -405,7 +405,7 @@ IceSecurity::Ssl::OpenSSL::Connection::readSSL(Buffer& buf, int timeout) if (init(timeout)) { bytesPending = pending(); - +
if (!bytesPending && readSelect(_readTimeout))
{
bytesPending = 1;
diff --git a/cpp/src/Ice/SslConnectionOpenSSLClient.cpp b/cpp/src/Ice/SslConnectionOpenSSLClient.cpp index d1d39597c0c..acd736de782 100644 --- a/cpp/src/Ice/SslConnectionOpenSSLClient.cpp +++ b/cpp/src/Ice/SslConnectionOpenSSLClient.cpp @@ -90,13 +90,13 @@ IceSecurity::Ssl::OpenSSL::ClientConnection::init(int timeout) { int i = 0;
- _readTimeout = timeout;
+ _readTimeout = timeout > _handshakeReadTimeout ? timeout : _handshakeReadTimeout;
try
{
if (_initWantRead) { - i = readSelect(timeout); + i = readSelect(_readTimeout); } else if (_initWantWrite) { @@ -168,7 +168,7 @@ IceSecurity::Ssl::OpenSSL::ClientConnection::init(int timeout) if (wouldBlock()) { - readSelect(timeout); + readSelect(_readTimeout); break; } @@ -216,8 +216,6 @@ IceSecurity::Ssl::OpenSSL::ClientConnection::init(int timeout) if (retCode > 0) { - _readTimeout = timeout > _handshakeReadTimeout ? timeout : _handshakeReadTimeout;
-
// Init finished, look at the connection information. showConnectionInfo(); } diff --git a/cpp/src/Ice/SslConnectionOpenSSLServer.cpp b/cpp/src/Ice/SslConnectionOpenSSLServer.cpp index f2244f85455..40991e654ae 100644 --- a/cpp/src/Ice/SslConnectionOpenSSLServer.cpp +++ b/cpp/src/Ice/SslConnectionOpenSSLServer.cpp @@ -95,13 +95,13 @@ IceSecurity::Ssl::OpenSSL::ServerConnection::init(int timeout) { int i = 0; - _readTimeout = timeout;
+ _readTimeout = timeout > _handshakeReadTimeout ? timeout : _handshakeReadTimeout;
try
{
if (_initWantRead)
{
- i = readSelect(timeout);
+ i = readSelect(_readTimeout);
}
else if (_initWantWrite)
{
@@ -198,7 +198,7 @@ IceSecurity::Ssl::OpenSSL::ServerConnection::init(int timeout) if (wouldBlock()) { - readSelect(timeout); + readSelect(_readTimeout); break; } @@ -246,8 +246,6 @@ IceSecurity::Ssl::OpenSSL::ServerConnection::init(int timeout) if (retCode > 0) { - _readTimeout = timeout > _handshakeReadTimeout ? timeout : _handshakeReadTimeout;
-
// Init finished, look at the connection information. showConnectionInfo(); } |