diff options
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
| -rw-r--r--[-rwxr-xr-x] | indra/newview/llviewerregion.cpp | 36 |
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"); |
