Set some curl options for API handle in Downloader::processDownloadQueue

Some curl options which were used for API handle in Downloader::init weren't set for the API handle in Downloader::processDownloadQueue
This commit is contained in:
Sude 2016-08-30 21:34:58 +03:00
parent 24bd3a7c0e
commit 4ee63f7e87

View File

@ -2880,6 +2880,11 @@ void Downloader::processDownloadQueue(Config conf, const unsigned int& tid)
std::string msg_prefix = "[Thread #" + std::to_string(tid) + "] "; std::string msg_prefix = "[Thread #" + std::to_string(tid) + "] ";
API* api = new API(conf.sToken, conf.sSecret); API* api = new API(conf.sToken, conf.sSecret);
api->curlSetOpt(CURLOPT_SSL_VERIFYPEER, conf.bVerifyPeer);
api->curlSetOpt(CURLOPT_CONNECTTIMEOUT, conf.iTimeout);
if (!conf.sCACertPath.empty())
api->curlSetOpt(CURLOPT_CAINFO, conf.sCACertPath.c_str());
if (!api->init()) if (!api->init())
{ {
delete api; delete api;