summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobjectlist.cpp
diff options
context:
space:
mode:
authorRye Mutt <rye@alchemyviewer.org>2024-07-21 20:10:02 -0400
committerRye Mutt <rye@alchemyviewer.org>2024-07-21 20:10:02 -0400
commit7d2cd036ead5212f724aea706346e4dbe5386c09 (patch)
tree97e88e258e15501753e1ff6101092e0cde3ea409 /indra/newview/llviewerobjectlist.cpp
parent3887404678756d46e082de016887b5837bf14217 (diff)
Fix rare shutdown crash in LLViewerObjectList
Diffstat (limited to 'indra/newview/llviewerobjectlist.cpp')
-rw-r--r--indra/newview/llviewerobjectlist.cpp24
1 files changed, 11 insertions, 13 deletions
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 9e274e0566..cda8c99594 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -99,8 +99,6 @@ extern LLPipeline gPipeline;
// Statics for object lookup tables.
U32 LLViewerObjectList::sSimulatorMachineIndex = 1; // Not zero deliberately, to speed up index check.
-std::map<U64, U32> LLViewerObjectList::sIPAndPortToIndex;
-std::map<U64, LLUUID> LLViewerObjectList::sIndexAndLocalIDToUUID;
LLViewerObjectList::LLViewerObjectList()
{
@@ -138,17 +136,17 @@ void LLViewerObjectList::getUUIDFromLocal(LLUUID &id,
{
U64 ipport = (((U64)ip) << 32) | (U64)port;
- U32 index = sIPAndPortToIndex[ipport];
+ U32 index = mIPAndPortToIndex[ipport];
if (!index)
{
index = sSimulatorMachineIndex++;
- sIPAndPortToIndex[ipport] = index;
+ mIPAndPortToIndex[ipport] = index;
}
U64 indexid = (((U64)index) << 32) | (U64)local_id;
- id = get_if_there(sIndexAndLocalIDToUUID, indexid, LLUUID::null);
+ id = get_if_there(mIndexAndLocalIDToUUID, indexid, LLUUID::null);
}
U64 LLViewerObjectList::getIndex(const U32 local_id,
@@ -157,7 +155,7 @@ U64 LLViewerObjectList::getIndex(const U32 local_id,
{
U64 ipport = (((U64)ip) << 32) | (U64)port;
- U32 index = sIPAndPortToIndex[ipport];
+ U32 index = mIPAndPortToIndex[ipport];
if (!index)
{
@@ -177,14 +175,14 @@ bool LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject* objectp)
U32 ip = objectp->getRegion()->getHost().getAddress();
U32 port = objectp->getRegion()->getHost().getPort();
U64 ipport = (((U64)ip) << 32) | (U64)port;
- U32 index = sIPAndPortToIndex[ipport];
+ U32 index = mIPAndPortToIndex[ipport];
// LL_INFOS() << "Removing object from table, local ID " << local_id << ", ip " << ip << ":" << port << LL_ENDL;
U64 indexid = (((U64)index) << 32) | (U64)local_id;
- std::map<U64, LLUUID>::iterator iter = sIndexAndLocalIDToUUID.find(indexid);
- if (iter == sIndexAndLocalIDToUUID.end())
+ std::map<U64, LLUUID>::iterator iter = mIndexAndLocalIDToUUID.find(indexid);
+ if (iter == mIndexAndLocalIDToUUID.end())
{
return false;
}
@@ -192,7 +190,7 @@ bool LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject* objectp)
// Found existing entry
if (iter->second == objectp->getID())
{ // Full UUIDs match, so remove the entry
- sIndexAndLocalIDToUUID.erase(iter);
+ mIndexAndLocalIDToUUID.erase(iter);
return true;
}
// UUIDs did not match - this would zap a valid entry, so don't erase it
@@ -210,17 +208,17 @@ void LLViewerObjectList::setUUIDAndLocal(const LLUUID &id,
{
U64 ipport = (((U64)ip) << 32) | (U64)port;
- U32 index = sIPAndPortToIndex[ipport];
+ U32 index = mIPAndPortToIndex[ipport];
if (!index)
{
index = sSimulatorMachineIndex++;
- sIPAndPortToIndex[ipport] = index;
+ mIPAndPortToIndex[ipport] = index;
}
U64 indexid = (((U64)index) << 32) | (U64)local_id;
- sIndexAndLocalIDToUUID[indexid] = id;
+ mIndexAndLocalIDToUUID[indexid] = id;
//LL_INFOS() << "Adding object to table, full ID " << id
// << ", local ID " << local_id << ", ip " << ip << ":" << port << LL_ENDL;