From 0a99aadd7a9d5d5166ef4e581b935adc6fb034ea Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Mon, 4 Feb 2013 00:57:45 +0100 Subject: Material PUT queue entries aren't removed after a request is sent --- indra/newview/llmaterialmgr.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'indra/newview/llmaterialmgr.cpp') diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp index 3138bfd4e1..c93f17859c 100644 --- a/indra/newview/llmaterialmgr.cpp +++ b/indra/newview/llmaterialmgr.cpp @@ -590,14 +590,7 @@ void LLMaterialMgr::processPutQueue() std::string materialString = zip_llsd(materialsData); S32 materialSize = materialString.size(); - if (materialSize <= 0) - { - LL_ERRS("debugMaterials") << "cannot zip LLSD binary content" << LL_ENDL; - - mPutQueue.erase(itQueue); - continue; - } - else + if (materialSize > 0) { LLSD::Binary materialBinary; materialBinary.resize(materialSize); @@ -609,6 +602,11 @@ void LLMaterialMgr::processPutQueue() LLHTTPClient::ResponderPtr materialsResponder = new LLMaterialsResponder("PUT", capURL, boost::bind(&LLMaterialMgr::onPutResponse, this, _1, _2)); LLHTTPClient::put(capURL, putData, materialsResponder); } + else + { + LL_ERRS("debugMaterials") << "cannot zip LLSD binary content" << LL_ENDL; + } + mPutQueue.erase(itQueue); } } @@ -636,6 +634,5 @@ void LLMaterialMgr::onRegionRemoved(LLViewerRegion* regionp) mGetAllPending.erase(region_id); mGetAllCallbacks.erase(region_id); - // Put -// mPutQueue.erase(region_id); + // Put doesn't need clearing: objects that can't be found will clean up in processPutQueue() } -- cgit v1.2.3 From 5bbc33383ed63d4d0c8a4241c8274b32fa5b22cc Mon Sep 17 00:00:00 2001 From: Tonya Souther Date: Sun, 3 Feb 2013 23:01:22 -0600 Subject: Don't spam the sim with repeated queries for an empty list of materials. --- indra/newview/llmaterialmgr.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llmaterialmgr.cpp') diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp index c93f17859c..6068c2606c 100644 --- a/indra/newview/llmaterialmgr.cpp +++ b/indra/newview/llmaterialmgr.cpp @@ -473,6 +473,11 @@ void LLMaterialMgr::processGetQueue() material_queue_t& materials = itRegionQueue->second; material_queue_t::iterator loopMaterial = materials.begin(); + if (materials.end() == loopMaterial) + { + //LL_INFOS("Material") << "Get queue for region empty, trying next region." << LL_ENDL; + continue; + } while ( (materials.end() != loopMaterial) && (materialsData.size() <= MATERIALS_GET_MAX_ENTRIES) ) { material_queue_t::iterator itMaterial = loopMaterial++; -- cgit v1.2.3