Module: kamailio
Branch: 5.7
Commit: d9285fc741c2a3c3995e037c23393df108e94bf1
URL: 
https://github.com/kamailio/kamailio/commit/d9285fc741c2a3c3995e037c23393df108e94bf1

Author: S-P Chan <shihping.c...@gmail.com>
Committer: S-P Chan <shihping.c...@gmail.com>
Date: 2024-02-27T05:11:33+08:00

http_client: libssl thread executor for curl_global_init()

Cherry-pick from f58225950c

---

Modified: src/modules/http_client/http_client.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/d9285fc741c2a3c3995e037c23393df108e94bf1.diff
Patch: 
https://github.com/kamailio/kamailio/commit/d9285fc741c2a3c3995e037c23393df108e94bf1.patch

---

diff --git a/src/modules/http_client/http_client.c 
b/src/modules/http_client/http_client.c
index 430933e23d2..3cf662820f5 100644
--- a/src/modules/http_client/http_client.c
+++ b/src/modules/http_client/http_client.c
@@ -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"
@@ -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;
        }

_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org

Reply via email to