From 4ee63f7e87c32b859207b63a467fe12c593577b6 Mon Sep 17 00:00:00 2001 From: Sude Date: Tue, 30 Aug 2016 21:34:58 +0300 Subject: [PATCH] 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 --- src/downloader.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/downloader.cpp b/src/downloader.cpp index 05a7fa5..b239f65 100644 --- a/src/downloader.cpp +++ b/src/downloader.cpp @@ -2880,6 +2880,11 @@ void Downloader::processDownloadQueue(Config conf, const unsigned int& tid) std::string msg_prefix = "[Thread #" + std::to_string(tid) + "] "; 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()) { delete api;