diff options
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index a3e275d..6dda5aa 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -2156,16 +2156,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2156 | 2156 | ||
2157 | protected void SendBulkUpdateInventoryFolder(InventoryFolderBase folderBase) | 2157 | protected void SendBulkUpdateInventoryFolder(InventoryFolderBase folderBase) |
2158 | { | 2158 | { |
2159 | // XXX: Nasty temporary move that will be resolved shortly | ||
2160 | InventoryFolderImpl folder = (InventoryFolderImpl)folderBase; | ||
2161 | |||
2162 | // We will use the same transaction id for all the separate packets to be sent out in this update. | 2159 | // We will use the same transaction id for all the separate packets to be sent out in this update. |
2163 | UUID transactionId = UUID.Random(); | 2160 | UUID transactionId = UUID.Random(); |
2164 | 2161 | ||
2165 | List<BulkUpdateInventoryPacket.FolderDataBlock> folderDataBlocks | 2162 | List<BulkUpdateInventoryPacket.FolderDataBlock> folderDataBlocks |
2166 | = new List<BulkUpdateInventoryPacket.FolderDataBlock>(); | 2163 | = new List<BulkUpdateInventoryPacket.FolderDataBlock>(); |
2167 | 2164 | ||
2168 | SendBulkUpdateInventoryFolderRecursive(folder, ref folderDataBlocks, transactionId); | 2165 | SendBulkUpdateInventoryFolderRecursive(folderBase, ref folderDataBlocks, transactionId); |
2169 | 2166 | ||
2170 | if (folderDataBlocks.Count > 0) | 2167 | if (folderDataBlocks.Count > 0) |
2171 | { | 2168 | { |
@@ -2191,17 +2188,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2191 | /// <param name="folderDataBlocks"></param> | 2188 | /// <param name="folderDataBlocks"></param> |
2192 | /// <param name="transactionId"></param> | 2189 | /// <param name="transactionId"></param> |
2193 | private void SendBulkUpdateInventoryFolderRecursive( | 2190 | private void SendBulkUpdateInventoryFolderRecursive( |
2194 | InventoryFolderImpl folder, ref List<BulkUpdateInventoryPacket.FolderDataBlock> folderDataBlocks, | 2191 | InventoryFolderBase folder, ref List<BulkUpdateInventoryPacket.FolderDataBlock> folderDataBlocks, |
2195 | UUID transactionId) | 2192 | UUID transactionId) |
2196 | { | 2193 | { |
2197 | folderDataBlocks.Add(GenerateBulkUpdateFolderDataBlock(folder)); | 2194 | folderDataBlocks.Add(GenerateBulkUpdateFolderDataBlock(folder)); |
2198 | 2195 | ||
2199 | const int MAX_ITEMS_PER_PACKET = 5; | 2196 | const int MAX_ITEMS_PER_PACKET = 5; |
2200 | 2197 | ||
2198 | IInventoryService invService = m_scene.RequestModuleInterface<IInventoryService>(); | ||
2201 | // If there are any items then we have to start sending them off in this packet - the next folder will have | 2199 | // If there are any items then we have to start sending them off in this packet - the next folder will have |
2202 | // to be in its own bulk update packet. Also, we can only fit 5 items in a packet (at least this was the limit | 2200 | // to be in its own bulk update packet. Also, we can only fit 5 items in a packet (at least this was the limit |
2203 | // being used on the Linden grid at 20081203). | 2201 | // being used on the Linden grid at 20081203). |
2204 | List<InventoryItemBase> items = folder.RequestListOfItems(); | 2202 | InventoryCollection contents = invService.GetFolderContent(AgentId, folder.ID); // folder.RequestListOfItems(); |
2203 | List<InventoryItemBase> items = contents.Items; | ||
2205 | while (items.Count > 0) | 2204 | while (items.Count > 0) |
2206 | { | 2205 | { |
2207 | BulkUpdateInventoryPacket bulkUpdate | 2206 | BulkUpdateInventoryPacket bulkUpdate |
@@ -2233,8 +2232,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2233 | folderDataBlocks.Add(GenerateBulkUpdateFolderDataBlock(folder)); | 2232 | folderDataBlocks.Add(GenerateBulkUpdateFolderDataBlock(folder)); |
2234 | } | 2233 | } |
2235 | 2234 | ||
2236 | List<InventoryFolderImpl> subFolders = folder.RequestListOfFolderImpls(); | 2235 | List<InventoryFolderBase> subFolders = contents.Folders; |
2237 | foreach (InventoryFolderImpl subFolder in subFolders) | 2236 | foreach (InventoryFolderBase subFolder in subFolders) |
2238 | { | 2237 | { |
2239 | SendBulkUpdateInventoryFolderRecursive(subFolder, ref folderDataBlocks, transactionId); | 2238 | SendBulkUpdateInventoryFolderRecursive(subFolder, ref folderDataBlocks, transactionId); |
2240 | } | 2239 | } |