mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
system/httptool: make timeouts flexible
Origin commit data
------------------
Branch: ni/coolstream
Commit: 8423c3356b
Author: FlatTV <FlatTV@gmx.de>
Date: 2016-07-09 (Sat, 09 Jul 2016)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -58,7 +58,7 @@ int CHTTPTool::show_progress( void *clientp, double dltotal, double dlnow, doubl
|
||||
return 0;
|
||||
}
|
||||
//#define DEBUG
|
||||
bool CHTTPTool::downloadFile(const std::string & URL, const char * const downloadTarget, int globalProgressEnd)
|
||||
bool CHTTPTool::downloadFile(const std::string & URL, const char * const downloadTarget, int globalProgressEnd,/*NI*/int connecttimeout,/*NI*/int timeout)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res;
|
||||
@@ -90,8 +90,8 @@ printf("url is %s\n", URL.c_str());
|
||||
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0);
|
||||
curl_easy_setopt(curl, CURLOPT_USERAGENT, userAgent.c_str());
|
||||
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, (long)1);
|
||||
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 1800);
|
||||
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 10);
|
||||
curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout); //NI
|
||||
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, connecttimeout); //NI
|
||||
curl_easy_setopt(curl, CURLOPT_FAILONERROR, true);
|
||||
#ifdef DEBUG
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||
|
Reference in New Issue
Block a user