Juan Lang juan.lang@gmail.com writes:
+static HANDLE *ssl_locks;
+static unsigned long ssl_thread_id(void) +{
- return GetThreadId(GetCurrentThread());
+}
You want GetCurrentThreadId();
+static void ssl_lock_callback(int mode, int type, const char *file, int line) +{
- if (mode & CRYPTO_LOCK)
WaitForSingleObject(ssl_locks[type], INFINITE);
- else
ReleaseMutex(ssl_locks[type]);
+}
You should use critical sections instead, it will be faster.