Module: kamailio
Branch: master
Commit: ccd4481dcd42093ccca6d39cd71afc8fd4db938d
URL:
https://github.com/kamailio/kamailio/commit/ccd4481dcd42093ccca6d39cd71afc8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-03-22T09:42:33+01:00
http_client: clang-format new code
---
Modified: src/modules/http_client/functions.c
Modified: src/modules/http_client/http_client.c
---
Diff:
https://github.com/kamailio/kamailio/commit/ccd4481dcd42093ccca6d39cd71afc8…
Patch:
https://github.com/kamailio/kamailio/commit/ccd4481dcd42093ccca6d39cd71afc8…
---
diff --git a/src/modules/http_client/functions.c b/src/modules/http_client/functions.c
index a359ce5090d..df6b8233b51 100644
--- a/src/modules/http_client/functions.c
+++ b/src/modules/http_client/functions.c
@@ -272,10 +272,11 @@ static int curL_request_url(struct sip_msg *_m, const char *_met,
* - 1 (default) : timeout value is in seconds.
* - 2 : timeout value is in milliseconds.
*/
- if (timeout_mode == 1) { /* timeout is in seconds (default) */
+ if(timeout_mode == 1) { /* timeout is in seconds (default) */
res |= curl_easy_setopt(curl, CURLOPT_TIMEOUT, (long)params->timeout);
- } else if (timeout_mode == 2) { /* timeout is in milliseconds */
- res |= curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, (long)params->timeout);
+ } else if(timeout_mode == 2) { /* timeout is in milliseconds */
+ res |= curl_easy_setopt(
+ curl, CURLOPT_TIMEOUT_MS, (long)params->timeout);
}
res |= curl_easy_setopt(
@@ -734,7 +735,8 @@ int http_client_request_c(sip_msg_t *_m, char *_url, str *_dst, char
*_body,
int http_client_request(sip_msg_t *_m, char *_url, str *_dst, char *_body,
char *_hdrs, char *_met, unsigned int _httpver)
{
- return http_client_request_c(_m, _url, _dst, _body, NULL, _hdrs, _met, _httpver);
+ return http_client_request_c(
+ _m, _url, _dst, _body, NULL, _hdrs, _met, _httpver);
}
/*!
diff --git a/src/modules/http_client/http_client.c
b/src/modules/http_client/http_client.c
index 64c3a7c65ab..9be9b88d835 100644
--- a/src/modules/http_client/http_client.c
+++ b/src/modules/http_client/http_client.c
@@ -1091,9 +1091,8 @@ static int w_http_query_post_hdr(
/*!
* helper for HTTP-Query function
*/
-static int ki_http_request_helper(
- sip_msg_t *_m, str *met, str *url, str *body, str *hdrs,
- unsigned int httpver, pv_spec_t *dst)
+static int ki_http_request_helper(sip_msg_t *_m, str *met, str *url, str *body,
+ str *hdrs, unsigned int httpver, pv_spec_t *dst)
{
int ret = 0;
str result = {NULL, 0};
@@ -1199,8 +1198,8 @@ static int ki_http_query_request_v2pk(
return -1;
}
- return ki_http_request_helper(_m, met, url, body, hdrs,
- CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE, dst);
+ return ki_http_request_helper(
+ _m, met, url, body, hdrs, CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE, dst);
}
/*!