Debug code bug fix; removal of CurlEasyHandle::getErrorString()

CurlEasyHandle::mErrorBuffer (CURLOPT_ERRORBUFFER) can NOT be
used to retrieve information about an error returned by
curl_multi_info_read in CURLMsg::data::result. This buffer is
only initialized when a curl_easy_* call returns an error,
and those errors are already printed automagically.

Initialize the buffer with an empty string upon invokation
of an curl_easy_* call, so we are sure the error belongs to
the last call.
This commit is contained in:
Aleric Inglewood
2012-09-21 01:28:26 +02:00
parent f3780998ed
commit 81bc6b49f8
4 changed files with 11 additions and 21 deletions

View File

@@ -340,8 +340,8 @@ void LLXMLRPCTransaction::Impl::curlEasyRequestCallback(bool success)
if (result != CURLE_OK)
{
setCurlStatus(result);
llwarns << "LLXMLRPCTransaction CURL error "
<< mCurlCode << ": " << curlEasyRequest_w->getErrorString() << llendl;
llwarns << "LLXMLRPCTransaction CURL error: "
<< AICurlInterface::strerror(mCurlCode) << llendl;
llwarns << "LLXMLRPCTransaction request URI: "
<< mURI << llendl;