Skip to content

Commit e7c25dc

Browse files
committed
prevent erroneous edit of wrong parcel
Fixes jira-archive-internal/issues/70771 [SL-20409] Erroneous Local Parcel Twins - Parcel Updates Across Region Borders - unrequested updateDatabaseParcel changes
1 parent 5590735 commit e7c25dc

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

indra/llinventory/llparcel.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,8 @@ class LLParcel
262262

263263
void setMediaURLResetTimer(F32 time);
264264
virtual void setLocalID(S32 local_id);
265+
void setRegionID(const LLUUID& id) { mRegionID = id; }
266+
const LLUUID& getRegionID() const { return mRegionID; }
265267

266268
// blow away all the extra stuff lurking in parcels, including urls, access lists, etc
267269
void clearParcel();
@@ -651,6 +653,7 @@ class LLParcel
651653
S32 mLocalID;
652654
LLUUID mBanListTransactionID;
653655
LLUUID mAccessListTransactionID;
656+
LLUUID mRegionID;
654657
std::map<LLUUID,LLAccessEntry> mAccessList;
655658
std::map<LLUUID,LLAccessEntry> mBanList;
656659
std::map<LLUUID,LLAccessEntry> mTempBanList;

indra/newview/llviewerparcelmgr.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,7 +1332,7 @@ void LLViewerParcelMgr::sendParcelPropertiesUpdate(LLParcel* parcel, bool use_ag
13321332
if(!parcel)
13331333
return;
13341334

1335-
LLViewerRegion *region = use_agent_region ? gAgent.getRegion() : LLWorld::getInstance()->getRegionFromPosGlobal( mWestSouth );
1335+
LLViewerRegion *region = LLWorld::getInstance()->getRegionFromID(parcel->getRegionID());
13361336
if (!region)
13371337
return;
13381338

@@ -1676,10 +1676,16 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
16761676
// Actually extract the data.
16771677
if (parcel)
16781678
{
1679+
// store region_id in the parcel so we can find it again later
1680+
LLViewerRegion* parcel_region = LLWorld::getInstance()->getRegion(msg->getSender());
1681+
if (parcel_region)
1682+
{
1683+
parcel->setRegionID(parcel_region->getRegionID());
1684+
}
1685+
16791686
if (local_id == parcel_mgr.mAgentParcel->getLocalID())
16801687
{
16811688
// Parcels in different regions can have same ids.
1682-
LLViewerRegion* parcel_region = LLWorld::getInstance()->getRegion(msg->getSender());
16831689
LLViewerRegion* agent_region = gAgent.getRegion();
16841690
if (parcel_region && agent_region && parcel_region->getRegionID() == agent_region->getRegionID())
16851691
{

0 commit comments

Comments
 (0)