Module: kamailio
Branch: 5.7
Commit: d01b6e22e083c6fab457f8fbe1c8ac2526a37d30
URL:
https://github.com/kamailio/kamailio/commit/d01b6e22e083c6fab457f8fbe1c8ac2…
Author: S-P Chan <shihping.chan(a)gmail.com>
Committer: S-P Chan <shihping.chan(a)gmail.com>
Date: 2024-02-27T05:11:23+08:00
http_async_client: libssl thread executor for curl_global_init()
Cherry-pick from 514635dc3e
---
Modified: src/modules/http_async_client/http_multi.c
---
Diff:
https://github.com/kamailio/kamailio/commit/d01b6e22e083c6fab457f8fbe1c8ac2…
Patch:
https://github.com/kamailio/kamailio/commit/d01b6e22e083c6fab457f8fbe1c8ac2…
---
diff --git a/src/modules/http_async_client/http_multi.c
b/src/modules/http_async_client/http_multi.c
index a57aba9c951..a0ee1c877cf 100644
--- a/src/modules/http_async_client/http_multi.c
+++ b/src/modules/http_async_client/http_multi.c
@@ -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;
@@ -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);
}