summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2026-10-13 14:30:21 -0400
committerGitHub <noreply@github.com>2026-10-13 14:30:21 -0400
commit8ba5d1a8adc47c21b23d9482e72de9517f9a98fc (patch)
treef97d67c8ee574c6ebaac8d0d8ba120d041dca051 /indra/newview/llviewerregion.cpp
parent18648fc51e2a0c750182d8aa3814ed5b6bf8445e (diff)
parentefc7d2d7bb542ac905cb7ebd82ee329523f95608 (diff)
Merge pull request #6193 from secondlife/release/26.4
Release/26.4
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rw-r--r--[-rwxr-xr-x]indra/newview/llviewerregion.cpp36
1 files changed, 33 insertions, 3 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index dd02cca50a..c37daa53a3 100755..100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1891,8 +1891,17 @@ LLViewerObject* LLViewerRegion::addNewObject(LLVOCacheEntry* entry)
}
else
{
- LLViewerRegion* old_regionp = ((LLDrawable*)entry->getEntry()->getDrawable())->getRegion();
- if(old_regionp != this)
+ LLDrawable* drawablep = (LLDrawable*)entry->getEntry()->getDrawable();
+ if (!drawablep || drawablep->isDead() || drawablep->getVObj().isNull())
+ {
+ LL_WARNS() << "Entry: " << entry->getLocalID() << " has a dead or invalid drawable; resetting to inactive." << LL_ENDL;
+ mImpl->mVisibleEntries.erase(entry);
+ entry->setState(LLVOCacheEntry::INACTIVE);
+ return NULL;
+ }
+
+ LLViewerRegion* old_regionp = drawablep->getRegion();
+ if (old_regionp != this)
{
//this object exists in two regions at the same time;
//this case can be safely ignored here because
@@ -3207,7 +3216,26 @@ void LLViewerRegion::unpackRegionHandshake()
flags |= 0x00000002; //set the bit 1 to be 1 to tell sim the cache file is empty, no need to send cache probes.
}
msg->addU32("Flags", flags );
- msg->sendReliable(host);
+
+ // build a lambda to be used as callback on ACK or timeout
+ void (*region_handshake_reply_callback)(void**, S32) = [](void**, S32 result)
+ {
+ if(LLApp::isExiting()) return;
+ if (result != LL_ERR_NOERR)
+ {
+ LL_WARNS("Messaging") << "RegionHandshakeReply failed with err=" << result << LL_ENDL;
+ }
+ };
+
+ // This is a crucial message for establishing a connection to a region
+ // (either the main region or a visible neighbor).
+ msg->sendReliable(
+ host,
+ gSavedSettings.getS32("UseCircuitCodeMaxRetries"),
+ false,
+ (F32Seconds)gSavedSettings.getF32("UseCircuitCodeTimeout"),
+ region_handshake_reply_callback,
+ NULL);
mRegionTimer.reset(); //reset region timer.
}
@@ -3243,6 +3271,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
capabilityNames.append("FetchInventory2");
capabilityNames.append("FetchInventoryDescendents2");
capabilityNames.append("IncrementCOFVersion");
+ capabilityNames.append("CreateTaskInventoryItem");
capabilityNames.append("RequestTaskInventory");
AISAPI::getCapNames(capabilityNames);
@@ -3296,6 +3325,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
capabilityNames.append("RequestTextureDownload");
capabilityNames.append("ResourceCostSelected");
capabilityNames.append("RetrieveNavMeshSrc");
+ capabilityNames.append("ScriptDefinitions");
capabilityNames.append("SearchStatRequest");
capabilityNames.append("SearchStatTracking");
capabilityNames.append("SendPostcard");