Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
8f897b6f
Commit
8f897b6f
authored
Jun 12, 2014
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ssl: init also without threads
parent
cf15ac8a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
src/global.c
+10
-9
No files found.
src/global.c
View file @
8f897b6f
...
@@ -47,6 +47,15 @@ static void git__shutdown(void)
...
@@ -47,6 +47,15 @@ static void git__shutdown(void)
}
}
static
void
init_ssl
(
void
)
{
#ifdef GIT_SSL
SSL_load_error_strings
();
OpenSSL_add_ssl_algorithms
();
git__ssl_ctx
=
SSL_CTX_new
(
SSLv23_method
());
#endif
}
/**
/**
* Handle the global state with TLS
* Handle the global state with TLS
*
*
...
@@ -165,15 +174,6 @@ static pthread_key_t _tls_key;
...
@@ -165,15 +174,6 @@ static pthread_key_t _tls_key;
static
pthread_once_t
_once_init
=
PTHREAD_ONCE_INIT
;
static
pthread_once_t
_once_init
=
PTHREAD_ONCE_INIT
;
int
init_error
=
0
;
int
init_error
=
0
;
static
void
init_ssl
(
void
)
{
#ifdef GIT_SSL
SSL_load_error_strings
();
OpenSSL_add_ssl_algorithms
();
git__ssl_ctx
=
SSL_CTX_new
(
SSLv23_method
());
#endif
}
static
void
cb__free_status
(
void
*
st
)
static
void
cb__free_status
(
void
*
st
)
{
{
git__free
(
st
);
git__free
(
st
);
...
@@ -248,6 +248,7 @@ static git_global_st __state;
...
@@ -248,6 +248,7 @@ static git_global_st __state;
int
git_threads_init
(
void
)
int
git_threads_init
(
void
)
{
{
init_ssl
();
git_atomic_inc
(
&
git__n_inits
);
git_atomic_inc
(
&
git__n_inits
);
return
0
;
return
0
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment