diff options
author | Jose <jose@zeroc.com> | 2016-08-01 12:01:20 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2016-08-01 12:01:20 +0200 |
commit | 9e408cdd73655cb6c5269aa5bfe7fc35ec48768e (patch) | |
tree | 81943ea84545f9a771f18ed88123ba9118059129 /cpp | |
parent | Fixed (ICE-7216) IceStorm test icedb lock files not being deleted (diff) | |
download | ice-9e408cdd73655cb6c5269aa5bfe7fc35ec48768e.tar.bz2 ice-9e408cdd73655cb6c5269aa5bfe7fc35ec48768e.tar.xz ice-9e408cdd73655cb6c5269aa5bfe7fc35ec48768e.zip |
Do not initialize OpenSSL locks if already done by other library.
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/IceSSL/OpenSSLEngine.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cpp/src/IceSSL/OpenSSLEngine.cpp b/cpp/src/IceSSL/OpenSSLEngine.cpp index a7232b06f7f..04409461957 100644 --- a/cpp/src/IceSSL/OpenSSLEngine.cpp +++ b/cpp/src/IceSSL/OpenSSLEngine.cpp @@ -63,11 +63,10 @@ public: // the need to use a custom thread callback. // #if OPENSSL_VERSION_NUMBER < 0x10100000L - CRYPTO_set_locking_callback(0); - CRYPTO_set_id_callback(0); - if(locks) { + CRYPTO_set_locking_callback(0); + CRYPTO_set_id_callback(0); delete[] locks; locks = 0; } @@ -223,7 +222,7 @@ OpenSSLEngine::OpenSSLEngine(const CommunicatorPtr& communicator) : // // Create the mutexes and set the callbacks. // - if(!locks) + if(!locks && !CRYPTO_get_id_callback()) { locks = new IceUtil::Mutex[CRYPTO_num_locks()]; CRYPTO_set_locking_callback(IceSSL_opensslLockCallback); |