Module: kamailio
Branch: 5.7
Commit: 8098136ccbe2050b499d3d962c44d58203afc370
URL:
https://github.com/kamailio/kamailio/commit/8098136ccbe2050b499d3d962c44d58…
Author: S-P Chan <shihping.chan(a)gmail.com>
Committer: S-P Chan <shihping.chan(a)gmail.com>
Date: 2024-02-27T05:11:36+08:00
xcap_client: libssl thread executor for curl_global_init()
Cherry-pick from f5164b39c8
---
Modified: src/modules/xcap_client/xcap_client.c
---
Diff:
https://github.com/kamailio/kamailio/commit/8098136ccbe2050b499d3d962c44d58…
Patch:
https://github.com/kamailio/kamailio/commit/8098136ccbe2050b499d3d962c44d58…
---
diff --git a/src/modules/xcap_client/xcap_client.c
b/src/modules/xcap_client/xcap_client.c
index ac77228bfde..4de2d367b63 100644
--- a/src/modules/xcap_client/xcap_client.c
+++ b/src/modules/xcap_client/xcap_client.c
@@ -41,6 +41,9 @@
#include "../../core/mem/shm_mem.h"
#include "../../core/rpc.h"
#include "../../core/rpc_lookup.h"
+#define KSR_RTHREAD_NEED_4L
+#define KSR_RTHREAD_SKIP_P
+#include "../../core/rthreads.h"
#include "../presence/utils_func.h"
#include "xcap_functions.h"
#include "xcap_client.h"
@@ -140,7 +143,7 @@ static int mod_init(void)
xcap_dbf.close(xcap_db);
xcap_db = NULL;
- curl_global_init(CURL_GLOBAL_ALL);
+ run_thread4L((_thread_proto4L)curl_global_init, CURL_GLOBAL_ALL);
if(periodical_query) {
register_timer(query_xcap_update, 0, query_period);