diff options
Diffstat (limited to 'cpp/src/Ice/SslFactory.cpp')
-rw-r--r-- | cpp/src/Ice/SslFactory.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/cpp/src/Ice/SslFactory.cpp b/cpp/src/Ice/SslFactory.cpp index 253a913d320..77ca0314eaa 100644 --- a/cpp/src/Ice/SslFactory.cpp +++ b/cpp/src/Ice/SslFactory.cpp @@ -29,7 +29,6 @@ #error "Thread support not enabled" #endif - namespace IceSSL { @@ -44,22 +43,15 @@ extern "C" class SslLockKeeper { - public: - SslLockKeeper() - { - CRYPTO_set_locking_callback((void (*)(int, int, const char*, int))lockingCallback); - } - - ~SslLockKeeper() - { - CRYPTO_set_locking_callback(NULL); - } +
+ SslLockKeeper(); + ~SslLockKeeper(); IceUtil::Mutex sslLocks[CRYPTO_NUM_LOCKS]; }; - +
SslLockKeeper lockKeeper; } @@ -76,6 +68,16 @@ void IceSSL::lockingCallback(int mode, int type, const char *file, int line) } } +IceSSL::SslLockKeeper::SslLockKeeper()
+{
+ CRYPTO_set_locking_callback((void (*)(int, int, const char*, int))IceSSL::lockingCallback);
+}
+
+IceSSL::SslLockKeeper::~SslLockKeeper()
+{
+ CRYPTO_set_locking_callback(NULL);
+}
+
IceSSL::SystemInternalPtr IceSSL::Factory::getSystem(const IceInternal::InstancePtr& instance) { |