From c1170cfa48ec404556fe65b171b98566d40e1dab Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 28 May 2010 17:05:06 -0600 Subject: A possible fix for EXT-7032: [crashhunters] crash in libcurl background thread on windows. killed accessing the asset server for map textures after http returns 404. --- indra/newview/lltexturefetch.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 913a0b92c2..2e1e4ca238 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -260,6 +260,7 @@ private: BOOL mHaveAllData; BOOL mInLocalCache; bool mCanUseHTTP ; + bool mCanUseNET ; //can get from asset server. S32 mHTTPFailCount; S32 mRetryAttempt; S32 mActiveCount; @@ -422,6 +423,8 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher, mTotalPackets(0), mImageCodec(IMG_CODEC_INVALID) { + mCanUseNET = mUrl.empty() ; + calcWorkPriority(); mType = host.isOk() ? LLImageBase::TYPE_AVATAR_BAKE : LLImageBase::TYPE_NORMAL; // llinfos << "Create: " << mID << " mHost:" << host << " Discard=" << discard << llendl; @@ -900,13 +903,16 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mGetStatus == HTTP_NOT_FOUND) { mHTTPFailCount = max_attempts = 1; // Don't retry - llwarns << "Texture missing from server (404): " << mUrl << llendl; + //llwarns << "Texture missing from server (404): " << mUrl << llendl; //roll back to try UDP - mState = INIT ; - mCanUseHTTP = false ; - setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); - return false ; + if(mCanUseNET) + { + mState = INIT ; + mCanUseHTTP = false ; + setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); + return false ; + } } else if (mGetStatus == HTTP_SERVICE_UNAVAILABLE) { -- cgit v1.2.3