From ea8f3c83bf96453e8223d918933d5708fa49a3cc Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 4 Jul 2016 03:35:48 +0100 Subject: Finally remove the requirement for an InventoryItem/FolderBase object to be passed into inventory queries. This makes the API more homogenous and also will more clearly show coding errors related to HG inventory where the .Owner field has a meaning for a query but wasn't always set. --- .../Handlers/FetchInventory/FetchInventory2Handler.cs | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'OpenSim/Capabilities/Handlers/FetchInventory/FetchInventory2Handler.cs') diff --git a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInventory2Handler.cs b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInventory2Handler.cs index 1753f60..8200a96 100644 --- a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInventory2Handler.cs +++ b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInventory2Handler.cs @@ -81,24 +81,15 @@ namespace OpenSim.Capabilities.Handlers // OMG!!! One by one!!! This is fallback code, in case the backend isn't updated m_log.WarnFormat("[FETCH INVENTORY HANDLER]: GetMultipleItems failed. Falling back to fetching inventory items one by one."); items = new InventoryItemBase[itemsRequested.Count]; - InventoryItemBase item = new InventoryItemBase(); - item.Owner = m_agentID; foreach (UUID id in itemIDs) - { - item.ID = id; - items[i++] = m_inventoryService.GetItem(item); - } + items[i++] = m_inventoryService.GetItem(m_agentID, id); } } else { items = new InventoryItemBase[itemsRequested.Count]; - InventoryItemBase item = new InventoryItemBase(); foreach (UUID id in itemIDs) - { - item.ID = id; - items[i++] = m_inventoryService.GetItem(item); - } + items[i++] = m_inventoryService.GetItem(UUID.Zero, id); } foreach (InventoryItemBase item in items) @@ -152,4 +143,4 @@ namespace OpenSim.Capabilities.Handlers return llsdItem; } } -} \ No newline at end of file +} -- cgit v1.1