diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index e6b2a72cb..a511c2c7c 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -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"); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 4455b4d11..2ee341638 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -64,6 +64,7 @@ #include "llfloatercustomize.h" // #include "llappviewer.h" // System Folders +bool use_http_inventory(); // UseHTTPInventory replacement // // 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; }