diff options
author | Marc Laukien <marc@zeroc.com> | 2003-02-22 23:50:41 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2003-02-22 23:50:41 +0000 |
commit | fabde9cbe6ec805f31280f75054b311df4f69ab8 (patch) | |
tree | 5e4753a6c031ade4d3434b21702e285c06721766 /cpp/src/IceSSL/OpenSSLPluginI.cpp | |
parent | fixed bug with exceptions propagating from ice_response() (diff) | |
download | ice-fabde9cbe6ec805f31280f75054b311df4f69ab8.tar.bz2 ice-fabde9cbe6ec805f31280f75054b311df4f69ab8.tar.xz ice-fabde9cbe6ec805f31280f75054b311df4f69ab8.zip |
minor
Diffstat (limited to 'cpp/src/IceSSL/OpenSSLPluginI.cpp')
-rw-r--r-- | cpp/src/IceSSL/OpenSSLPluginI.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/cpp/src/IceSSL/OpenSSLPluginI.cpp b/cpp/src/IceSSL/OpenSSLPluginI.cpp index 522888a9a5a..0dec2723057 100644 --- a/cpp/src/IceSSL/OpenSSLPluginI.cpp +++ b/cpp/src/IceSSL/OpenSSLPluginI.cpp @@ -114,7 +114,6 @@ namespace IceSSL extern "C" { void lockingCallback(int, int, const char*, int); - unsigned long idFunction(); } @@ -145,25 +144,20 @@ void IceSSL::lockingCallback(int mode, int type, const char *file, int line) } } -unsigned long IceSSL::idFunction() +unsigned long +IceSSL::idFunction() { - unsigned long threadID = 0; - #ifdef _WIN32 - threadID = GetCurrentThreadId(); -#elif _POSIX_THREADS - threadID = pthread_self(); + return static_cast<unsigned long>(GetCurrentThreadId()); #else - #error You must define a method to return the current thread ID. + return static_cast<unsigned long>(pthread_self()); #endif - - return threadID; } IceSSL::SslLockKeeper::SslLockKeeper() { - CRYPTO_set_id_callback((unsigned long(*)())IceSSL::idFunction); - CRYPTO_set_locking_callback((void (*)(int, int, const char*, int))IceSSL::lockingCallback); + CRYPTO_set_id_callback(IceSSL::idFunction); + CRYPTO_set_locking_callback(IceSSL::lockingCallback); } IceSSL::SslLockKeeper::~SslLockKeeper() |