diff options
Diffstat (limited to 'cpp/src/Ice/SslAcceptor.cpp')
-rw-r--r-- | cpp/src/Ice/SslAcceptor.cpp | 116 |
1 files changed, 58 insertions, 58 deletions
diff --git a/cpp/src/Ice/SslAcceptor.cpp b/cpp/src/Ice/SslAcceptor.cpp index 1eaa4c01776..a1aeac543f0 100644 --- a/cpp/src/Ice/SslAcceptor.cpp +++ b/cpp/src/Ice/SslAcceptor.cpp @@ -7,13 +7,13 @@ // All Rights Reserved // // ********************************************************************** -#ifdef WIN32
-#pragma warning(disable:4786)
-#endif
+#ifdef WIN32 +#pragma warning(disable:4786) +#endif -#include <Ice/SslFactory.h>
-#include <Ice/SslSystem.h>
-#include <Ice/Properties.h>
+#include <Ice/SslFactory.h> +#include <Ice/SslSystem.h> +#include <Ice/Properties.h> #include <Ice/SslAcceptor.h> #include <Ice/SslTransceiver.h> #include <Ice/Instance.h> @@ -21,20 +21,20 @@ #include <Ice/Logger.h> #include <Ice/Network.h> #include <Ice/Exception.h> -#include <Ice/SslException.h>
-#include <sstream>
+#include <Ice/SslException.h> +#include <sstream> using namespace std; using namespace Ice; using namespace IceInternal; -using std::string;
-using std::ostringstream;
-using IceSecurity::Ssl::Connection;
-using IceSecurity::Ssl::Factory;
-using IceSecurity::Ssl::System;
-using IceSecurity::Ssl::ShutdownException;
-
+using std::string; +using std::ostringstream; +using IceSecurity::Ssl::Connection; +using IceSecurity::Ssl::Factory; +using IceSecurity::Ssl::System; +using IceSecurity::Ssl::ShutdownException; + int IceInternal::SslAcceptor::fd() { @@ -102,50 +102,50 @@ IceInternal::SslAcceptor::accept(int timeout) _logger->trace(_traceLevels->networkCat, s.str()); } - // This is the Ice SSL Configuration File on which we will base
- // all connections in this communicator.
- string configFile = _instance->properties()->getProperty("Ice.Ssl.Config");
-
- // Get an instance of the SslSystem singleton.
- System* sslSystem = Factory::getSystem(configFile);
-
- if (!sslSystem->isTraceSet())
- {
- sslSystem->setTrace(_traceLevels);
- }
-
- if (!sslSystem->isLoggerSet())
- {
- sslSystem->setLogger(_logger);
- }
-
- // Initialize the server (if needed)
- if (!sslSystem->isConfigLoaded())
- {
- sslSystem->loadConfig();
- }
-
- Connection* sslConnection = 0;
-
- try
+ // This is the Ice SSL Configuration File on which we will base + // all connections in this communicator. + string configFile = _instance->properties()->getProperty("Ice.Ssl.Config"); + + // Get an instance of the SslSystem singleton. + System* sslSystem = Factory::getSystem(configFile); + + if (!sslSystem->isTraceSet()) + { + sslSystem->setTrace(_traceLevels); + } + + if (!sslSystem->isLoggerSet()) { - sslConnection = sslSystem->createServerConnection(fd);
- }
- catch (...)
- {
- Factory::releaseSystem(sslSystem);
- sslSystem = 0;
-
- // Shutdown the connection.
- throw;
- }
-
- TransceiverPtr transPtr = new SslTransceiver(_instance, fd, sslConnection);
-
- Factory::releaseSystem(sslSystem);
- sslSystem = 0;
- - return transPtr;
+ sslSystem->setLogger(_logger); + } + + // Initialize the server (if needed) + if (!sslSystem->isConfigLoaded()) + { + sslSystem->loadConfig(); + } + + Connection* sslConnection = 0; + + try + { + sslConnection = sslSystem->createServerConnection(fd); + } + catch (...) + { + Factory::releaseSystem(sslSystem); + sslSystem = 0; + + // Shutdown the connection. + throw; + } + + TransceiverPtr transPtr = new SslTransceiver(_instance, fd, sslConnection); + + Factory::releaseSystem(sslSystem); + sslSystem = 0; + + return transPtr; } string |