mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
Merge branch 'master' of https://github.com/tuxbox-neutrino/gui-neutrino into ni/tuxbox
Conflicts:
src/system/httptool.cpp
src/system/httptool.h
Origin commit data
------------------
Branch: ni/coolstream
Commit: d376b79ff1
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-10-26 (Wed, 26 Oct 2016)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -66,7 +66,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, int connecttimeout, int timeout) //NI
|
||||
bool CHTTPTool::downloadFile(const std::string & URL, const char * const downloadTarget, int globalProgressEnd, int connecttimeout/*=10*/, int timeout/*=1800*/)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res;
|
||||
@@ -98,10 +98,10 @@ 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, timeout); //NI
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, false); //NI
|
||||
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, connecttimeout); //NI
|
||||
curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout);
|
||||
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, connecttimeout);
|
||||
curl_easy_setopt(curl, CURLOPT_FAILONERROR, true);
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, false); //NI
|
||||
#ifdef DEBUG
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||
#endif
|
||||
@@ -138,7 +138,7 @@ printf("download code %d\n", res);
|
||||
return res==CURLE_OK;
|
||||
}
|
||||
|
||||
std::string CHTTPTool::downloadString(const std::string & URL, int globalProgressEnd)
|
||||
std::string CHTTPTool::downloadString(const std::string & URL, int globalProgressEnd, int connecttimeout/*=10*/, int timeout/*=1800*/)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res;
|
||||
@@ -163,8 +163,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);
|
||||
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, connecttimeout);
|
||||
curl_easy_setopt(curl, CURLOPT_FAILONERROR, true);
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
#ifdef DEBUG
|
||||
|
Reference in New Issue
Block a user