Module: kamailio
Branch: 5.3
Commit: 794861c8db50846599118fe7583f522200195d8d
URL:
https://github.com/kamailio/kamailio/commit/794861c8db50846599118fe7583f522…
Author: Federico Cabiddu <federico.cabiddu(a)gmail.com>
Committer: Federico Cabiddu <federico.cabiddu(a)gmail.com>
Date: 2020-09-09T12:49:03+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/794861c8db50846599118fe7583f522…
Patch:
https://github.com/kamailio/kamailio/commit/794861c8db50846599118fe7583f522…
---
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 948171b519..cfe9ae9177 100644
--- a/src/modules/http_async_client/http_multi.c
+++ b/src/modules/http_async_client/http_multi.c
@@ -392,7 +392,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)
@@ -400,7 +399,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);