aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerinventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llviewerinventory.cpp')
-rw-r--r--linden/indra/newview/llviewerinventory.cpp41
1 files changed, 30 insertions, 11 deletions
diff --git a/linden/indra/newview/llviewerinventory.cpp b/linden/indra/newview/llviewerinventory.cpp
index 6d9d685..0323bb7 100644
--- a/linden/indra/newview/llviewerinventory.cpp
+++ b/linden/indra/newview/llviewerinventory.cpp
@@ -196,15 +196,34 @@ void LLViewerInventoryItem::fetchFromServer(void) const
196{ 196{
197 if(!mIsComplete) 197 if(!mIsComplete)
198 { 198 {
199 LLMessageSystem* msg = gMessageSystem; 199 std::string url;
200 msg->newMessage("FetchInventory"); 200
201 msg->nextBlock("AgentData"); 201 if( ALEXANDRIA_LINDEN_ID.getString() == mPermissions.getOwner().getString())
202 msg->addUUID("AgentID", gAgent.getID()); 202 url = gAgent.getRegion()->getCapability("FetchLib");
203 msg->addUUID("SessionID", gAgent.getSessionID()); 203 else
204 msg->nextBlock("InventoryData"); 204 url = gAgent.getRegion()->getCapability("FetchInventory");
205 msg->addUUID("OwnerID", mPermissions.getOwner()); 205
206 msg->addUUID("ItemID", mUUID); 206 if (!url.empty())
207 gAgent.sendReliableMessage(); 207 {
208 LLSD body;
209 body["agent_id"] = gAgent.getID();
210 body["items"][0]["owner_id"] = mPermissions.getOwner();
211 body["items"][0]["item_id"] = mUUID;
212
213 LLHTTPClient::post(url, body, new LLInventoryModel::fetchInventoryResponder(body));
214 }
215 else
216 {
217 LLMessageSystem* msg = gMessageSystem;
218 msg->newMessage("FetchInventory");
219 msg->nextBlock("AgentData");
220 msg->addUUID("AgentID", gAgent.getID());
221 msg->addUUID("SessionID", gAgent.getSessionID());
222 msg->nextBlock("InventoryData");
223 msg->addUUID("OwnerID", mPermissions.getOwner());
224 msg->addUUID("ItemID", mUUID);
225 gAgent.sendReliableMessage();
226 }
208 } 227 }
209 else 228 else
210 { 229 {
@@ -441,7 +460,7 @@ bool LLViewerInventoryCategory::fetchDescendents()
441 // This comes from LLInventoryFilter from llfolderview.h 460 // This comes from LLInventoryFilter from llfolderview.h
442 U32 sort_order = gSavedSettings.getU32("InventorySortOrder") & 0x1; 461 U32 sort_order = gSavedSettings.getU32("InventorySortOrder") & 0x1;
443 462
444 std::string url = gAgent.getRegion()->getCapability("FetchInventoryDescendents"); 463 std::string url = gAgent.getRegion()->getCapability("WebFetchInventoryDescendents");
445 464
446 if (!url.empty()) //Capability found. Build up LLSD and use it. 465 if (!url.empty()) //Capability found. Build up LLSD and use it.
447 { 466 {
@@ -449,7 +468,7 @@ bool LLViewerInventoryCategory::fetchDescendents()
449 } 468 }
450 else 469 else
451 { //Deprecated, but if we don't have a capability, use the old system. 470 { //Deprecated, but if we don't have a capability, use the old system.
452 llinfos << "FetchInventoryDescendents capability not found. Using deprecated UDP message." << llendl; 471 llinfos << "WebFetchInventoryDescendents capability not found. Using deprecated UDP message." << llendl;
453 LLMessageSystem* msg = gMessageSystem; 472 LLMessageSystem* msg = gMessageSystem;
454 msg->newMessage("FetchInventoryDescendents"); 473 msg->newMessage("FetchInventoryDescendents");
455 msg->nextBlock("AgentData"); 474 msg->nextBlock("AgentData");