]> git.mxchange.org Git - simgear.git/commitdiff
More libCurl version guards.
authorJames Turner <zakalawe@mac.com>
Mon, 30 May 2016 12:02:01 +0000 (13:02 +0100)
committerRoland Haeder <roland@mxchange.org>
Sat, 13 Aug 2016 08:21:16 +0000 (10:21 +0200)
simgear/io/HTTPClient.cxx

index 4fcb4d7b9df5de21854f6c367cde0faa2e8f2c46..e881d243a55e572f98b151938297dd4ec0c588b8 100644 (file)
@@ -82,13 +82,11 @@ public:
         curl_multi_setopt(curlMulti, CURLMOPT_PIPELINING, 1 /* aka CURLPIPE_HTTP1 */);
 #if (LIBCURL_VERSION_MINOR >= 30)
         curl_multi_setopt(curlMulti, CURLMOPT_MAX_TOTAL_CONNECTIONS, (long) maxConnections);
-#endif
         curl_multi_setopt(curlMulti, CURLMOPT_MAX_PIPELINE_LENGTH,
                           (long) maxPipelineDepth);
         curl_multi_setopt(curlMulti, CURLMOPT_MAX_HOST_CONNECTIONS,
                           (long) maxHostConnections);
-
-
+#endif
     }
 
     typedef std::map<Request_ptr, CURL*> RequestCurlMap;
@@ -148,13 +146,17 @@ void Client::setMaxConnections(unsigned int maxCon)
 void Client::setMaxHostConnections(unsigned int maxHostCon)
 {
     d->maxHostConnections = maxHostCon;
+#if (LIBCURL_VERSION_MINOR >= 30)
     curl_multi_setopt(d->curlMulti, CURLMOPT_MAX_HOST_CONNECTIONS, (long) maxHostCon);
+#endif
 }
 
 void Client::setMaxPipelineDepth(unsigned int depth)
 {
     d->maxPipelineDepth = depth;
+#if (LIBCURL_VERSION_MINOR >= 30)
     curl_multi_setopt(d->curlMulti, CURLMOPT_MAX_PIPELINE_LENGTH, (long) depth);
+#endif
 }
 
 void Client::update(int waitTimeout)