fix(http): Pass char* as CURLOPT_USERAGENT

This commit is contained in:
patrick96 2019-10-28 01:56:21 +01:00 committed by Patrick Ziegler
parent 6f882ba3b2
commit 100632cce3

View File

@ -14,7 +14,7 @@ http_downloader::http_downloader(int connection_timeout) {
curl_easy_setopt(m_curl, CURLOPT_CONNECTTIMEOUT, connection_timeout);
curl_easy_setopt(m_curl, CURLOPT_FOLLOWLOCATION, true);
curl_easy_setopt(m_curl, CURLOPT_NOSIGNAL, true);
curl_easy_setopt(m_curl, CURLOPT_USERAGENT, "polybar/" + string{APP_VERSION});
curl_easy_setopt(m_curl, CURLOPT_USERAGENT, ("polybar/" + string{APP_VERSION}).c_str());
curl_easy_setopt(m_curl, CURLOPT_WRITEFUNCTION, http_downloader::write);
curl_easy_setopt(m_curl, CURLOPT_FORBID_REUSE, true);
}