WIP: Make curl thread code robust and flexible.
Conflicts: indra/llmessage/llcurl.cpp indra/llmessage/llcurl.h indra/newview/app_settings/settings.xml indra/newview/llappviewer.cpp indra/newview/llmeshrepository.cpp Resolved: indra/llmessage/llcurl.cpp: Basically removed (not used anyway) indra/llmessage/llcurl.h: Basically removed (just includes aiculr.h now) indra/newview/app_settings/settings.xml: CurlUseMultipleThreads was remvoved. CurlMaximumNumberOfHandles and CurlRequestTimeOut are still in there, but unused at the moment. indra/newview/llappviewer.cpp: CurlMaximumNumberOfHandles and CurlRequestTimeOut are unused at the moment. indra/newview/llmeshrepository.cpp: Lock mSignal always (is unlocked inside wait()). Use mSignal lock to see if we are waiting; remove mWaiting. Return false from the MeshFetch functions iff we have to retry a HTTP fetch. Catch the error exception thrown by getByteRange instead of using it's return value (always returns true anyway).
This commit is contained in:
@@ -1319,8 +1319,15 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
// Will call callbackHttpGet when curl request completes
|
||||
std::vector<std::string> headers;
|
||||
headers.push_back("Accept: image/x-j2c");
|
||||
res = mFetcher->mCurlGetRequest->getByteRange(mUrl, headers, offset, mRequestedSize,
|
||||
new HTTPGetResponder(mFetcher, mID, LLTimer::getTotalTime(), mRequestedSize, offset, true));
|
||||
try
|
||||
{
|
||||
res = mFetcher->mCurlGetRequest->getByteRange(mUrl, headers, offset, mRequestedSize,
|
||||
new HTTPGetResponder(mFetcher, mID, LLTimer::getTotalTime(), mRequestedSize, offset, true));
|
||||
}
|
||||
catch(AICurlNoEasyHandle const& error)
|
||||
{
|
||||
llwarns << error.what() << llendl;
|
||||
}
|
||||
}
|
||||
if (!res)
|
||||
{
|
||||
@@ -2435,7 +2442,7 @@ void LLTextureFetch::shutDownImageDecodeThread()
|
||||
void LLTextureFetch::startThread()
|
||||
{
|
||||
// Construct mCurlGetRequest from Worker Thread
|
||||
mCurlGetRequest = new LLCurlRequest();
|
||||
mCurlGetRequest = new AICurlInterface::Request;
|
||||
}
|
||||
|
||||
// WORKER THREAD
|
||||
|
||||
Reference in New Issue
Block a user