No longer include llerrorlegacy.h. Updated llstl to include deletion utilites.
This commit is contained in:
@@ -381,7 +381,7 @@ public:
|
||||
mReplyOffset = first;
|
||||
mReplyLength = last - first + 1;
|
||||
mReplyFullLength = len;
|
||||
LL_DEBUGS("Texture") << " mReplyOffset=" << mReplyOffset << " mReplyLength=" << mReplyLength << " mReplyFullLength=" << mReplyFullLength << llendl;
|
||||
LL_DEBUGS("Texture") << " mReplyOffset=" << mReplyOffset << " mReplyLength=" << mReplyLength << " mReplyFullLength=" << mReplyFullLength << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -423,7 +423,7 @@ public:
|
||||
if (!success)
|
||||
{
|
||||
worker->setGetStatus(mStatus, mReason);
|
||||
llwarns << "CURL GET FAILED, status:" << mStatus << " reason:" << mReason << llendl;
|
||||
LL_WARNS() << "CURL GET FAILED, status:" << mStatus << " reason:" << mReason << LL_ENDL;
|
||||
}
|
||||
S32 data_size = worker->callbackHttpGet(mReplyOffset, mReplyLength, channels, buffer, partial, success);
|
||||
|
||||
@@ -443,7 +443,7 @@ public:
|
||||
else
|
||||
{
|
||||
mFetcher->removeFromHTTPQueue(mID);
|
||||
llwarns << "Worker not found: " << mID << llendl;
|
||||
LL_WARNS() << "Worker not found: " << mID << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -504,7 +504,7 @@ public:
|
||||
}
|
||||
|
||||
static void add(std::string url, float timeout, U32 reason) {
|
||||
llwarns << "Requested adding to blacklist: " << url << llendl;
|
||||
LL_WARNS() << "Requested adding to blacklist: " << url << LL_ENDL;
|
||||
BlackListEntry entry;
|
||||
entry.host = url.substr(0, url.rfind("/"));
|
||||
if (entry.host.empty()) return;
|
||||
@@ -518,10 +518,10 @@ public:
|
||||
if (entry.errorCount > MAX_ERRORCOUNT) {
|
||||
std::string s;
|
||||
microsecondsToTimecodeString(entry.timeUntil, s);
|
||||
llwarns << "Blacklisting address " << entry.host
|
||||
LL_WARNS() << "Blacklisting address " << entry.host
|
||||
<< "is blacklisted for " << timeout
|
||||
<< " seconds because of error " << reason
|
||||
<< llendl;
|
||||
<< LL_ENDL;
|
||||
}
|
||||
}
|
||||
else blacklist.push_back(entry);
|
||||
@@ -847,7 +847,7 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher,
|
||||
|
||||
calcWorkPriority();
|
||||
mType = host.isOk() ? LLImageBase::TYPE_AVATAR_BAKE : LLImageBase::TYPE_NORMAL;
|
||||
//llinfos << "Create: " << mID << " mHost:" << host << " Discard=" << discard << " URL:"<< mUrl << llendl;
|
||||
//LL_INFOS() << "Create: " << mID << " mHost:" << host << " Discard=" << discard << " URL:"<< mUrl << LL_ENDL;
|
||||
if (!mFetcher->mDebugPause)
|
||||
{
|
||||
U32 work_priority = mWorkPriority | LLWorkerThread::PRIORITY_HIGH;
|
||||
@@ -858,10 +858,10 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher,
|
||||
|
||||
LLTextureFetchWorker::~LLTextureFetchWorker()
|
||||
{
|
||||
// llinfos << "Destroy: " << mID
|
||||
// LL_INFOS() << "Destroy: " << mID
|
||||
// << " Decoded=" << mDecodedDiscard
|
||||
// << " Requested=" << mRequestedDiscard
|
||||
// << " Desired=" << mDesiredDiscard << llendl;
|
||||
// << " Desired=" << mDesiredDiscard << LL_ENDL;
|
||||
llassert_always(!haveWork());
|
||||
lockWorkMutex();
|
||||
if (mCacheReadHandle != LLTextureCache::nullHandle() && mFetcher->mTextureCache)
|
||||
@@ -901,7 +901,7 @@ void LLTextureFetchWorker::setupPacketData()
|
||||
mFirstPacket = (data_size - FIRST_PACKET_SIZE) / MAX_IMG_PACKET_SIZE + 1;
|
||||
if (FIRST_PACKET_SIZE + (mFirstPacket-1) * MAX_IMG_PACKET_SIZE != data_size)
|
||||
{
|
||||
llwarns << "Bad CACHED TEXTURE size: " << data_size << " removing." << llendl;
|
||||
LL_WARNS() << "Bad CACHED TEXTURE size: " << data_size << " removing." << LL_ENDL;
|
||||
removeFromCache();
|
||||
resetFormattedData();
|
||||
clearPackets();
|
||||
@@ -1013,14 +1013,14 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
{
|
||||
if (mState == INIT || mState == LOAD_FROM_NETWORK/* || mState == LOAD_FROM_SIMULATOR*/) //If we've already sent out requests.. might as well continue.
|
||||
{
|
||||
LL_WARNS("Texture") << mID << " abort: mImagePriority < F_ALMOST_ZERO" << llendl;
|
||||
LL_WARNS("Texture") << mID << " abort: mImagePriority < F_ALMOST_ZERO" << LL_ENDL;
|
||||
return true; // abort
|
||||
}
|
||||
}
|
||||
if(mState > CACHE_POST && !mCanUseNET && !mCanUseHTTP)
|
||||
{
|
||||
//nowhere to get data, abort.
|
||||
LL_WARNS("Texture") << mID << " abort, nowhere to get data" << llendl;
|
||||
LL_WARNS("Texture") << mID << " abort, nowhere to get data" << LL_ENDL;
|
||||
return true ;
|
||||
}
|
||||
|
||||
@@ -1043,7 +1043,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
if(gAssetStorage && std::find(gAssetStorage->mBlackListedAsset.begin(),
|
||||
gAssetStorage->mBlackListedAsset.end(),mID) != gAssetStorage->mBlackListedAsset.end())
|
||||
{
|
||||
llinfos << "Blacklisted asset " << mID.asString() << " was trying to be accessed!!!!!!" << llendl;
|
||||
LL_INFOS() << "Blacklisted asset " << mID.asString() << " was trying to be accessed!!!!!!" << LL_ENDL;
|
||||
setState(DONE);
|
||||
return true;
|
||||
}
|
||||
@@ -1116,7 +1116,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
if (!(mUrl.compare(0, 7, "http://") == 0))
|
||||
{
|
||||
// *TODO:?remove this warning
|
||||
llwarns << "Unknown URL Type: " << mUrl << llendl;
|
||||
LL_WARNS() << "Unknown URL Type: " << mUrl << LL_ENDL;
|
||||
}
|
||||
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
|
||||
setState(SEND_HTTP_REQ);
|
||||
@@ -1142,7 +1142,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
//
|
||||
//This should never happen
|
||||
//
|
||||
LL_WARNS("Texture") << mID << " this should never happen" << llendl;
|
||||
LL_WARNS("Texture") << mID << " this should never happen" << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1164,7 +1164,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
if (mLoadedDiscard < 0)
|
||||
{
|
||||
LL_WARNS("Texture") << mID << " mLoadedDiscard is " << mLoadedDiscard
|
||||
<< ", should be >=0" << llendl;
|
||||
<< ", should be >=0" << LL_ENDL;
|
||||
}
|
||||
setState(DECODE_IMAGE);
|
||||
mWriteToCacheState = NOT_WRITE ;
|
||||
@@ -1223,7 +1223,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
else
|
||||
{
|
||||
// This will happen if not logged in or if a region does not have HTTP Texture enabled
|
||||
//llwarns << "Region not found for host: " << mHost << llendl;
|
||||
//LL_WARNS() << "Region not found for host: " << mHost << LL_ENDL;
|
||||
mCanUseHTTP = false;
|
||||
}
|
||||
}
|
||||
@@ -1242,7 +1242,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
}
|
||||
else if (mSentRequest == UNSENT && mCanUseNET)
|
||||
{
|
||||
LL_DEBUGS("Texture") << mID << " moving to UDP fetch. mSentRequest=" << mSentRequest << " mCanUseNET = " << mCanUseNET << llendl;
|
||||
LL_DEBUGS("Texture") << mID << " moving to UDP fetch. mSentRequest=" << mSentRequest << " mCanUseNET = " << mCanUseNET << LL_ENDL;
|
||||
setState(SEND_UDP_REQ);
|
||||
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
|
||||
if(mWriteToCacheState != NOT_WRITE)
|
||||
@@ -1259,7 +1259,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
//recordTextureStart(false);
|
||||
//setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority);
|
||||
|
||||
LL_WARNS("Texture") << mID << " does this happen? mSentRequest=" << mSentRequest << " mCanUseNET = " << mCanUseNET << llendl;
|
||||
LL_WARNS("Texture") << mID << " does this happen? mSentRequest=" << mSentRequest << " mCanUseNET = " << mCanUseNET << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1277,15 +1277,15 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
if (mFormattedImage.isNull() || !mFormattedImage->getDataSize())
|
||||
{
|
||||
// processSimulatorPackets() failed
|
||||
// llwarns << "processSimulatorPackets() failed to load buffer" << llendl;
|
||||
LL_WARNS("Texture") << mID << " processSimulatorPackets() failed to load buffer" << llendl;
|
||||
// LL_WARNS() << "processSimulatorPackets() failed to load buffer" << LL_ENDL;
|
||||
LL_WARNS("Texture") << mID << " processSimulatorPackets() failed to load buffer" << LL_ENDL;
|
||||
return true; // failed
|
||||
}
|
||||
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
|
||||
if (mLoadedDiscard < 0)
|
||||
{
|
||||
LL_WARNS("Texture") << mID << " mLoadedDiscard is " << mLoadedDiscard
|
||||
<< ", should be >=0" << llendl;
|
||||
<< ", should be >=0" << LL_ENDL;
|
||||
}
|
||||
setState(DECODE_IMAGE);
|
||||
llassert_always(strstr(mUrl.c_str(), "map.secondlife") == NULL);
|
||||
@@ -1306,11 +1306,11 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
{
|
||||
if (! mCanUseNET)
|
||||
{
|
||||
LL_WARNS("Texture") << mID << " abort: SEND_UDP_REQ but !mCanUseNet" << llendl;
|
||||
LL_WARNS("Texture") << mID << " abort: SEND_UDP_REQ but !mCanUseNet" << LL_ENDL;
|
||||
return true ; //abort
|
||||
}
|
||||
|
||||
LL_DEBUGS("Texture") << mID << " sending to UDP fetch. mSentRequest=" << mSentRequest << " mCanUseNET = " << mCanUseNET << llendl;
|
||||
LL_DEBUGS("Texture") << mID << " sending to UDP fetch. mSentRequest=" << mSentRequest << " mCanUseNET = " << mCanUseNET << LL_ENDL;
|
||||
|
||||
mRequestedSize = mDesiredSize;
|
||||
mRequestedDiscard = mDesiredDiscard;
|
||||
@@ -1326,7 +1326,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
//do nothing.
|
||||
if (! mCanUseNET)
|
||||
{
|
||||
LL_WARNS("Texture") << mID << " abort: SEND_UDP_REQ but !mCanUseNet" << llendl;
|
||||
LL_WARNS("Texture") << mID << " abort: SEND_UDP_REQ but !mCanUseNet" << LL_ENDL;
|
||||
return true ; //abort
|
||||
}
|
||||
llassert(mFetcher->mNetworkQueue.find(mID) != mFetcher->mNetworkQueue.end());
|
||||
@@ -1337,7 +1337,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
{
|
||||
if (! mCanUseHTTP)
|
||||
{
|
||||
LL_WARNS("Texture") << mID << " abort: SEND_HTTP_REQ but !mCanUseHTTP" << llendl;
|
||||
LL_WARNS("Texture") << mID << " abort: SEND_HTTP_REQ but !mCanUseHTTP" << LL_ENDL;
|
||||
return true ; //abort
|
||||
}
|
||||
S32 cur_size = 0;
|
||||
@@ -1356,14 +1356,14 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
if (mLoadedDiscard < 0)
|
||||
{
|
||||
LL_WARNS("Texture") << mID << " mLoadedDiscard is " << mLoadedDiscard
|
||||
<< ", should be >=0" << llendl;
|
||||
<< ", should be >=0" << LL_ENDL;
|
||||
}
|
||||
setState(DECODE_IMAGE);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("Texture") << mID << " SEND_HTTP_REQ abort: cur_size " << cur_size << " <=0" << llendl;
|
||||
LL_WARNS("Texture") << mID << " SEND_HTTP_REQ abort: cur_size " << cur_size << " <=0" << LL_ENDL;
|
||||
return true ; //abort.
|
||||
}
|
||||
}
|
||||
@@ -1425,7 +1425,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "HTTP GET request failed for " << mID << llendl;
|
||||
LL_WARNS() << "HTTP GET request failed for " << mID << LL_ENDL;
|
||||
resetFormattedData();
|
||||
++mHTTPFailCount;
|
||||
return true; // failed
|
||||
@@ -1449,7 +1449,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
S32 max_attempts;
|
||||
switch(mGetStatus)
|
||||
{
|
||||
#define HTTP_CASE(name) case name: LL_DEBUGS("TexDebug") << mID << " status = " << mGetStatus << " (" << #name << ")" << " Failcount = " << mHTTPFailCount << llendl; break;
|
||||
#define HTTP_CASE(name) case name: LL_DEBUGS("TexDebug") << mID << " status = " << mGetStatus << " (" << #name << ")" << " Failcount = " << mHTTPFailCount << LL_ENDL; break;
|
||||
HTTP_CASE(HTTP_CONTINUE)
|
||||
HTTP_CASE(HTTP_SWITCHING_PROTOCOLS)
|
||||
HTTP_CASE(HTTP_OK)
|
||||
@@ -1497,7 +1497,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
HTTP_CASE(HTTP_INTERNAL_ERROR_CURL_OTHER)
|
||||
HTTP_CASE(HTTP_INTERNAL_ERROR_OTHER)
|
||||
default:
|
||||
LL_DEBUGS("TexDebug") << mID << " status = " << mGetStatus << " (?)" << " Failcount = " << mHTTPFailCount << llendl; break;
|
||||
LL_DEBUGS("TexDebug") << mID << " status = " << mGetStatus << " (?)" << " Failcount = " << mHTTPFailCount << LL_ENDL; break;
|
||||
}
|
||||
|
||||
if (mGetStatus == HTTP_NOT_FOUND || mGetStatus == HTTP_INTERNAL_ERROR_CURL_TIMEOUT || mGetStatus == HTTP_INTERNAL_ERROR_LOW_SPEED)
|
||||
@@ -1509,38 +1509,38 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
{
|
||||
resetFormattedData();
|
||||
setState(DONE);
|
||||
//LL_INFOS("Texture") << mID << " abort: WAIT_HTTP_REQ not found" << llendl;
|
||||
//LL_INFOS("Texture") << mID << " abort: WAIT_HTTP_REQ not found" << LL_ENDL;
|
||||
return true; // failed, means no map tile on the empty region.
|
||||
}
|
||||
llwarns << "Texture missing from server (404): " << mUrl << llendl;
|
||||
LL_WARNS() << "Texture missing from server (404): " << mUrl << LL_ENDL;
|
||||
}
|
||||
else if (mGetStatus == HTTP_INTERNAL_ERROR_CURL_TIMEOUT || mGetStatus == HTTP_INTERNAL_ERROR_LOW_SPEED)
|
||||
{
|
||||
if (mGetStatus == HTTP_INTERNAL_ERROR_CURL_TIMEOUT)
|
||||
{
|
||||
llwarns << "No response from server (HTTP_INTERNAL_ERROR_CURL_TIMEOUT): " << mUrl << llendl;
|
||||
LL_WARNS() << "No response from server (HTTP_INTERNAL_ERROR_CURL_TIMEOUT): " << mUrl << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "Slow response from server (HTTP_INTERNAL_ERROR_LOW_SPEED): " << mUrl << llendl;
|
||||
LL_WARNS() << "Slow response from server (HTTP_INTERNAL_ERROR_LOW_SPEED): " << mUrl << LL_ENDL;
|
||||
}
|
||||
SGHostBlackList::add(mUrl, 60.0, mGetStatus);
|
||||
}
|
||||
//roll back to try UDP
|
||||
if(mCanUseNET)
|
||||
{
|
||||
LL_DEBUGS("TexDebug") << mID << " falling back to udp mSentRequest=" << mSentRequest << " mCanUseNET = " << mCanUseNET << llendl;
|
||||
LL_DEBUGS("TexDebug") << mID << " falling back to udp mSentRequest=" << mSentRequest << " mCanUseNET = " << mCanUseNET << LL_ENDL;
|
||||
resetFormattedData();
|
||||
setState(INIT);
|
||||
mCanUseHTTP = false ;
|
||||
mUrl.clear();
|
||||
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
|
||||
LL_DEBUGS("TexDebug") << mID << " .. mSentRequest=" << mSentRequest << " mCanUseNET = " << mCanUseNET << llendl;
|
||||
LL_DEBUGS("TexDebug") << mID << " .. mSentRequest=" << mSentRequest << " mCanUseNET = " << mCanUseNET << LL_ENDL;
|
||||
return false ;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_INFOS("Texture") << mID << " aborted. no udp fallback" << llendl;
|
||||
LL_INFOS("Texture") << mID << " aborted. no udp fallback" << LL_ENDL;
|
||||
// UDP is not an option, we are dead
|
||||
resetFormattedData();
|
||||
return true; // failed
|
||||
@@ -1566,9 +1566,9 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
const S32 HTTP_MAX_RETRY_COUNT = 3;
|
||||
max_attempts = HTTP_MAX_RETRY_COUNT + 1;
|
||||
++mHTTPFailCount;
|
||||
llinfos << "HTTP GET failed for: " << mUrl
|
||||
LL_INFOS() << "HTTP GET failed for: " << mUrl
|
||||
<< " Status: " << mGetStatus << " Reason: '" << mGetReason << "'"
|
||||
<< " Attempt:" << mHTTPFailCount+1 << "/" << max_attempts << llendl;
|
||||
<< " Attempt:" << mHTTPFailCount+1 << "/" << max_attempts << LL_ENDL;
|
||||
}
|
||||
|
||||
if (mHTTPFailCount >= max_attempts)
|
||||
@@ -1583,7 +1583,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
if (mLoadedDiscard < 0)
|
||||
{
|
||||
LL_WARNS("Texture") << mID << " mLoadedDiscard is " << mLoadedDiscard
|
||||
<< ", should be >=0" << llendl;
|
||||
<< ", should be >=0" << LL_ENDL;
|
||||
}
|
||||
setState(DECODE_IMAGE);
|
||||
return false;
|
||||
@@ -1605,7 +1605,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
// UDP is not an option, we are dead
|
||||
resetFormattedData();
|
||||
setState(DONE);
|
||||
LL_INFOS("Texture") << mID << " abort: fail harder" << llendl;
|
||||
LL_INFOS("Texture") << mID << " abort: fail harder" << LL_ENDL;
|
||||
return true; // failed
|
||||
}
|
||||
}
|
||||
@@ -1630,7 +1630,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
{
|
||||
//abort.
|
||||
setState(DONE);
|
||||
LL_WARNS("Texture") << mID << " abort: no data received" << llendl;
|
||||
LL_WARNS("Texture") << mID << " abort: no data received" << LL_ENDL;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1698,7 +1698,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
if (mLoadedDiscard < 0)
|
||||
{
|
||||
LL_WARNS("Texture") << mID << " mLoadedDiscard is " << mLoadedDiscard
|
||||
<< ", should be >=0" << llendl;
|
||||
<< ", should be >=0" << LL_ENDL;
|
||||
}
|
||||
setState(DECODE_IMAGE);
|
||||
if(mWriteToCacheState != NOT_WRITE)
|
||||
@@ -1731,26 +1731,26 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
{
|
||||
// We aborted, don't decode
|
||||
setState(DONE);
|
||||
LL_WARNS("Texture") << mID << " DECODE_IMAGE abort: desired discard " << mDesiredDiscard << "<0" << llendl;
|
||||
LL_WARNS("Texture") << mID << " DECODE_IMAGE abort: desired discard " << mDesiredDiscard << "<0" << LL_ENDL;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (mFormattedImage->getDataSize() <= 0)
|
||||
{
|
||||
llwarns << "Decode entered with invalid mFormattedImage. ID = " << mID << llendl;
|
||||
LL_WARNS() << "Decode entered with invalid mFormattedImage. ID = " << mID << LL_ENDL;
|
||||
|
||||
//abort, don't decode
|
||||
setState(DONE);
|
||||
LL_WARNS("Texture") << mID << " DECODE_IMAGE abort: (mFormattedImage->getDataSize() <= 0)" << llendl;
|
||||
LL_WARNS("Texture") << mID << " DECODE_IMAGE abort: (mFormattedImage->getDataSize() <= 0)" << LL_ENDL;
|
||||
return true;
|
||||
}
|
||||
if (mLoadedDiscard < 0)
|
||||
{
|
||||
llwarns << "Decode entered with invalid mLoadedDiscard. ID = " << mID << llendl;
|
||||
LL_WARNS() << "Decode entered with invalid mLoadedDiscard. ID = " << mID << LL_ENDL;
|
||||
|
||||
//abort, don't decode
|
||||
setState(DONE);
|
||||
LL_WARNS("Texture") << mID << " DECODE_IMAGE abort: mLoadedDiscard < 0" << llendl;
|
||||
LL_WARNS("Texture") << mID << " DECODE_IMAGE abort: mLoadedDiscard < 0" << LL_ENDL;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1778,7 +1778,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
if (mCachedSize > 0 && !mInLocalCache && mRetryAttempt == 0)
|
||||
{
|
||||
// Cache file should be deleted, try again
|
||||
// llwarns << mID << ": Decode of cached file failed (removed), retrying" << llendl;
|
||||
// LL_WARNS() << mID << ": Decode of cached file failed (removed), retrying" << LL_ENDL;
|
||||
llassert_always(mDecodeHandle == 0);
|
||||
mFormattedImage = NULL;
|
||||
++mRetryAttempt;
|
||||
@@ -1788,7 +1788,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
}
|
||||
else
|
||||
{
|
||||
// llwarns << "UNABLE TO LOAD TEXTURE: " << mID << " RETRIES: " << mRetryAttempt << llendl;
|
||||
// LL_WARNS() << "UNABLE TO LOAD TEXTURE: " << mID << " RETRIES: " << mRetryAttempt << LL_ENDL;
|
||||
setState(DONE); // failed
|
||||
}
|
||||
}
|
||||
@@ -1870,7 +1870,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
setState(INIT);
|
||||
LL_WARNS("Texture") << mID << " more data requested, returning to INIT: "
|
||||
<< " mDecodedDiscard " << mDecodedDiscard << ">= 0 && mDesiredDiscard " << mDesiredDiscard
|
||||
<< "<" << " mDecodedDiscard " << mDecodedDiscard << llendl;
|
||||
<< "<" << " mDecodedDiscard " << mDecodedDiscard << LL_ENDL;
|
||||
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
|
||||
return false;
|
||||
}
|
||||
@@ -2031,13 +2031,13 @@ S32 LLTextureFetchWorker::callbackHttpGet(U32 offset, U32 length,
|
||||
|
||||
if (mState != WAIT_HTTP_REQ)
|
||||
{
|
||||
llwarns << "callbackHttpGet for unrequested fetch worker: " << mID
|
||||
<< " req=" << mSentRequest << " state= " << mState << llendl;
|
||||
LL_WARNS() << "callbackHttpGet for unrequested fetch worker: " << mID
|
||||
<< " req=" << mSentRequest << " state= " << mState << LL_ENDL;
|
||||
return data_size;
|
||||
}
|
||||
if (mLoaded)
|
||||
{
|
||||
llwarns << "Duplicate callback for " << mID.asString() << llendl;
|
||||
LL_WARNS() << "Duplicate callback for " << mID.asString() << LL_ENDL;
|
||||
return data_size; // ignore duplicate callback
|
||||
}
|
||||
if (success)
|
||||
@@ -2097,7 +2097,7 @@ S32 LLTextureFetchWorker::callbackHttpGet(U32 offset, U32 length,
|
||||
else if (data_size > mRequestedSize)
|
||||
{
|
||||
// *TODO: This shouldn't be happening any more
|
||||
llwarns << "data_size = " << data_size << " > requested: " << mRequestedSize << llendl;
|
||||
LL_WARNS() << "data_size = " << data_size << " > requested: " << mRequestedSize << LL_ENDL;
|
||||
mHaveAllData = TRUE;
|
||||
llassert_always(mDecodeHandle == 0);
|
||||
mFormattedImage = NULL; // discard any previous data we had
|
||||
@@ -2130,7 +2130,7 @@ void LLTextureFetchWorker::callbackCacheRead(bool success, LLImageFormatted* ima
|
||||
LLMutexLock lock(&mWorkMutex);
|
||||
if (mState != LOAD_FROM_TEXTURE_CACHE)
|
||||
{
|
||||
// llwarns << "Read callback for " << mID << " with state = " << mState << llendl;
|
||||
// LL_WARNS() << "Read callback for " << mID << " with state = " << mState << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
if (success)
|
||||
@@ -2154,7 +2154,7 @@ void LLTextureFetchWorker::callbackCacheWrite(bool success)
|
||||
LLMutexLock lock(&mWorkMutex);
|
||||
if (mState != WAIT_ON_WRITE)
|
||||
{
|
||||
// llwarns << "Write callback for " << mID << " with state = " << mState << llendl;
|
||||
// LL_WARNS() << "Write callback for " << mID << " with state = " << mState << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
mWritten = TRUE;
|
||||
@@ -2172,7 +2172,7 @@ void LLTextureFetchWorker::callbackDecoded(bool success, LLImageRaw* raw, LLImag
|
||||
}
|
||||
if (mState != DECODE_IMAGE_UPDATE)
|
||||
{
|
||||
// llwarns << "Decode callback for " << mID << " with state = " << mState << llendl;
|
||||
// LL_WARNS() << "Decode callback for " << mID << " with state = " << mState << LL_ENDL;
|
||||
mDecodeHandle = 0;
|
||||
return;
|
||||
}
|
||||
@@ -2202,7 +2202,7 @@ void LLTextureFetchWorker::callbackDecoded(bool success, LLImageRaw* raw, LLImag
|
||||
mDecodedDiscard = -1; // Redundant, here for clarity and paranoia
|
||||
}
|
||||
mDecoded = TRUE;
|
||||
// llinfos << mID << " : DECODE COMPLETE " << llendl;
|
||||
// LL_INFOS() << mID << " : DECODE COMPLETE " << LL_ENDL;
|
||||
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
|
||||
mCacheReadTime = mCacheReadTimer.getElapsedTimeF32();
|
||||
}
|
||||
@@ -2307,8 +2307,8 @@ bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, con
|
||||
{
|
||||
if (worker->mHost != host)
|
||||
{
|
||||
llwarns << "LLTextureFetch::createRequest " << id << " called with multiple hosts: "
|
||||
<< host << " != " << worker->mHost << llendl;
|
||||
LL_WARNS() << "LLTextureFetch::createRequest " << id << " called with multiple hosts: "
|
||||
<< host << " != " << worker->mHost << LL_ENDL;
|
||||
removeRequest(worker, true);
|
||||
worker = NULL;
|
||||
return false;
|
||||
@@ -2319,9 +2319,9 @@ bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, con
|
||||
std::string exten = gDirUtilp->getExtension(url);
|
||||
if (!url.empty() && (!exten.empty() && LLImageBase::getCodecFromExtension(exten) != IMG_CODEC_J2C))
|
||||
{
|
||||
LL_DEBUGS("Texture") << "full request for " << id << " exten is not J2C: " << exten << llendl;
|
||||
LL_DEBUGS("Texture") << "full request for " << id << " exten is not J2C: " << exten << LL_ENDL;
|
||||
// Only do partial requests for J2C at the moment
|
||||
//llinfos << "Merov : LLTextureFetch::createRequest(), blocking fetch on " << url << llendl;
|
||||
//LL_INFOS() << "Merov : LLTextureFetch::createRequest(), blocking fetch on " << url << LL_ENDL;
|
||||
desired_size = MAX_IMAGE_DATA_SIZE;
|
||||
desired_discard = 0;
|
||||
}
|
||||
@@ -2384,7 +2384,7 @@ bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, con
|
||||
worker->unlockWorkMutex();
|
||||
}
|
||||
|
||||
LL_DEBUGS("Texture") << "REQUESTED: " << id << " Discard: " << desired_discard << " size " << desired_size << llendl;
|
||||
LL_DEBUGS("Texture") << "REQUESTED: " << id << " Discard: " << desired_discard << " size " << desired_size << LL_ENDL;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2543,7 +2543,7 @@ bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level,
|
||||
// Should only happen if we set mDebugPause...
|
||||
if (!mDebugPause)
|
||||
{
|
||||
// llwarns << "Adding work for inactive worker: " << id << llendl;
|
||||
// LL_WARNS() << "Adding work for inactive worker: " << id << LL_ENDL;
|
||||
worker->addWork(0, LLWorkerThread::PRIORITY_HIGH | worker->mWorkPriority);
|
||||
}
|
||||
}
|
||||
@@ -2731,7 +2731,7 @@ void LLTextureFetch::threadedUpdate()
|
||||
S32 q = mCurlGetRequest->getQueued();
|
||||
if (q > 0)
|
||||
{
|
||||
llinfos << "Queued gets: " << q << llendl;
|
||||
LL_INFOS() << "Queued gets: " << q << LL_ENDL;
|
||||
info_timer.reset();
|
||||
}
|
||||
}
|
||||
@@ -2783,7 +2783,7 @@ void LLTextureFetch::sendRequestListToSimulators()
|
||||
(req->mState != LLTextureFetchWorker::LOAD_FROM_SIMULATOR))
|
||||
{
|
||||
// We already received our URL, remove from the queue
|
||||
llwarns << "Worker: " << req->mID << " in mNetworkQueue but in wrong state: " << req->mState << llendl;
|
||||
LL_WARNS() << "Worker: " << req->mID << " in mNetworkQueue but in wrong state: " << req->mState << LL_ENDL;
|
||||
mNetworkQueue.erase(curiter);
|
||||
continue;
|
||||
}
|
||||
@@ -2851,8 +2851,8 @@ void LLTextureFetch::sendRequestListToSimulators()
|
||||
gMessageSystem->addF32Fast(_PREHASH_DownloadPriority, req->mImagePriority);
|
||||
gMessageSystem->addU32Fast(_PREHASH_Packet, packet);
|
||||
gMessageSystem->addU8Fast(_PREHASH_Type, req->mType);
|
||||
// llinfos << "IMAGE REQUEST: " << req->mID << " Discard: " << req->mDesiredDiscard
|
||||
// << " Packet: " << packet << " Priority: " << req->mImagePriority << llendl;
|
||||
// LL_INFOS() << "IMAGE REQUEST: " << req->mID << " Discard: " << req->mDesiredDiscard
|
||||
// << " Packet: " << packet << " Priority: " << req->mImagePriority << LL_ENDL;
|
||||
|
||||
static LLCachedControl<bool> log_to_viewer_log(gSavedSettings,"LogTextureDownloadsToViewerLog");
|
||||
static LLCachedControl<bool> log_to_sim(gSavedSettings,"LogTextureDownloadsToSimulator");
|
||||
@@ -2873,7 +2873,7 @@ void LLTextureFetch::sendRequestListToSimulators()
|
||||
sim_request_count++;
|
||||
if (sim_request_count >= IMAGES_PER_REQUEST)
|
||||
{
|
||||
// llinfos << "REQUESTING " << sim_request_count << " IMAGES FROM HOST: " << host.getIPString() << llendl;
|
||||
// LL_INFOS() << "REQUESTING " << sim_request_count << " IMAGES FROM HOST: " << host.getIPString() << LL_ENDL;
|
||||
|
||||
gMessageSystem->sendSemiReliable(host, NULL, NULL);
|
||||
sim_request_count = 0;
|
||||
@@ -2882,7 +2882,7 @@ void LLTextureFetch::sendRequestListToSimulators()
|
||||
}
|
||||
if (gMessageSystem && sim_request_count > 0 && sim_request_count < IMAGES_PER_REQUEST)
|
||||
{
|
||||
// llinfos << "REQUESTING " << sim_request_count << " IMAGES FROM HOST: " << host.getIPString() << llendl;
|
||||
// LL_INFOS() << "REQUESTING " << sim_request_count << " IMAGES FROM HOST: " << host.getIPString() << LL_ENDL;
|
||||
gMessageSystem->sendSemiReliable(host, NULL, NULL);
|
||||
sim_request_count = 0;
|
||||
}
|
||||
@@ -2918,7 +2918,7 @@ void LLTextureFetch::sendRequestListToSimulators()
|
||||
gMessageSystem->addF32Fast(_PREHASH_DownloadPriority, 0);
|
||||
gMessageSystem->addU32Fast(_PREHASH_Packet, 0);
|
||||
gMessageSystem->addU8Fast(_PREHASH_Type, 0);
|
||||
// llinfos << "CANCELING IMAGE REQUEST: " << (*iter2) << llendl;
|
||||
// LL_INFOS() << "CANCELING IMAGE REQUEST: " << (*iter2) << LL_ENDL;
|
||||
|
||||
request_count++;
|
||||
if (request_count >= IMAGES_PER_REQUEST)
|
||||
@@ -2944,12 +2944,12 @@ bool LLTextureFetchWorker::insertPacket(S32 index, U8* data, S32 size)
|
||||
mRequestedTimer.reset();
|
||||
if (index >= mTotalPackets)
|
||||
{
|
||||
// llwarns << "Received Image Packet " << index << " > max: " << mTotalPackets << " for image: " << mID << llendl;
|
||||
// LL_WARNS() << "Received Image Packet " << index << " > max: " << mTotalPackets << " for image: " << mID << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
if (index > 0 && index < mTotalPackets-1 && size != MAX_IMG_PACKET_SIZE)
|
||||
{
|
||||
// llwarns << "Received bad sized packet: " << index << ", " << size << " != " << MAX_IMG_PACKET_SIZE << " for image: " << mID << llendl;
|
||||
// LL_WARNS() << "Received bad sized packet: " << index << ", " << size << " != " << MAX_IMG_PACKET_SIZE << " for image: " << mID << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2959,7 +2959,7 @@ bool LLTextureFetchWorker::insertPacket(S32 index, U8* data, S32 size)
|
||||
}
|
||||
else if (mPackets[index] != NULL)
|
||||
{
|
||||
// llwarns << "Received duplicate packet: " << index << " for image: " << mID << llendl;
|
||||
// LL_WARNS() << "Received duplicate packet: " << index << " for image: " << mID << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2994,7 +2994,7 @@ void LLTextureFetchWorker::setState(e_state new_state)
|
||||
};
|
||||
*/
|
||||
//if(mState != new_state)
|
||||
// LL_INFOS("Texture") << "id: " << mID << " disc: " << mDesiredDiscard << " sz: " << mDesiredSize << " state: " << e_state_name[mState] << " => " << e_state_name[new_state] << llendl;
|
||||
// LL_INFOS("Texture") << "id: " << mID << " disc: " << mDesiredDiscard << " sz: " << mDesiredSize << " state: " << e_state_name[mState] << " => " << e_state_name[new_state] << LL_ENDL;
|
||||
mState = new_state;
|
||||
}
|
||||
|
||||
@@ -3009,26 +3009,26 @@ bool LLTextureFetch::receiveImageHeader(const LLHost& host, const LLUUID& id, U8
|
||||
|
||||
if (!worker)
|
||||
{
|
||||
// llwarns << "Received header for non active worker: " << id << llendl;
|
||||
// LL_WARNS() << "Received header for non active worker: " << id << LL_ENDL;
|
||||
res = false;
|
||||
}
|
||||
else if (worker->mState != LLTextureFetchWorker::WAIT_UDP_REQ ||
|
||||
worker->mSentRequest != LLTextureFetchWorker::SENT_SIM)
|
||||
{
|
||||
// llwarns << "receiveImageHeader for worker: " << id
|
||||
// LL_WARNS() << "receiveImageHeader for worker: " << id
|
||||
// << " in state: " << LLTextureFetchWorker::sStateDescs[worker->mState]
|
||||
// << " sent: " << worker->mSentRequest << llendl;
|
||||
// << " sent: " << worker->mSentRequest << LL_ENDL;
|
||||
res = false;
|
||||
}
|
||||
else if (worker->mLastPacket != -1)
|
||||
{
|
||||
// check to see if we've gotten this packet before
|
||||
// llwarns << "Received duplicate header for: " << id << llendl;
|
||||
// LL_WARNS() << "Received duplicate header for: " << id << LL_ENDL;
|
||||
res = false;
|
||||
}
|
||||
else if (!data_size)
|
||||
{
|
||||
// llwarns << "Img: " << id << ":" << " Empty Image Header" << llendl;
|
||||
// LL_WARNS() << "Img: " << id << ":" << " Empty Image Header" << LL_ENDL;
|
||||
res = false;
|
||||
}
|
||||
if (!res)
|
||||
@@ -3068,17 +3068,17 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1
|
||||
|
||||
if (!worker)
|
||||
{
|
||||
// llwarns << "Received packet " << packet_num << " for non active worker: " << id << llendl;
|
||||
// LL_WARNS() << "Received packet " << packet_num << " for non active worker: " << id << LL_ENDL;
|
||||
res = false;
|
||||
}
|
||||
else if (worker->mLastPacket == -1)
|
||||
{
|
||||
// llwarns << "Received packet " << packet_num << " before header for: " << id << llendl;
|
||||
// LL_WARNS() << "Received packet " << packet_num << " before header for: " << id << LL_ENDL;
|
||||
res = false;
|
||||
}
|
||||
else if (!data_size)
|
||||
{
|
||||
// llwarns << "Img: " << id << ":" << " Empty Image Header" << llendl;
|
||||
// LL_WARNS() << "Img: " << id << ":" << " Empty Image Header" << LL_ENDL;
|
||||
res = false;
|
||||
}
|
||||
if (!res)
|
||||
@@ -3106,8 +3106,8 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1
|
||||
}
|
||||
else
|
||||
{
|
||||
// llwarns << "receiveImagePacket " << packet_num << "/" << worker->mLastPacket << " for worker: " << id
|
||||
// << " in state: " << LLTextureFetchWorker::sStateDescs[worker->mState] << llendl;
|
||||
// LL_WARNS() << "receiveImagePacket " << packet_num << "/" << worker->mLastPacket << " for worker: " << id
|
||||
// << " in state: " << LLTextureFetchWorker::sStateDescs[worker->mState] << LL_ENDL;
|
||||
removeFromNetworkQueue(worker, true); // failsafe
|
||||
}
|
||||
|
||||
@@ -3196,25 +3196,25 @@ S32 LLTextureFetch::getFetchState(const LLUUID& id, F32& data_progress_p, F32& r
|
||||
|
||||
void LLTextureFetch::dump()
|
||||
{
|
||||
llinfos << "LLTextureFetch REQUESTS:" << llendl;
|
||||
LL_INFOS() << "LLTextureFetch REQUESTS:" << LL_ENDL;
|
||||
for (request_queue_t::iterator iter = mRequestQueue.begin();
|
||||
iter != mRequestQueue.end(); ++iter)
|
||||
{
|
||||
LLQueuedThread::QueuedRequest* qreq = *iter;
|
||||
LLWorkerThread::WorkRequest* wreq = (LLWorkerThread::WorkRequest*)qreq;
|
||||
LLTextureFetchWorker* worker = (LLTextureFetchWorker*)wreq->getWorkerClass();
|
||||
llinfos << " ID: " << worker->mID
|
||||
LL_INFOS() << " ID: " << worker->mID
|
||||
<< " PRI: " << llformat("0x%08x",wreq->getPriority())
|
||||
<< " STATE: " << worker->sStateDescs[worker->mState]
|
||||
<< llendl;
|
||||
<< LL_ENDL;
|
||||
}
|
||||
|
||||
llinfos << "LLTextureFetch ACTIVE_HTTP:" << llendl;
|
||||
LL_INFOS() << "LLTextureFetch ACTIVE_HTTP:" << LL_ENDL;
|
||||
for (queue_t::const_iterator iter(mHTTPTextureQueue.begin());
|
||||
mHTTPTextureQueue.end() != iter;
|
||||
++iter)
|
||||
{
|
||||
llinfos << " ID: " << (*iter) << llendl;
|
||||
LL_INFOS() << " ID: " << (*iter) << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user