Merge remote-tracking branch 'tuxbox/master'

Origin commit data
------------------
Branch: ni/coolstream
Commit: 8b47699447
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2017-02-11 (Sat, 11 Feb 2017)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2017-02-11 11:18:45 +01:00
32 changed files with 217 additions and 174 deletions

View File

@@ -526,6 +526,8 @@ const char *CFlashVersionInfo::getReleaseCycle(void) const
const char *CFlashVersionInfo::getType(void) const
{
// TODO: localize it
switch (snapshot)
{
case '0':
@@ -540,6 +542,8 @@ const char *CFlashVersionInfo::getType(void) const
return "Settings";
case 'A':
return "Addon";
case 'U':
return "Update";
case 'T':
return "Text";
default:

View File

@@ -67,7 +67,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/*=10*/, int timeout/*=1800*/)
bool CHTTPTool::downloadFile(const std::string & URL, const char * const downloadTarget, int globalProgressEnd, int connecttimeout/*=10000*/, int timeout/*=1800*/)
{
CURL *curl;
CURLcode res;
@@ -99,7 +99,7 @@ printf("url is %s\n", URL.c_str());
curl_easy_setopt(curl, CURLOPT_USERAGENT, userAgent.c_str());
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, (long)1);
curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout);
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, connecttimeout);
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT_MS, connecttimeout);
curl_easy_setopt(curl, CURLOPT_FAILONERROR, true);
#ifdef DEBUG
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
@@ -137,7 +137,7 @@ printf("download code %d\n", res);
return res==CURLE_OK;
}
std::string CHTTPTool::downloadString(const std::string & URL, int globalProgressEnd, int connecttimeout/*=10*/, int timeout/*=1800*/)
std::string CHTTPTool::downloadString(const std::string & URL, int globalProgressEnd, int connecttimeout/*=10000*/, int timeout/*=1800*/)
{
CURL *curl;
CURLcode res;
@@ -163,7 +163,7 @@ printf("url is %s\n", URL.c_str());
curl_easy_setopt(curl, CURLOPT_USERAGENT, userAgent.c_str());
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, (long)1);
curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout);
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, connecttimeout);
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT_MS, connecttimeout);
curl_easy_setopt(curl, CURLOPT_FAILONERROR, true);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, false);
#ifdef DEBUG

View File

@@ -52,8 +52,8 @@ class CHTTPTool
CHTTPTool();
void setStatusViewer( CProgressWindow* statusview );
bool downloadFile( const std::string & URL, const char * const downloadTarget, int globalProgressEnd=-1, int connecttimeout=10, int timeout=1800);
std::string downloadString(const std::string & URL, int globalProgressEnd=-1, int connecttimeout=10, int timeout=1800);
bool downloadFile( const std::string & URL, const char * const downloadTarget, int globalProgressEnd=-1, int connecttimeout=10000, int timeout=1800);
std::string downloadString(const std::string & URL, int globalProgressEnd=-1, int connecttimeout=10000, int timeout=1800);
};

View File

@@ -164,6 +164,7 @@ struct timer_remotebox_item
std::string pass;
std::string rbname;
std::string rbaddress;
bool online;
};
struct SNeutrinoSettings