From a2b25828aa3f5deb5d0e7c15ac167abb32a5e81e Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Thu, 4 Nov 2010 17:50:10 -0400 Subject: BUILDFIX curl error causes linux build to crash on login. Switching curl errors from llerrs to llinfos allows the client to continue on its merry way. Will file a jira to follow up later on why the error happens in the first place. --- indra/llmessage/llcurl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llmessage/llcurl.cpp') diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index 66f1ffd41b..91ef9510a8 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -89,7 +89,7 @@ void check_curl_code(CURLcode code) { if (code != CURLE_OK) { - llerrs << "curl error detected: " << curl_easy_strerror(code) << llendl; + llinfos << "curl error detected: " << curl_easy_strerror(code) << llendl; } } @@ -97,7 +97,7 @@ void check_curl_multi_code(CURLMcode code) { if (code != CURLM_OK) { - llerrs << "curl multi error detected: " << curl_multi_strerror(code) << llendl; + llinfos << "curl multi error detected: " << curl_multi_strerror(code) << llendl; } } -- cgit v1.2.3 From 1f9ae081ec9df4c297b7f8a39f91c8f86027543f Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Fri, 5 Nov 2010 14:26:25 -0400 Subject: BUILDFIX making curl asserts llinfos for non-windows platforms linux curl appears to throw an initialization error once per session after login. Can't hunt it down right now, so making curl asserts llinfos for non-windows platforms. Also added a new assert on curl initialization. --- indra/llmessage/llcurl.cpp | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'indra/llmessage/llcurl.cpp') diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index 91ef9510a8..6473b23e80 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -89,15 +89,29 @@ void check_curl_code(CURLcode code) { if (code != CURLE_OK) { - llinfos << "curl error detected: " << curl_easy_strerror(code) << llendl; + // linux appears to throw a curl error once per session for a bad initialization + // at a pretty random time (when enabling cookies). Making curl errors non-asserts + // for non-windows platforms for now. - Nyx + #if LL_WINDOWS + llerrs << "curl error detected: " << curl_easy_strerror(code) << llendl; + #else + llinfos << "curl error detected: " << curl_easy_strerror(code) << llendl; + #endif } } -void check_curl_multi_code(CURLMcode code) +void check_curl_multi_code(CURLMcode code) { if (code != CURLM_OK) { - llinfos << "curl multi error detected: " << curl_multi_strerror(code) << llendl; + // linux appears to throw a curl error once per session for a bad initialization + // at a pretty random time (when enabling cookies). Making curl errors non-asserts + // for non-windows platforms for now. - Nyx + #if LL_WINDOWS + llerrs << "curl multi error detected: " << curl_multi_strerror(code) << llendl; + #else + llinfos << "curl multi error detected: " << curl_multi_strerror(code) << llendl; + #endif } } @@ -1160,7 +1174,9 @@ void LLCurl::initClass() // Do not change this "unless you are familiar with and mean to control // internal operations of libcurl" // - http://curl.haxx.se/libcurl/c/curl_global_init.html - curl_global_init(CURL_GLOBAL_ALL); + CURLcode code = curl_global_init(CURL_GLOBAL_ALL); + + check_curl_code(code); Easy::sHandleMutex = new LLMutex(NULL); -- cgit v1.2.3