Merge with siana/future

This commit is contained in:
Shyotl
2011-10-13 00:03:56 -05:00
parent 4963a064f1
commit 008bebd817
169 changed files with 15033 additions and 2475 deletions

View File

@@ -1380,6 +1380,12 @@ bool LLTextureFetchWorker::doWork(S32 param)
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
return false ;
}
else
{
// UDP is not an option, we are dead
resetFormattedData();
return true; // failed
}
}
else if (mGetStatus == HTTP_SERVICE_UNAVAILABLE)
{
@@ -1402,7 +1408,9 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (mHTTPFailCount >= max_attempts)
{
if (cur_size > 0)
// Make max_attempts attempt at decoding what data we have,
// then bail forever on this image
if (cur_size > 0 && (mHTTPFailCount < (max_attempts+1)) )
{
// Use available data
mLoadedDiscard = mFormattedImage->getDiscardLevel();
@@ -1411,9 +1419,21 @@ bool LLTextureFetchWorker::doWork(S32 param)
}
else
{
resetFormattedData();
mState = DONE;
return true; // failed
//roll back to try UDP
if(mCanUseNET)
{
mState = INIT ;
mCanUseHTTP = false ;
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
return false ;
}
else
{
// UDP is not an option, we are dead
resetFormattedData();
mState = DONE;
return true; // failed
}
}
}
else