summaryrefslogtreecommitdiff
path: root/cpp/src/IceSSL/OpenSSLPluginI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceSSL/OpenSSLPluginI.cpp')
-rw-r--r--cpp/src/IceSSL/OpenSSLPluginI.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/cpp/src/IceSSL/OpenSSLPluginI.cpp b/cpp/src/IceSSL/OpenSSLPluginI.cpp
index 0dec2723057..b6de9514f20 100644
--- a/cpp/src/IceSSL/OpenSSLPluginI.cpp
+++ b/cpp/src/IceSSL/OpenSSLPluginI.cpp
@@ -105,18 +105,13 @@ create(const CommunicatorPtr& communicator, const string& name, const StringSeq&
}
+
//
// Thread safety implementation for OpenSSL
//
namespace IceSSL
{
-extern "C"
-{
- void lockingCallback(int, int, const char*, int);
- unsigned long idFunction();
-}
-
class SslLockKeeper
{
public:
@@ -132,7 +127,10 @@ SslLockKeeper lockKeeper;
}
-void IceSSL::lockingCallback(int mode, int type, const char *file, int line)
+extern "C"
+{
+
+static void lockingCallback(int mode, int type, const char *file, int line)
{
if(mode & CRYPTO_LOCK)
{
@@ -144,8 +142,8 @@ void IceSSL::lockingCallback(int mode, int type, const char *file, int line)
}
}
-unsigned long
-IceSSL::idFunction()
+static unsigned long
+idFunction()
{
#ifdef _WIN32
return static_cast<unsigned long>(GetCurrentThreadId());
@@ -153,11 +151,12 @@ IceSSL::idFunction()
return static_cast<unsigned long>(pthread_self());
#endif
}
+}
IceSSL::SslLockKeeper::SslLockKeeper()
{
- CRYPTO_set_id_callback(IceSSL::idFunction);
- CRYPTO_set_locking_callback(IceSSL::lockingCallback);
+ CRYPTO_set_id_callback(idFunction);
+ CRYPTO_set_locking_callback(lockingCallback);
}
IceSSL::SslLockKeeper::~SslLockKeeper()