From 4f320b6336bb968da1c237d3d2b0ddd432bc5fec Mon Sep 17 00:00:00 2001 From: Stephen Lombardo Date: Wed, 9 Jun 2010 14:39:25 -0400 Subject: [PATCH] thread safe eutex in activate_openssl --- src/crypto.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/crypto.c b/src/crypto.c index 7c339cc..c0f56f0 100644 --- a/src/crypto.c +++ b/src/crypto.c @@ -71,9 +71,11 @@ typedef struct { } codec_ctx; static void activate_openssl() { + sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER)); if(EVP_get_cipherbyname(CIPHER) == NULL) { OpenSSL_add_all_algorithms(); } + sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER)); } /*