diff options
author | Jose <jose@zeroc.com> | 2015-06-10 17:17:41 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2015-06-10 17:17:41 +0200 |
commit | 2fa96b5ac8cd0741faecfffbb5841bdb927030fc (patch) | |
tree | 9a8cd9509944e1854623ceec70b56d2f1e95bd76 /cpp/src | |
parent | Fixed JS operationsBidir test dispatch warning (ICE-6585) (diff) | |
download | ice-2fa96b5ac8cd0741faecfffbb5841bdb927030fc.tar.bz2 ice-2fa96b5ac8cd0741faecfffbb5841bdb927030fc.tar.xz ice-2fa96b5ac8cd0741faecfffbb5841bdb927030fc.zip |
Fix issue with IceSSL.InitOpenSSL and OpenSSLEngine destructor
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/IceSSL/OpenSSLEngine.cpp | 7 | ||||
-rw-r--r-- | cpp/src/IceSSL/SSLEngine.h | 1 |
2 files changed, 4 insertions, 4 deletions
diff --git a/cpp/src/IceSSL/OpenSSLEngine.cpp b/cpp/src/IceSSL/OpenSSLEngine.cpp index c7510a6774c..5ec9186ed6e 100644 --- a/cpp/src/IceSSL/OpenSSLEngine.cpp +++ b/cpp/src/IceSSL/OpenSSLEngine.cpp @@ -41,6 +41,7 @@ namespace IceUtil::Mutex* staticMutex = 0; int instanceCount = 0; +bool initOpenSSL = false; IceUtil::Mutex* locks = 0; class Init @@ -189,8 +190,8 @@ OpenSSLEngine::OpenSSLEngine(const CommunicatorPtr& communicator) : // application should disable OpenSSL initialization in those components and // perform the initialization itself. // - _initOpenSSL = properties->getPropertyAsIntWithDefault("IceSSL.InitOpenSSL", 1) > 0; - if(_initOpenSSL) + initOpenSSL = properties->getPropertyAsIntWithDefault("IceSSL.InitOpenSSL", 1) > 0; + if(initOpenSSL) { // // Create the mutexes and set the callbacks. @@ -302,7 +303,7 @@ OpenSSLEngine::~OpenSSLEngine() // IceUtilInternal::MutexPtrLock<IceUtil::Mutex> sync(staticMutex); - if(--instanceCount == 0 && _initOpenSSL) + if(--instanceCount == 0 && initOpenSSL) { // // NOTE: We can't destroy the locks here: threads which might have called openssl methods diff --git a/cpp/src/IceSSL/SSLEngine.h b/cpp/src/IceSSL/SSLEngine.h index a85c956fb6f..e199f1e1134 100644 --- a/cpp/src/IceSSL/SSLEngine.h +++ b/cpp/src/IceSSL/SSLEngine.h @@ -245,7 +245,6 @@ private: int parseProtocols(const Ice::StringSeq&) const; - bool _initOpenSSL; bool _initialized; SSL_CTX* _ctx; std::string _defaultDir; |