From: James Turner Date: Mon, 30 May 2016 12:02:01 +0000 (+0100) Subject: More libCurl version guards. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=38d12454b088495f1985219258d246acca05bc2c;p=simgear.git More libCurl version guards. --- diff --git a/simgear/io/HTTPClient.cxx b/simgear/io/HTTPClient.cxx index 4fcb4d7b..e881d243 100644 --- a/simgear/io/HTTPClient.cxx +++ b/simgear/io/HTTPClient.cxx @@ -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 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)