mirror of
https://github.com/curl/curl.git
synced 2026-08-25 14:53:34 +03:00
vtls: make curl_global_sslset thread-safe
.. and update some docs to explain curl_global_* is now thread-safe.
Follow-up to 23af112 which made curl_global_init/cleanup thread-safe.
Closes https://github.com/curl/curl/pull/9016
This commit is contained in:
parent
9135275f86
commit
a8a4abb2ae
8 changed files with 60 additions and 23 deletions
17
lib/easy.c
17
lib/easy.c
|
|
@ -315,6 +315,23 @@ void curl_global_cleanup(void)
|
|||
global_init_unlock();
|
||||
}
|
||||
|
||||
/*
|
||||
* curl_global_sslset() globally initializes the SSL backend to use.
|
||||
*/
|
||||
CURLsslset curl_global_sslset(curl_sslbackend id, const char *name,
|
||||
const curl_ssl_backend ***avail)
|
||||
{
|
||||
CURLsslset rc;
|
||||
|
||||
global_init_lock();
|
||||
|
||||
rc = Curl_init_sslset_nolock(id, name, avail);
|
||||
|
||||
global_init_unlock();
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
* curl_easy_init() is the external interface to alloc, setup and init an
|
||||
* easy handle that is returned. If anything goes wrong, NULL is returned.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue