Module: kamailio
Branch: master
Commit: 66fea7c615e01b200b334d5255c90911cfb360fe
URL:
https://github.com/kamailio/kamailio/commit/66fea7c615e01b200b334d5255c9091…
Author: Federico Cabiddu <federico.cabiddu(a)gmail.com>
Committer: Federico Cabiddu <federico.cabiddu(a)gmail.com>
Date: 2020-09-08T15:05:37+02:00
httpa_asyc_client: set curl memory callbacks in module initialization
---
Modified: src/modules/http_async_client/http_async_client_mod.c
Modified: src/modules/http_async_client/http_multi.c
---
Diff:
https://github.com/kamailio/kamailio/commit/66fea7c615e01b200b334d5255c9091…
Patch:
https://github.com/kamailio/kamailio/commit/66fea7c615e01b200b334d5255c9091…
---
diff --git a/src/modules/http_async_client/http_async_client_mod.c
b/src/modules/http_async_client/http_async_client_mod.c
index 7bfbb004c9..d0b99daecb 100644
--- a/src/modules/http_async_client/http_async_client_mod.c
+++ b/src/modules/http_async_client/http_async_client_mod.c
@@ -275,6 +275,8 @@ static int mod_init(void)
return -1;
}
+ set_curl_mem_callbacks();
+
/* init faked sip msg */
if(faked_msg_init()<0) {
LM_ERR("failed to init faked sip msg\n");
diff --git a/src/modules/http_async_client/http_multi.c
b/src/modules/http_async_client/http_multi.c
index b5c2e8d637..9ed1b2dc92 100644
--- a/src/modules/http_async_client/http_multi.c
+++ b/src/modules/http_async_client/http_multi.c
@@ -385,7 +385,6 @@ void set_curl_mem_callbacks(void)
LM_ERR ("invalid memory manager: %d\n", curl_memory_manager);
break;
}
-
}
int init_http_multi(struct event_base *evbase, struct http_m_global *wg)
@@ -393,7 +392,6 @@ int init_http_multi(struct event_base *evbase, struct http_m_global
*wg)
g = wg;
g->evbase = evbase;
- set_curl_mem_callbacks();
g->multi = curl_multi_init();
LM_DBG("curl_multi %p initialized on global %p (evbase %p)\n", g->multi, g,
evbase);