Skip to content

TELECOM-11880: Working fix to revert to old behaviour #109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 3.4-genesys
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions modules/rest_client/rest_methods.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,9 @@ static int init_transfer(CURL *handle, char *url, unsigned long timeout_s)
}

w_curl_easy_setopt(handle, CURLOPT_CONNECTTIMEOUT,
timeout_s && timeout_s < connection_timeout ? timeout_s : connection_timeout);
timeout_s && timeout_s > connection_timeout ? timeout_s : connection_timeout);
w_curl_easy_setopt(handle, CURLOPT_TIMEOUT,
timeout_s && timeout_s < curl_timeout ? timeout_s : curl_timeout);
timeout_s && timeout_s > curl_timeout ? timeout_s : curl_timeout);

w_curl_easy_setopt(handle, CURLOPT_VERBOSE, 1);
w_curl_easy_setopt(handle, CURLOPT_STDERR, stdout);
Expand Down Expand Up @@ -891,7 +891,7 @@ int start_async_http_req(struct sip_msg *msg, enum rest_client_method method,
multi_handle = multi_list->multi_handle;
curl_multi_add_handle(multi_handle, handle);

connect_timeout = (async_parm->timeout_s*1000) < connection_timeout_ms ?
connect_timeout = (async_parm->timeout_s*1000) > connection_timeout_ms ?
(async_parm->timeout_s*1000) : connection_timeout_ms;
timeout = connect_timeout;
busy_wait = connect_poll_interval;
Expand Down Expand Up @@ -974,7 +974,7 @@ int start_async_http_req(struct sip_msg *msg, enum rest_client_method method,
for (fd = 0; fd <= max_fd; fd++) {
if (FD_ISSET(fd, &rset)) {
LM_DBG("ongoing transfer on fd %d\n", fd);
if (connect > 0 && req_sz > 0 && is_new_transfer(fd)) {
if (req_sz > 0 && is_new_transfer(fd)) {
LM_DBG(">>> add fd %d to ongoing transfers\n", fd);
add_transfer(fd);
goto success;
Expand Down
Loading