summaryrefslogtreecommitdiff
path: root/src/net/download.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-23 22:01:44 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-23 22:01:44 +0300
commit3c404128c4669a1f4f190e20a89553677717fc50 (patch)
tree2db4e5031089c800c4e00fd6244e578f44a7c910 /src/net/download.cpp
parent89b267d6d73bbc59f7c313b8a22b97fbb27f99a8 (diff)
downloadplus-3c404128c4669a1f4f190e20a89553677717fc50.tar.gz
plus-3c404128c4669a1f4f190e20a89553677717fc50.tar.bz2
plus-3c404128c4669a1f4f190e20a89553677717fc50.tar.xz
plus-3c404128c4669a1f4f190e20a89553677717fc50.zip
Add missing comments into defines.
Diffstat (limited to 'src/net/download.cpp')
-rw-r--r--src/net/download.cpp28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/net/download.cpp b/src/net/download.cpp
index b92385076..3844cc01f 100644
--- a/src/net/download.cpp
+++ b/src/net/download.cpp
@@ -38,7 +38,7 @@
#if defined __native_client__
#include "utils/files.h"
-#endif
+#endif // defined __native_client__
#include <sstream>
@@ -530,7 +530,8 @@ void Download::addProxy(CURL *const curl)
case 3: // HTTP 1.0
#if CURLVERSION_ATLEAST(7, 19, 4)
curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP_1_0);
-#endif
+#endif // CURLVERSION_ATLEAST(7, 19, 4)
+
break;
case 4: // SOCKS4
curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
@@ -538,20 +539,24 @@ void Download::addProxy(CURL *const curl)
case 5: // SOCKS4A
#if CURLVERSION_ATLEAST(7, 18, 0)
curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4A);
-#else
+#else // CURLVERSION_ATLEAST(7, 18, 0)
+
curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
-#endif
+#endif // CURLVERSION_ATLEAST(7, 18, 0)
+
break;
case 6: // SOCKS5
#if CURLVERSION_ATLEAST(7, 18, 0)
curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
-#endif
+#endif // CURLVERSION_ATLEAST(7, 18, 0)
+
break;
case 7: // SOCKS5 hostname
#if CURLVERSION_ATLEAST(7, 18, 0)
curl_easy_setopt(curl, CURLOPT_PROXYTYPE,
CURLPROXY_SOCKS5_HOSTNAME);
-#endif
+#endif // CURLVERSION_ATLEAST(7, 18, 0)
+
break;
}
}
@@ -563,13 +568,13 @@ void Download::secureCurl(CURL *const curl)
CURLPROTO_HTTP | CURLPROTO_HTTPS);
curl_easy_setopt(curl, CURLOPT_REDIR_PROTOCOLS,
CURLPROTO_HTTP | CURLPROTO_HTTPS);
-#endif
+#endif // CURLVERSION_ATLEAST(7, 19, 4)
#if CURLVERSION_ATLEAST(7, 21, 0)
curl_easy_setopt(curl, CURLOPT_WILDCARDMATCH, 0);
-#endif
+#endif // CURLVERSION_ATLEAST(7, 21, 0)
#if CURLVERSION_ATLEAST(7, 15, 1)
curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 3);
-#endif
+#endif // CURLVERSION_ATLEAST(7, 15, 1)
}
#if CURLVERSION_ATLEAST(7, 21, 7)
@@ -577,11 +582,12 @@ void Download::addHeaders(CURL *const curl)
{
curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, "");
}
-#else
+#else // CURLVERSION_ATLEAST(7, 21, 7)
+
void Download::addHeaders(CURL *const curl A_UNUSED)
{
}
-#endif
+#endif // CURLVERSION_ATLEAST(7, 21, 7)
void Download::prepareForm(curl_httppost **form, const std::string &fileName)
{