From 21c508888cfaa4bf085ac3b2285b466bd03b8955 Mon Sep 17 00:00:00 2001 From: Giacomo Vacca Date: Thu, 16 Jun 2016 12:11:31 +0200 Subject: [PATCH] http_async_client Minor indentations, code duplication --- modules/http_async_client/http_async_client_mod.c | 15 +++------------ modules/http_async_client/http_multi.c | 2 +- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/modules/http_async_client/http_async_client_mod.c b/modules/http_async_client/http_async_client_mod.c index 0ea29235960..f8d2cc24f19 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 a5df0abacbc..acc7b7b3a9a 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);