diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-05-22 02:05:41 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-05-22 02:06:26 +0300 |
commit | dd8699688fc642e5a99cc58948620cc096aa74b3 (patch) | |
tree | 5d7b2930d803392ed8866c267769facc2e7f20ad /src/net/download.cpp | |
parent | 8cf5ceb926d98b9e3b06ef96a9e543cf522f40dd (diff) | |
download | manaverse-dd8699688fc642e5a99cc58948620cc096aa74b3.tar.gz manaverse-dd8699688fc642e5a99cc58948620cc096aa74b3.tar.bz2 manaverse-dd8699688fc642e5a99cc58948620cc096aa74b3.tar.xz manaverse-dd8699688fc642e5a99cc58948620cc096aa74b3.zip |
Log libcurl errors into manaplus.log
Diffstat (limited to 'src/net/download.cpp')
-rw-r--r-- | src/net/download.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/net/download.cpp b/src/net/download.cpp index c3b15cd2b..073990b07 100644 --- a/src/net/download.cpp +++ b/src/net/download.cpp @@ -343,6 +343,7 @@ int Download::downloadThread(void *ptr) addProxy(d->mCurl); secureCurl(d->mCurl); } + addCommonFlags(d->mCurl); if ((res = curl_easy_perform(d->mCurl)) != 0 && (d->mOptions.cancel == 0u) && @@ -608,6 +609,11 @@ void Download::addHeaders(CURL *const curl A_UNUSED) } #endif // LIBCURL_VERSION_NUM >= 0x071507 +void Download::addCommonFlags(CURL *const curl) +{ + curl_easy_setopt(curl, CURLOPT_STDERR, logger->getFile()); +} + void Download::prepareForm(curl_httppost **form, const std::string &fileName) { curl_httppost *lastPtr = nullptr; |