summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitty Barnett <develop@catznip.com>2013-02-24 23:42:53 +0100
committerKitty Barnett <develop@catznip.com>2013-02-24 23:42:53 +0100
commit4d1446766a91c8227a936bc4ae2c62d90f2aa3b5 (patch)
treeecd68b870b633f082dbe5c8b274f4f74ba0e7bff
parent5711bda96abdb9da57ddc5d5fe9c26e72dc09b28 (diff)
parentb4a87776d4207c4268b5c0d546790eeb45db1e75 (diff)
Merge stray fix for infinite "get all" request loop on non-material regions
-rw-r--r--indra/newview/llmaterialmgr.cpp15
-rw-r--r--indra/newview/llmaterialmgr.h1
2 files changed, 8 insertions, 8 deletions
diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp
index cb628447bf..de82ec80c8 100644
--- a/indra/newview/llmaterialmgr.cpp
+++ b/indra/newview/llmaterialmgr.cpp
@@ -548,7 +548,7 @@ void LLMaterialMgr::processGetAllQueue()
if (regionp == NULL)
{
LL_WARNS("Materials") << "Unknown region with id " << region_id.asString() << LL_ENDL;
- mGetAllQueue.erase(itRegion);
+ clearGetQueues(region_id); // Invalidates region_id
continue;
}
else if (!regionp->capabilitiesReceived())
@@ -561,7 +561,7 @@ void LLMaterialMgr::processGetAllQueue()
{
LL_WARNS("Materials") << "Capability '" << MATERIALS_CAPABILITY_NAME
<< "' is not defined on the current region '" << regionp->getName() << "'" << LL_ENDL;
- mGetAllQueue.erase(itRegion);
+ clearGetQueues(region_id); // Invalidates region_id
continue;
}
@@ -647,11 +647,8 @@ void LLMaterialMgr::processPutQueue()
}
}
-void LLMaterialMgr::onRegionRemoved(LLViewerRegion* regionp)
+void LLMaterialMgr::clearGetQueues(const LLUUID& region_id)
{
- const LLUUID& region_id = regionp->getRegionID();
-
- // Get
mGetQueue.erase(region_id);
for (get_pending_map_t::iterator itPending = mGetPending.begin(); itPending != mGetPending.end();)
{
@@ -665,12 +662,14 @@ void LLMaterialMgr::onRegionRemoved(LLViewerRegion* regionp)
}
}
- LL_DEBUGS("Materials") << regionp->getName() << " id " << region_id << LL_ENDL;
- // Get all
mGetAllQueue.erase(region_id);
mGetAllRequested.erase(region_id);
mGetAllPending.erase(region_id);
mGetAllCallbacks.erase(region_id);
+}
+void LLMaterialMgr::onRegionRemoved(LLViewerRegion* regionp)
+{
+ clearGetQueues(regionp->getRegionID());
// Put doesn't need clearing: objects that can't be found will clean up in processPutQueue()
}
diff --git a/indra/newview/llmaterialmgr.h b/indra/newview/llmaterialmgr.h
index 0b7217445a..1672d11d38 100644
--- a/indra/newview/llmaterialmgr.h
+++ b/indra/newview/llmaterialmgr.h
@@ -52,6 +52,7 @@ public:
void put(const LLUUID& object_id, const U8 te, const LLMaterial& material);
protected:
+ void clearGetQueues(const LLUUID& region_id);
bool isGetPending(const LLUUID& region_id, const LLMaterialID& material_id);
bool isGetAllPending(const LLUUID& region_id);
const LLMaterialPtr setMaterial(const LLUUID& region_id, const LLMaterialID& material_id, const LLSD& material_data);