|
|
|
@ -75,7 +75,7 @@ bool fLogTimestamps = false;
@@ -75,7 +75,7 @@ bool fLogTimestamps = false;
|
|
|
|
|
CMedianFilter<int64> vTimeOffsets(200,0); |
|
|
|
|
bool fReopenDebugLog = false; |
|
|
|
|
|
|
|
|
|
// Init openssl library multithreading support
|
|
|
|
|
// Init OpenSSL library multithreading support
|
|
|
|
|
static CCriticalSection** ppmutexOpenSSL; |
|
|
|
|
void locking_callback(int mode, int i, const char* file, int line) |
|
|
|
|
{ |
|
|
|
@ -92,7 +92,7 @@ class CInit
@@ -92,7 +92,7 @@ class CInit
|
|
|
|
|
public: |
|
|
|
|
CInit() |
|
|
|
|
{ |
|
|
|
|
// Init openssl library multithreading support
|
|
|
|
|
// Init OpenSSL library multithreading support
|
|
|
|
|
ppmutexOpenSSL = (CCriticalSection**)OPENSSL_malloc(CRYPTO_num_locks() * sizeof(CCriticalSection*)); |
|
|
|
|
for (int i = 0; i < CRYPTO_num_locks(); i++) |
|
|
|
|
ppmutexOpenSSL[i] = new CCriticalSection(); |
|
|
|
@ -108,7 +108,7 @@ public:
@@ -108,7 +108,7 @@ public:
|
|
|
|
|
} |
|
|
|
|
~CInit() |
|
|
|
|
{ |
|
|
|
|
// Shutdown openssl library multithreading support
|
|
|
|
|
// Shutdown OpenSSL library multithreading support
|
|
|
|
|
CRYPTO_set_locking_callback(NULL); |
|
|
|
|
for (int i = 0; i < CRYPTO_num_locks(); i++) |
|
|
|
|
delete ppmutexOpenSSL[i]; |
|
|
|
|