diff options
Diffstat (limited to 'OpenSim/Capabilities/Handlers/FetchInventory/FetchInventory2Handler.cs')
-rw-r--r-- | OpenSim/Capabilities/Handlers/FetchInventory/FetchInventory2Handler.cs | 15 |
1 files changed, 3 insertions, 12 deletions
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 | |||
81 | // OMG!!! One by one!!! This is fallback code, in case the backend isn't updated | 81 | // OMG!!! One by one!!! This is fallback code, in case the backend isn't updated |
82 | m_log.WarnFormat("[FETCH INVENTORY HANDLER]: GetMultipleItems failed. Falling back to fetching inventory items one by one."); | 82 | m_log.WarnFormat("[FETCH INVENTORY HANDLER]: GetMultipleItems failed. Falling back to fetching inventory items one by one."); |
83 | items = new InventoryItemBase[itemsRequested.Count]; | 83 | items = new InventoryItemBase[itemsRequested.Count]; |
84 | InventoryItemBase item = new InventoryItemBase(); | ||
85 | item.Owner = m_agentID; | ||
86 | foreach (UUID id in itemIDs) | 84 | foreach (UUID id in itemIDs) |
87 | { | 85 | items[i++] = m_inventoryService.GetItem(m_agentID, id); |
88 | item.ID = id; | ||
89 | items[i++] = m_inventoryService.GetItem(item); | ||
90 | } | ||
91 | } | 86 | } |
92 | } | 87 | } |
93 | else | 88 | else |
94 | { | 89 | { |
95 | items = new InventoryItemBase[itemsRequested.Count]; | 90 | items = new InventoryItemBase[itemsRequested.Count]; |
96 | InventoryItemBase item = new InventoryItemBase(); | ||
97 | foreach (UUID id in itemIDs) | 91 | foreach (UUID id in itemIDs) |
98 | { | 92 | items[i++] = m_inventoryService.GetItem(UUID.Zero, id); |
99 | item.ID = id; | ||
100 | items[i++] = m_inventoryService.GetItem(item); | ||
101 | } | ||
102 | } | 93 | } |
103 | 94 | ||
104 | foreach (InventoryItemBase item in items) | 95 | foreach (InventoryItemBase item in items) |
@@ -152,4 +143,4 @@ namespace OpenSim.Capabilities.Handlers | |||
152 | return llsdItem; | 143 | return llsdItem; |
153 | } | 144 | } |
154 | } | 145 | } |
155 | } \ No newline at end of file | 146 | } |