Module: kamailio
Branch: master
Commit: 21c508888cfaa4bf085ac3b2285b466bd03b8955
URL:
https://github.com/kamailio/kamailio/commit/21c508888cfaa4bf085ac3b2285b466…
Author: Giacomo Vacca <giacomo.vacca(a)gmail.com>
Committer: Giacomo Vacca <giacomo.vacca(a)gmail.com>
Date: 2016-06-16T12:11:31+02:00
http_async_client Minor indentations, code duplication
---
Modified: modules/http_async_client/http_async_client_mod.c
Modified: modules/http_async_client/http_multi.c
---
Diff:
https://github.com/kamailio/kamailio/commit/21c508888cfaa4bf085ac3b2285b466…
Patch:
https://github.com/kamailio/kamailio/commit/21c508888cfaa4bf085ac3b2285b466…
---
diff --git a/modules/http_async_client/http_async_client_mod.c
b/modules/http_async_client/http_async_client_mod.c
index 0ea2923..f8d2cc2 100644
--- a/modules/http_async_client/http_async_client_mod.c
+++ b/modules/http_async_client/http_async_client_mod.c
@@ -284,15 +284,6 @@ static int mod_init(void)
return -1;
}
- if (strncmp("shm", memory_manager, 3) == 0) {
- curl_memory_manager = 0;
- } else if (strncmp("sys", memory_manager, 3) == 0) {
- curl_memory_manager = 1;
- } else {
- LM_ERR("invalid memory_manager parameter: '%s'\n", memory_manager);
- return -1;
- }
-
/* init faked sip msg */
if(faked_msg_init()<0) {
LM_ERR("failed to init faked sip msg\n");
@@ -581,7 +572,7 @@ static int w_http_set_tls_client_cert(sip_msg_t* msg, char* sc,
char*foo)
return -1;
}
- return set_query_param(&ah_params.tls_client_cert, _tls_client_cert);
+ return set_query_param(&ah_params.tls_client_cert, _tls_client_cert);
}
static int w_http_set_tls_client_key(sip_msg_t* msg, char* sk, char*foo)
@@ -593,7 +584,7 @@ static int w_http_set_tls_client_key(sip_msg_t* msg, char* sk,
char*foo)
return -1;
}
- return set_query_param(&ah_params.tls_client_key, _tls_client_key);
+ return set_query_param(&ah_params.tls_client_key, _tls_client_key);
}
static int w_http_set_tls_ca_path(sip_msg_t* msg, char* cp, char*foo)
@@ -605,7 +596,7 @@ static int w_http_set_tls_ca_path(sip_msg_t* msg, char* cp, char*foo)
return -1;
}
- return set_query_param(&ah_params.tls_ca_path, _tls_ca_path);
+ return set_query_param(&ah_params.tls_ca_path, _tls_ca_path);
}
/*
diff --git a/modules/http_async_client/http_multi.c
b/modules/http_async_client/http_multi.c
index a5df0ab..acc7b7b 100644
--- a/modules/http_async_client/http_multi.c
+++ b/modules/http_async_client/http_multi.c
@@ -401,7 +401,7 @@ int init_http_multi(struct event_base *evbase, struct http_m_global
*wg)
g->multi = curl_multi_init();
LM_DBG("curl_multi %p initialized on global %p (evbase %p)\n", g->multi, g,
evbase);
- g->timer_event = evtimer_new(g->evbase, timer_cb, g);
+ g->timer_event = evtimer_new(g->evbase, timer_cb, g);
/* setup the generic multi interface options we want */
curl_multi_setopt(g->multi, CURLMOPT_SOCKETFUNCTION, sock_cb);