downloading cannot be canceled in case of no packet.
It's because cancel request is depended on CURLOPT_WRITEFUNCTION.
Therefore, if there is no packet, downloading would be blocked without error.
This patch limits speed and time to prevent this issue.
Change-Id: I13d6538528254f88884d8573cd320608916a9561
curl_easy_setopt(curl, CURLOPT_MAXCONNECTS, MAX_SESSION_COUNT);
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, MAX_TIMEOUT);
+ curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, LOW_SPEED_TIME);
+ curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 1L);
+
__set_proxy_on_soup_session(http_info->proxy_addr, curl);
curl_easy_setopt(curl, CURLOPT_URL, url);
#define MAX_SESSION_COUNT DA_MAX_DOWNLOAD_REQ_AT_ONCE
#define MAX_TIMEOUT DA_MAX_TIME_OUT
+#define LOW_SPEED_TIME 200
#define _ENABLE_LIBCURL_LOG_VERBOSE 0
da_ret_t PI_http_start(da_info_t *da_info);
Name: download-provider
Summary: Download the contents in background
-Version: 2.1.102
+Version: 2.1.103
Release: 0
Group: Development/Libraries
License: Apache-2.0