summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobjectlist.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-07-22 15:30:48 +0300
committerGitHub <noreply@github.com>2024-07-22 15:30:48 +0300
commit3c7fc595fa974df80552ea5d7c738997a1ab3f51 (patch)
treed2110d8cbe0b8c26e3ee72eedbd75f8186e50985 /indra/newview/llviewerobjectlist.cpp
parent7ebbc58ae310b5c41efb3fe1460d63663ab92004 (diff)
parent3013424057d8963bb55eca4bd58a91c21e4395fc (diff)
Merge pull request #2078 from RyeMutt/fix-rare-shutdown-crashes
Fix two rare shutdown crashes in gCacheName and gObjectList
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;