diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2014-06-11 22:52:15 +0400 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-06-11 22:54:42 +0400 |
commit | 1d3364ac9d2bcd2d194f0afa0d301456d0d4e276 (patch) | |
tree | 74981c82bc5350a2303f6a68a9d162d6001dfec8 /src/global.h | |
parent | 716e20b47eb82ebd94588fe6c950e661b6fe4f15 (diff) |
netops: init OpenSSL once under lock
The OpenSSL init functions are not reentrant, which means that running
multiple fetches in parallel can cause us to crash.
Use a mutex to init OpenSSL, and since we're adding this extra checks,
init it only once.
Diffstat (limited to 'src/global.h')
-rw-r--r-- | src/global.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/global.h b/src/global.h index 778250376..245f811e4 100644 --- a/src/global.h +++ b/src/global.h @@ -18,6 +18,8 @@ typedef struct { git_global_st *git__global_state(void); extern git_mutex git__mwindow_mutex; +extern git_mutex git__ssl_mutex; +extern git_atomic git__ssl_init; #define GIT_GLOBAL (git__global_state()) |