Skip to content

Commit

Permalink
http_async_client: libssl thread executor for curl_global_init()
Browse files Browse the repository at this point in the history
  • Loading branch information
space88man committed Feb 26, 2024
1 parent db05449 commit 514635d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/modules/http_async_client/http_multi.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
#include "../../core/mem/mem.h"
#include "../../core/ut.h"
#include "../../core/hashes.h"
#define KSR_RTHREAD_NEED_4L
#define KSR_RTHREAD_SKIP_P
#include "../../core/rthreads.h"
#include "http_multi.h"

extern int hash_size;
Expand Down Expand Up @@ -389,7 +392,8 @@ void set_curl_mem_callbacks(void)
break;
case 1:
LM_DBG("Initilizing cURL with sys malloc\n");
rc = curl_global_init(CURL_GLOBAL_ALL);
rc = run_thread4L(
(_thread_proto4L)curl_global_init, CURL_GLOBAL_ALL);
if(rc != 0) {
LM_ERR("Cannot initialize cURL: %d\n", rc);
}
Expand Down

0 comments on commit 514635d

Please sign in to comment.