Module: kamailio
Branch: master
Commit: 4cd5d66dd6b899dc76cd33c6702426ea36d3d4d2
URL:
https://github.com/kamailio/kamailio/commit/4cd5d66dd6b899dc76cd33c6702426e…
Author: Olle E. Johansson <oej(a)edvina.net>
Committer: Olle E. Johansson <oej(a)edvina.net>
Date: 2016-03-28T12:10:08+02:00
http_client fix bad formatting.
---
Modified: modules/http_client/functions.c
---
Diff:
https://github.com/kamailio/kamailio/commit/4cd5d66dd6b899dc76cd33c6702426e…
Patch:
https://github.com/kamailio/kamailio/commit/4cd5d66dd6b899dc76cd33c6702426e…
---
diff --git a/modules/http_client/functions.c b/modules/http_client/functions.c
index 546ffc4..15a91f3 100644
--- a/modules/http_client/functions.c
+++ b/modules/http_client/functions.c
@@ -258,31 +258,31 @@ static int curL_query_url(struct sip_msg* _m, const char* _url, str*
_dst, const
if (download_size > 0) {
- if (params->oneline) {
- /* search for line feed */
- at = memchr(stream.buf, (char)10, download_size);
- datasize = (double) (at - stream.buf);
- LM_DBG(" -- curl download size cut to first line: %d \n", (int) datasize);
- }
- if (at == NULL) {
- if (params->maxdatasize && ((unsigned int) download_size) >
params->maxdatasize) {
- /* Limit at maximum data size */
- datasize = (double) params->maxdatasize;
- LM_DBG(" -- curl download size cut to maxdatasize : %d \n", (int)
datasize);
- } else {
- /* Limit at actual downloaded data size */
- datasize = (double) download_size;
- LM_DBG(" -- curl download size cut to download_size : %d \n", (int)
datasize);
- //at = stream.buf + (unsigned int) download_size;
+ if (params->oneline) {
+ /* search for line feed */
+ at = memchr(stream.buf, (char)10, download_size);
+ datasize = (double) (at - stream.buf);
+ LM_DBG(" -- curl download size cut to first line: %d \n", (int) datasize);
+ }
+ if (at == NULL) {
+ if (params->maxdatasize && ((unsigned int) download_size) >
params->maxdatasize) {
+ /* Limit at maximum data size */
+ datasize = (double) params->maxdatasize;
+ LM_DBG(" -- curl download size cut to maxdatasize : %d \n", (int)
datasize);
+ } else {
+ /* Limit at actual downloaded data size */
+ datasize = (double) download_size;
+ LM_DBG(" -- curl download size cut to download_size : %d \n", (int)
datasize);
+ //at = stream.buf + (unsigned int) download_size;
+ }
}
- }
/* Create a STR object */
rval.s = stream.buf;
rval.len = datasize;
/* Duplicate string to return */
pkg_str_dup(_dst, &rval);
- LM_DBG("curl query result: Length %d %.*s \n", rval.len, rval.len, rval.s);
+ LM_DBG("curl query result: Length %d %.*s \n", rval.len, rval.len, rval.s);
} else {
_dst->s = NULL;
_dst->len = 0;