diff options
author | Mark Spruiell <mes@zeroc.com> | 2003-05-09 23:44:04 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2003-05-09 23:44:04 +0000 |
commit | 08178d41304a3f8b0dda4b82b10e25fb2288c86b (patch) | |
tree | d408837cc6b5daae9eb2c5eabb72a82a411229c5 /cpp/src/IceSSL/SslTransceiver.cpp | |
parent | Changed library names on Windows for Ice 1.1 (diff) | |
download | ice-08178d41304a3f8b0dda4b82b10e25fb2288c86b.tar.bz2 ice-08178d41304a3f8b0dda4b82b10e25fb2288c86b.tar.xz ice-08178d41304a3f8b0dda4b82b10e25fb2288c86b.zip |
cache fdToString results to avoid exception when connection is shutdown on
Solaris
Diffstat (limited to 'cpp/src/IceSSL/SslTransceiver.cpp')
-rw-r--r-- | cpp/src/IceSSL/SslTransceiver.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/cpp/src/IceSSL/SslTransceiver.cpp b/cpp/src/IceSSL/SslTransceiver.cpp index f5b3b5c34c2..6a83659c3cd 100644 --- a/cpp/src/IceSSL/SslTransceiver.cpp +++ b/cpp/src/IceSSL/SslTransceiver.cpp @@ -164,7 +164,7 @@ IceSSL::SslTransceiver::read(Buffer& buf, int timeout) { Trace out(_logger, _traceLevels->networkCat); out << "received " << bytesRead << " of " << packetSize; - out << " bytes via ssl\n" << fdToString(SSL_get_fd(_sslConnection)); + out << " bytes via ssl\n" << toString(); } if(_stats) @@ -272,7 +272,7 @@ IceSSL::SslTransceiver::read(Buffer& buf, int timeout) string IceSSL::SslTransceiver::toString() const { - return fdToString(_fd); + return _desc; } void @@ -303,8 +303,7 @@ IceSSL::SslTransceiver::forceHandshake() if(_traceLevels->security >= IceSSL::SECURITY_WARNINGS) { Trace out(_logger, _traceLevels->securityCat); - out << "Handshake retry maximum reached.\n"; - out << fdToString(SSL_get_fd(_sslConnection)); + out << "Handshake retry maximum reached.\n" << toString(); } // If the handshake fails, the connection failed. @@ -1017,6 +1016,11 @@ IceSSL::SslTransceiver::SslTransceiver(const OpenSSLPluginIPtr& plugin, // Set up the SSL to be able to refer back to our connection object. addTransceiver(_sslConnection, this); + + // + // fdToString may raise a socket exception. + // + const_cast<string&>(_desc) = fdToString(_fd); } IceSSL::SslTransceiver::~SslTransceiver() |