diff options
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 12c2d86..06bea3d 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -2158,16 +2158,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2158 | 2158 | ||
2159 | protected void SendBulkUpdateInventoryFolder(InventoryFolderBase folderBase) | 2159 | protected void SendBulkUpdateInventoryFolder(InventoryFolderBase folderBase) |
2160 | { | 2160 | { |
2161 | // XXX: Nasty temporary move that will be resolved shortly | ||
2162 | InventoryFolderImpl folder = (InventoryFolderImpl)folderBase; | ||
2163 | |||
2164 | // We will use the same transaction id for all the separate packets to be sent out in this update. | 2161 | // We will use the same transaction id for all the separate packets to be sent out in this update. |
2165 | UUID transactionId = UUID.Random(); | 2162 | UUID transactionId = UUID.Random(); |
2166 | 2163 | ||
2167 | List<BulkUpdateInventoryPacket.FolderDataBlock> folderDataBlocks | 2164 | List<BulkUpdateInventoryPacket.FolderDataBlock> folderDataBlocks |
2168 | = new List<BulkUpdateInventoryPacket.FolderDataBlock>(); | 2165 | = new List<BulkUpdateInventoryPacket.FolderDataBlock>(); |
2169 | 2166 | ||
2170 | SendBulkUpdateInventoryFolderRecursive(folder, ref folderDataBlocks, transactionId); | 2167 | SendBulkUpdateInventoryFolderRecursive(folderBase, ref folderDataBlocks, transactionId); |
2171 | 2168 | ||
2172 | if (folderDataBlocks.Count > 0) | 2169 | if (folderDataBlocks.Count > 0) |
2173 | { | 2170 | { |
@@ -2193,17 +2190,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2193 | /// <param name="folderDataBlocks"></param> | 2190 | /// <param name="folderDataBlocks"></param> |
2194 | /// <param name="transactionId"></param> | 2191 | /// <param name="transactionId"></param> |
2195 | private void SendBulkUpdateInventoryFolderRecursive( | 2192 | private void SendBulkUpdateInventoryFolderRecursive( |
2196 | InventoryFolderImpl folder, ref List<BulkUpdateInventoryPacket.FolderDataBlock> folderDataBlocks, | 2193 | InventoryFolderBase folder, ref List<BulkUpdateInventoryPacket.FolderDataBlock> folderDataBlocks, |
2197 | UUID transactionId) | 2194 | UUID transactionId) |
2198 | { | 2195 | { |
2199 | folderDataBlocks.Add(GenerateBulkUpdateFolderDataBlock(folder)); | 2196 | folderDataBlocks.Add(GenerateBulkUpdateFolderDataBlock(folder)); |
2200 | 2197 | ||
2201 | const int MAX_ITEMS_PER_PACKET = 5; | 2198 | const int MAX_ITEMS_PER_PACKET = 5; |
2202 | 2199 | ||
2200 | IInventoryService invService = m_scene.RequestModuleInterface<IInventoryService>(); | ||
2203 | // If there are any items then we have to start sending them off in this packet - the next folder will have | 2201 | // If there are any items then we have to start sending them off in this packet - the next folder will have |
2204 | // to be in its own bulk update packet. Also, we can only fit 5 items in a packet (at least this was the limit | 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 |
2205 | // being used on the Linden grid at 20081203). | 2203 | // being used on the Linden grid at 20081203). |
2206 | List<InventoryItemBase> items = folder.RequestListOfItems(); | 2204 | InventoryCollection contents = invService.GetFolderContent(AgentId, folder.ID); // folder.RequestListOfItems(); |
2205 | List<InventoryItemBase> items = contents.Items; | ||
2207 | while (items.Count > 0) | 2206 | while (items.Count > 0) |
2208 | { | 2207 | { |
2209 | BulkUpdateInventoryPacket bulkUpdate | 2208 | BulkUpdateInventoryPacket bulkUpdate |
@@ -2235,8 +2234,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2235 | folderDataBlocks.Add(GenerateBulkUpdateFolderDataBlock(folder)); | 2234 | folderDataBlocks.Add(GenerateBulkUpdateFolderDataBlock(folder)); |
2236 | } | 2235 | } |
2237 | 2236 | ||
2238 | List<InventoryFolderImpl> subFolders = folder.RequestListOfFolderImpls(); | 2237 | List<InventoryFolderBase> subFolders = contents.Folders; |
2239 | foreach (InventoryFolderImpl subFolder in subFolders) | 2238 | foreach (InventoryFolderBase subFolder in subFolders) |
2240 | { | 2239 | { |
2241 | SendBulkUpdateInventoryFolderRecursive(subFolder, ref folderDataBlocks, transactionId); | 2240 | SendBulkUpdateInventoryFolderRecursive(subFolder, ref folderDataBlocks, transactionId); |
2242 | } | 2241 | } |
@@ -6634,20 +6633,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6634 | } | 6633 | } |
6635 | else // Agent | 6634 | else // Agent |
6636 | { | 6635 | { |
6637 | CachedUserInfo userInfo = ((Scene)m_scene).CommsManager.UserProfileCacheService.GetUserDetails(AgentId); | 6636 | //InventoryItemBase assetRequestItem = userInfo.RootFolder.FindItem(itemID); |
6638 | if (userInfo == null) | 6637 | IInventoryService invService = m_scene.RequestModuleInterface<IInventoryService>(); |
6639 | { | 6638 | InventoryItemBase assetRequestItem = invService.GetItem(new InventoryItemBase(itemID)); |
6640 | m_log.ErrorFormat( | ||
6641 | "[CLIENT]: Could not resolve user {0} for caps inventory update", | ||
6642 | AgentId); | ||
6643 | |||
6644 | break; | ||
6645 | } | ||
6646 | |||
6647 | if (userInfo.RootFolder == null) | ||
6648 | break; | ||
6649 | |||
6650 | InventoryItemBase assetRequestItem = userInfo.RootFolder.FindItem(itemID); | ||
6651 | if (assetRequestItem == null) | 6639 | if (assetRequestItem == null) |
6652 | { | 6640 | { |
6653 | assetRequestItem = ((Scene)m_scene).CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID); | 6641 | assetRequestItem = ((Scene)m_scene).CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID); |