Update current region debug string upon cap seed request. Carry over seed cap if dead region is replaced with new.
This commit is contained in:
@@ -107,6 +107,19 @@ typedef std::map<std::string, std::string> CapabilityMap;
|
||||
|
||||
static void log_capabilities(const CapabilityMap &capmap);
|
||||
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
void newRegionEntry(LLViewerRegion& region)
|
||||
{
|
||||
LL_INFOS("LLViewerRegion") << "Entering region [" << region.getName() << "]" << LL_ENDL;
|
||||
gDebugInfo["CurrentRegion"] = region.getName();
|
||||
LLAppViewer::instance()->writeDebugInfo();
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
class LLViewerRegionImpl {
|
||||
public:
|
||||
LLViewerRegionImpl(LLViewerRegion * region, LLHost const & host)
|
||||
@@ -2091,6 +2104,9 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
|
||||
LL_DEBUGS("CrossingCaps") << "Received duplicate seed capability, posting to seed " <<
|
||||
url << LL_ENDL;
|
||||
|
||||
// record that we just entered a new region
|
||||
newRegionEntry(*this);
|
||||
|
||||
//Instead of just returning we build up a second set of seed caps and compare them
|
||||
//to the "original" seed cap received and determine why there is problem!
|
||||
LLSD capabilityNames = LLSD::emptyArray();
|
||||
@@ -2105,6 +2121,8 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
|
||||
mImpl->mCapabilities.clear();
|
||||
setCapability("Seed", url);
|
||||
|
||||
// record that we just entered a new region
|
||||
newRegionEntry(*this);
|
||||
LLSD capabilityNames = LLSD::emptyArray();
|
||||
mImpl->buildCapabilityNames(capabilityNames);
|
||||
|
||||
|
||||
@@ -172,6 +172,7 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host)
|
||||
{
|
||||
LL_INFOS() << "Add region with handle: " << region_handle << " on host " << host << LL_ENDL;
|
||||
LLViewerRegion *regionp = getRegionFromHandle(region_handle);
|
||||
std::string seedUrl;
|
||||
if (regionp)
|
||||
{
|
||||
LLHost old_host = regionp->getHost();
|
||||
@@ -191,9 +192,12 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host)
|
||||
}
|
||||
if (!regionp->isAlive())
|
||||
{
|
||||
LL_WARNS() << "LLWorld::addRegion exists, but isn't alive" << LL_ENDL;
|
||||
LL_WARNS() << "LLWorld::addRegion exists, but isn't alive. Removing old region and creating new" << LL_ENDL;
|
||||
}
|
||||
|
||||
// Save capabilities seed URL
|
||||
seedUrl = regionp->getCapability("Seed");
|
||||
|
||||
// Kill the old host, and then we can continue on and add the new host. We have to kill even if the host
|
||||
// matches, because all the agent state for the new camera is completely different.
|
||||
removeRegion(old_host);
|
||||
@@ -229,6 +233,11 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host)
|
||||
LL_ERRS() << "Unable to create new region!" << LL_ENDL;
|
||||
}
|
||||
|
||||
if ( !seedUrl.empty() )
|
||||
{
|
||||
regionp->setCapability("Seed", seedUrl);
|
||||
}
|
||||
|
||||
//Classic clouds
|
||||
#if ENABLE_CLASSIC_CLOUDS
|
||||
regionp->mCloudLayer.create(regionp);
|
||||
@@ -1447,6 +1456,8 @@ public:
|
||||
<< sim << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
LL_DEBUGS("CrossingCaps") << "Calling setSeedCapability from LLEstablishAgentCommunication::post. Seed cap == "
|
||||
<< input["body"]["seed-capability"] << LL_ENDL;
|
||||
regionp->setSeedCapability(input["body"]["seed-capability"]);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user