From 2dee921cd544d6c8efa1655ceb8081c850b8bf97 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Fri, 29 Jun 2012 01:33:38 +0200 Subject: [PATCH] Fix libcurl version check. --- indra/llmessage/aicurl.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/indra/llmessage/aicurl.cpp b/indra/llmessage/aicurl.cpp index 3ab86f56f..6dc43cc2c 100644 --- a/indra/llmessage/aicurl.cpp +++ b/indra/llmessage/aicurl.cpp @@ -204,6 +204,10 @@ void ssl_cleanup(void) } // namespace openSSL //----------------------------------------------------------------------------------- +static unsigned int encoded_version(int major, int minor, int patch) +{ + return (major << 16) | (minor << 8) | patch; +} //================================================================================== // External API @@ -283,7 +287,8 @@ void initCurl(F32 curl_request_timeout, S32 max_number_handles) } } - gSetoptParamsNeedDup = (version_info->version_num < 0x071700); + // Before version 7.17.0, strings were not copied. Instead the user was forced keep them available until libcurl no longer needed them. + gSetoptParamsNeedDup = (version_info->version_num < encoded_version(7, 17, 0)); if (gSetoptParamsNeedDup) { llwarns << "Your libcurl version is too old." << llendl;