Allow switching between HTTP and UDP inventory without relogging.
This also makes the viewer immune for grids that send the FetchInventory2 et al capabilities regardsless of whether we requested them (in fact, we always request them now: we need them when someone switches in the middle of a session). Note that (I tested that) textures could already be switched between HTTP and UDP without relogging.
This commit is contained in:
@@ -353,22 +353,25 @@ void LLViewerInventoryItem::fetchFromServer(void) const
|
||||
{
|
||||
std::string url;
|
||||
|
||||
LLViewerRegion* region = gAgent.getRegion();
|
||||
// we have to check region. It can be null after region was destroyed. See EXT-245
|
||||
if (region)
|
||||
if (gSavedSettings.getBOOL("UseHTTPInventory"))
|
||||
{
|
||||
if(gAgent.getID() != mPermissions.getOwner())
|
||||
{
|
||||
url = region->getCapability("FetchLib2");
|
||||
}
|
||||
else
|
||||
{
|
||||
url = region->getCapability("FetchInventory2");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "Agent Region is absent" << llendl;
|
||||
LLViewerRegion* region = gAgent.getRegion();
|
||||
// we have to check region. It can be null after region was destroyed. See EXT-245
|
||||
if (region)
|
||||
{
|
||||
if(gAgent.getID() != mPermissions.getOwner())
|
||||
{
|
||||
url = region->getCapability("FetchLib2");
|
||||
}
|
||||
else
|
||||
{
|
||||
url = region->getCapability("FetchInventory2");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "Agent Region is absent" << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
if (!url.empty())
|
||||
|
||||
Reference in New Issue
Block a user