summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/lltexturefetch.cpp12
-rw-r--r--indra/newview/llviewerobjectlist.cpp5
-rw-r--r--indra/newview/llvoavatar.cpp6
3 files changed, 17 insertions, 6 deletions
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 7d09ea5b4f..d6d38de225 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -858,10 +858,16 @@ bool LLTextureFetchWorker::doWork(S32 param)
if(mCanUseHTTP)
{
//NOTE:
- //it seems ok to let sim control the UDP traffic
- //so there is no throttle for http here.
+ //control the number of the http requests issued for:
+ //1, not openning too many file descriptors at the same time;
+ //2, control the traffic of http so udp gets bandwidth.
//
-
+ static const S32 MAX_NUM_OF_HTTP_REQUESTS_IN_QUEUE = 32 ;
+ if(mFetcher->getNumHTTPRequests() > MAX_NUM_OF_HTTP_REQUESTS_IN_QUEUE)
+ {
+ return false ; //wait.
+ }
+
mFetcher->removeFromNetworkQueue(this, false);
S32 cur_size = 0;
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 05695193a5..9bb9b71b19 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -165,6 +165,11 @@ BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject &object)
{
U32 local_id = object.mLocalID;
LLHost region_host = object.getRegion()->getHost();
+ if(!region_host.isOk())
+ {
+ return FALSE ;
+ }
+
U32 ip = region_host.getAddress();
U32 port = region_host.getPort();
U64 ipport = (((U64)ip) << 32) | (U64)port;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 46d8f65d23..c31714de5a 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -6089,9 +6089,9 @@ void LLVOAvatar::updateMeshTextures()
// use the last-known good baked texture until it finish the first
// render of the new layerset.
- const BOOL layerset_invalid = !mBakedTextureDatas[i].mTexLayerSet
- || !mBakedTextureDatas[i].mTexLayerSet->getComposite()->isInitialized()
- || !mBakedTextureDatas[i].mTexLayerSet->isLocalTextureDataAvailable();
+ const BOOL layerset_invalid = mBakedTextureDatas[i].mTexLayerSet
+ && ( !mBakedTextureDatas[i].mTexLayerSet->getComposite()->isInitialized()
+ || !mBakedTextureDatas[i].mTexLayerSet->isLocalTextureDataAvailable() );
use_lkg_baked_layer[i] = (!is_layer_baked[i]
&& (mBakedTextureDatas[i].mLastTextureIndex != IMG_DEFAULT_AVATAR)