Skip to content

Commit

Permalink
http_client: libssl thread executor for curl_global_init()
Browse files Browse the repository at this point in the history
Cherry-pick from f582259
  • Loading branch information
space88man committed Feb 26, 2024
1 parent d01b6e2 commit d9285fc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/modules/http_client/http_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@
#include "../../core/lvalue.h"
#include "../../core/pt.h" /* Process table */
#include "../../core/kemi.h"
#define KSR_RTHREAD_NEED_4L
#define KSR_RTHREAD_SKIP_P
#include "../../core/rthreads.h"

#include "functions.h"
#include "curlcon.h"
Expand Down Expand Up @@ -278,7 +281,7 @@ static int mod_init(void)
LM_DBG("init curl module\n");

/* Initialize curl */
if(curl_global_init(CURL_GLOBAL_ALL)) {
if(run_thread4L((_thread_proto4L)&curl_global_init, CURL_GLOBAL_ALL)) {
LM_ERR("curl_global_init failed\n");
return -1;
}
Expand Down

0 comments on commit d9285fc

Please sign in to comment.