UseHTTPInventory can never be turned off on SL anymore.

This commit is contained in:
Inusaito Sayori
2015-04-07 18:37:34 -04:00
parent f514243c1b
commit 036d5b84d1
2 changed files with 10 additions and 4 deletions

View File

@@ -193,12 +193,17 @@ void LLInventoryModelBackgroundFetch::backgroundFetchCB(void *)
LLInventoryModelBackgroundFetch::instance().backgroundFetch();
}
bool use_http_inventory()
{
return gHippoGridManager->getConnectedGrid()->isSecondLife() || gSavedSettings.getBOOL("UseHTTPInventory");
}
void LLInventoryModelBackgroundFetch::backgroundFetch()
{
LLViewerRegion* region = gAgent.getRegion();
if (mBackgroundFetchActive && region && region->capabilitiesReceived())
{
if (gSavedSettings.getBOOL("UseHTTPInventory"))
if (use_http_inventory())
{
// If we'll be using the capability, we'll be sending batches and the background thing isn't as important.
std::string url = region->getCapability("FetchInventory2");

View File

@@ -64,6 +64,7 @@
#include "llfloatercustomize.h"
// <edit>
#include "llappviewer.h" // System Folders
bool use_http_inventory(); // UseHTTPInventory replacement
// </edit>
// Two do-nothing ops for use in callbacks.
@@ -354,7 +355,7 @@ void LLViewerInventoryItem::fetchFromServer(void) const
{
std::string url;
if (gSavedSettings.getBOOL("UseHTTPInventory"))
if (use_http_inventory())
{
LLViewerRegion* region = gAgent.getRegion();
// we have to check region. It can be null after region was destroyed. See EXT-245
@@ -656,13 +657,13 @@ bool LLViewerInventoryCategory::fetch()
{
llwarns << "agent region is null" << llendl;
}
if (!url.empty() && gSavedSettings.getBOOL("UseHTTPInventory")) //Capability found and HTTP inventory enabled. Build up LLSD and use it.
if (!url.empty() && use_http_inventory()) //Capability found and HTTP inventory enabled. Build up LLSD and use it.
{
LLInventoryModelBackgroundFetch::instance().start(mUUID, false);
}
else
{ //We don't have a capability or the use of HTTP inventory is disabled, use the old system.
if (gSavedSettings.getBOOL("UseHTTPInventory"))
if (use_http_inventory())
{
llinfos << "FetchInventoryDescendents2 capability not found. Using UDP message." << llendl;
}