mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
@@ -33,6 +33,7 @@ static void lockingCallback(int mode, int type, char const* /*file*/, int /*line
|
||||
|
||||
static void threadIdCallback(CRYPTO_THREADID * id)
|
||||
{
|
||||
(void)id;
|
||||
CRYPTO_THREADID_set_numeric(id, std::hash<std::thread::id>()(std::this_thread::get_id()));
|
||||
}
|
||||
|
||||
@@ -41,9 +42,13 @@ void OpenSSLCrypto::threadsSetup()
|
||||
cryptoLocks.resize(CRYPTO_num_locks());
|
||||
for(int i = 0 ; i < CRYPTO_num_locks(); ++i)
|
||||
{
|
||||
cryptoLocks[i] = new std::mutex;
|
||||
cryptoLocks[i] = new std::mutex();
|
||||
}
|
||||
|
||||
(void)&threadIdCallback;
|
||||
CRYPTO_THREADID_set_callback(threadIdCallback);
|
||||
|
||||
(void)&lockingCallback;
|
||||
CRYPTO_set_locking_callback(lockingCallback);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user