From d7d65df9e05718719b9f056e1090a0cbce9411f1 Mon Sep 17 00:00:00 2001 From: Shyotl Date: Sat, 21 Jan 2012 02:37:22 -0600 Subject: [PATCH] HTTP inventory fetching enabled. --- etc/message.xml | 8 ++++---- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llinventorymodelbackgroundfetch.cpp | 6 +++--- indra/newview/llinventoryobserver.cpp | 4 ++-- indra/newview/llviewerinventory.cpp | 6 +++--- indra/newview/llviewerregion.cpp | 10 +++++----- 6 files changed, 28 insertions(+), 17 deletions(-) diff --git a/etc/message.xml b/etc/message.xml index 8dfd75e13..690103bb7 100644 --- a/etc/message.xml +++ b/etc/message.xml @@ -670,19 +670,19 @@ EstateChangeInfo true - FetchInventoryDescendents + FetchInventoryDescendents2 false WebFetchInventoryDescendents false - FetchInventory + FetchInventory2 true - FetchLibDescendents + FetchLibDescendents2 true - FetchLib + FetchLib2 true diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index b9c6cae29..71c2f0779 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -14459,6 +14459,17 @@ Value 1 + UseHTTPInventory + + Comment + Allow use of http inventory transfers instead of UDP + Persist + 1 + Type + Boolean + Value + 1 + FloaterUploadRect Comment diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index 0883c4b60..e361015c7 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -185,8 +185,8 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() if (mBackgroundFetchActive && gAgent.getRegion()) { // If we'll be using the capability, we'll be sending batches and the background thing isn't as important. - std::string url = gAgent.getRegion()->getCapability("FetchInventoryDescendents"); - if (false /*gSavedSettings.getBOOL("UseHTTPInventory")*/ && !url.empty()) + std::string url = gAgent.getRegion()->getCapability("FetchInventoryDescendents2"); + if (gSavedSettings.getBOOL("UseHTTPInventory") && !url.empty()) { bulkFetch(url); return; @@ -605,7 +605,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch(std::string url) } if (body_lib["folders"].size()) { - std::string url_lib = gAgent.getRegion()->getCapability("FetchLibDescendents"); + std::string url_lib = gAgent.getRegion()->getCapability("FetchLibDescendents2"); LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(body_lib, recursive_cats); LLHTTPClient::post(url_lib, body_lib, fetcher, 300.0); diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index c16e96dbd..e9f8207af 100644 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -262,8 +262,8 @@ void fetch_items_from_llsd(const LLSD& items_llsd) { if (!items_llsd.size() || gDisconnected) return; LLSD body; - body[0]["cap_name"] = "FetchInventory"; - body[1]["cap_name"] = "FetchLib"; + body[0]["cap_name"] = "FetchInventory2"; + body[1]["cap_name"] = "FetchLib2"; for (S32 i=0; igetCapability("FetchLib"); + url = gAgent.getRegion()->getCapability("FetchLib2"); else - url = gAgent.getRegion()->getCapability("FetchInventory"); + url = gAgent.getRegion()->getCapability("FetchInventory2"); if (!url.empty()) { @@ -500,7 +500,7 @@ bool LLViewerInventoryCategory::fetchDescendents() std::string url; if (gAgent.getRegion()) { - url = gAgent.getRegion()->getCapability("FetchInventoryDescendents"); + url = gAgent.getRegion()->getCapability("FetchInventoryDescendents2"); } else { diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 57b53031e..55637a15c 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1501,12 +1501,12 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("ObjectMedia"); capabilityNames.append("ObjectMediaNavigate");*/ - if (false)//gSavedSettings.getBOOL("UseHTTPInventory")) //Caps suffixed with 2 by LL. Don't update until rest of fetch system is updated first. + if (gSavedSettings.getBOOL("UseHTTPInventory")) //Caps suffixed with 2 by LL. Don't update until rest of fetch system is updated first. { - capabilityNames.append("FetchLib"); - capabilityNames.append("FetchLibDescendents"); - capabilityNames.append("FetchInventory"); - capabilityNames.append("FetchInventoryDescendents"); + capabilityNames.append("FetchLib2"); + capabilityNames.append("FetchLibDescendents2"); + capabilityNames.append("FetchInventory2"); + capabilityNames.append("FetchInventoryDescendents2"); } capabilityNames.append("GetDisplayNames");