blob: 4b1ee1b0f95551ca78a9e059aa1180f08404890d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
diff -r -u a/libcurl/curl_wrap.h b/libcurl/curl_wrap.h
--- a/libcurl/curl_wrap.h 2020-07-22 13:22:19.000000000 +0200
+++ b/libcurl/curl_wrap.h 2020-12-05 14:38:38.000000000 +0100
@@ -138,8 +138,9 @@
ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_HTTP3);
ZEN_CHECK_CASE_FOR_CONSTANT(CURL_LAST);
ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_QUIC_CONNECT_ERROR);
+ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_PROXY);
}
- static_assert(CURL_LAST == CURLE_QUIC_CONNECT_ERROR + 1);
+ static_assert(CURL_LAST == CURLE_PROXY + 1);
return replaceCpy<std::wstring>(L"Curl status %x", L"%x", numberTo<std::wstring>(static_cast<int>(sc)));
}
@@ -148,12 +149,10 @@
void applyCurlOptions(CURL* easyHandle, const std::vector<CurlOption>& options) //throw SysError
{
for (const CurlOption& opt : options)
- {
- const CURLcode rc = ::curl_easy_setopt(easyHandle, opt.option, opt.value);
- if (rc != CURLE_OK)
+ if (const CURLcode rc = ::curl_easy_setopt(easyHandle, opt.option, opt.value);
+ rc != CURLE_OK)
throw SysError(formatSystemError("curl_easy_setopt(" + numberTo<std::string>(static_cast<int>(opt.option)) + ")",
formatCurlStatusCode(rc), utfTo<std::wstring>(::curl_easy_strerror(rc))));
- }
}
}
}
|