curl timeout, reorder layers, handle right click osx

This commit is contained in:
2017-04-15 18:55:27 +02:00
parent d230bc7a99
commit 163a435e6e
7 changed files with 65 additions and 5 deletions

View File

@@ -36,6 +36,7 @@ void LogRemote::net_init()
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &this->readBuffer);
//curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, data_handler);
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 5L);
}
std::string LogRemote::net_request(std::string cmd, std::string data /*= ""*/)
{
@@ -45,6 +46,8 @@ std::string LogRemote::net_request(std::string cmd, std::string data /*= ""*/)
auto url = m_url + cmd;
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
res = curl_easy_perform(curl);
if (res != CURLcode::CURLE_OK)
m_running = false;
return readBuffer;
}
void LogRemote::net_close()