summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/SslFactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/SslFactory.cpp')
-rw-r--r--cpp/src/Ice/SslFactory.cpp106
1 files changed, 53 insertions, 53 deletions
diff --git a/cpp/src/Ice/SslFactory.cpp b/cpp/src/Ice/SslFactory.cpp
index 45d962adb9e..b5e4f924874 100644
--- a/cpp/src/Ice/SslFactory.cpp
+++ b/cpp/src/Ice/SslFactory.cpp
@@ -12,75 +12,75 @@
#endif
#include <Ice/SslFactory.h>
-#include <Ice/SslSystemOpenSSL.h>
+#include <Ice/SslSystemOpenSSL.h>
#include <Ice/Security.h>
-
-#define OPENSSL_THREAD_DEFINES
-#include <openssl/opensslconf.h>
-#if defined(THREADS)
-#else
-#error "Thread support not enabled"
-#endif
-
+
+#define OPENSSL_THREAD_DEFINES
+#include <openssl/opensslconf.h>
+#if defined(THREADS)
+#else
+#error "Thread support not enabled"
+#endif
+
namespace IceSecurity
{
namespace Ssl
{
-
-
-extern "C"
-{
- void lockingCallback(int, int, const char*, int);
-}
+
+
+extern "C"
+{
+ void lockingCallback(int, int, const char*, int);
+}
// Static member instantiations.
-JTCMutex Factory::_systemRepositoryMutex;
+IceUtil::Mutex Factory::_systemRepositoryMutex;
SystemMap Factory::_systemRepository;
SslHandleSystemMap Factory::_sslHandleSystemRepository;
-
-class SslLockKeeper
-{
-
-public:
- SslLockKeeper()
- {
- CRYPTO_set_locking_callback((void (*)(int, int, const char*, int))lockingCallback);
- }
-
- ~SslLockKeeper()
- {
- CRYPTO_set_locking_callback(NULL);
- }
-
- JTCMutex sslLocks[CRYPTO_NUM_LOCKS];
-
-};
-
-SslLockKeeper lockKeeper;
+
+class SslLockKeeper
+{
+
+public:
+ SslLockKeeper()
+ {
+ CRYPTO_set_locking_callback((void (*)(int, int, const char*, int))lockingCallback);
+ }
+
+ ~SslLockKeeper()
+ {
+ CRYPTO_set_locking_callback(NULL);
+ }
+
+ IceUtil::Mutex sslLocks[CRYPTO_NUM_LOCKS];
+
+};
+
+SslLockKeeper lockKeeper;
}
}
-
-void IceSecurity::Ssl::lockingCallback(int mode, int type, const char *file, int line)
-{
- if (mode & CRYPTO_LOCK)
- {
- lockKeeper.sslLocks[type].lock();
- }
- else
- {
- lockKeeper.sslLocks[type].unlock();
- }
-}
-
+
+void IceSecurity::Ssl::lockingCallback(int mode, int type, const char *file, int line)
+{
+ if (mode & CRYPTO_LOCK)
+ {
+ lockKeeper.sslLocks[type].lock();
+ }
+ else
+ {
+ lockKeeper.sslLocks[type].unlock();
+ }
+}
+
IceSecurity::Ssl::System*
IceSecurity::Ssl::Factory::getSystem(string& systemIdentifier)
{
- JTCSyncT<JTCMutex> sync(_systemRepositoryMutex);
+ IceUtil::Mutex::Lock sync(_systemRepositoryMutex);
System* _system = _systemRepository[systemIdentifier];
@@ -110,7 +110,7 @@ IceSecurity::Ssl::Factory::getSystem(string& systemIdentifier)
void
IceSecurity::Ssl::Factory::releaseSystem(System* system)
{
- JTCSyncT<JTCMutex> sync(_systemRepositoryMutex);
+ IceUtil::Mutex::Lock sync(_systemRepositoryMutex);
assert(system);
@@ -134,7 +134,7 @@ IceSecurity::Ssl::Factory::addSystemHandle(void* sslHandle, System* system)
IceSecurity::Ssl::System*
IceSecurity::Ssl::Factory::getSystemFromHandle(void* sslHandle)
{
- JTCSyncT<JTCMutex> sync(_systemRepositoryMutex);
+ IceUtil::Mutex::Lock sync(_systemRepositoryMutex);
assert(sslHandle);
@@ -150,7 +150,7 @@ IceSecurity::Ssl::Factory::getSystemFromHandle(void* sslHandle)
void
IceSecurity::Ssl::Factory::releaseSystemFromHandle(void* sslHandle, System* system)
{
- JTCSyncT<JTCMutex> sync(_systemRepositoryMutex);
+ IceUtil::Mutex::Lock sync(_systemRepositoryMutex);
assert(sslHandle);
assert(system);