From 38d12454b088495f1985219258d246acca05bc2c Mon Sep 17 00:00:00 2001 From: James Turner Date: Mon, 30 May 2016 13:02:01 +0100 Subject: [PATCH] More libCurl version guards. --- simgear/io/HTTPClient.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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) -- 2.39.5