aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs32
1 files changed, 10 insertions, 22 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index e1d6f1b..9aef26d 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -2191,16 +2191,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2191 2191
2192 protected void SendBulkUpdateInventoryFolder(InventoryFolderBase folderBase) 2192 protected void SendBulkUpdateInventoryFolder(InventoryFolderBase folderBase)
2193 { 2193 {
2194 // XXX: Nasty temporary move that will be resolved shortly
2195 InventoryFolderImpl folder = (InventoryFolderImpl)folderBase;
2196
2197 // We will use the same transaction id for all the separate packets to be sent out in this update. 2194 // We will use the same transaction id for all the separate packets to be sent out in this update.
2198 UUID transactionId = UUID.Random(); 2195 UUID transactionId = UUID.Random();
2199 2196
2200 List<BulkUpdateInventoryPacket.FolderDataBlock> folderDataBlocks 2197 List<BulkUpdateInventoryPacket.FolderDataBlock> folderDataBlocks
2201 = new List<BulkUpdateInventoryPacket.FolderDataBlock>(); 2198 = new List<BulkUpdateInventoryPacket.FolderDataBlock>();
2202 2199
2203 SendBulkUpdateInventoryFolderRecursive(folder, ref folderDataBlocks, transactionId); 2200 SendBulkUpdateInventoryFolderRecursive(folderBase, ref folderDataBlocks, transactionId);
2204 2201
2205 if (folderDataBlocks.Count > 0) 2202 if (folderDataBlocks.Count > 0)
2206 { 2203 {
@@ -2226,17 +2223,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2226 /// <param name="folderDataBlocks"></param> 2223 /// <param name="folderDataBlocks"></param>
2227 /// <param name="transactionId"></param> 2224 /// <param name="transactionId"></param>
2228 private void SendBulkUpdateInventoryFolderRecursive( 2225 private void SendBulkUpdateInventoryFolderRecursive(
2229 InventoryFolderImpl folder, ref List<BulkUpdateInventoryPacket.FolderDataBlock> folderDataBlocks, 2226 InventoryFolderBase folder, ref List<BulkUpdateInventoryPacket.FolderDataBlock> folderDataBlocks,
2230 UUID transactionId) 2227 UUID transactionId)
2231 { 2228 {
2232 folderDataBlocks.Add(GenerateBulkUpdateFolderDataBlock(folder)); 2229 folderDataBlocks.Add(GenerateBulkUpdateFolderDataBlock(folder));
2233 2230
2234 const int MAX_ITEMS_PER_PACKET = 5; 2231 const int MAX_ITEMS_PER_PACKET = 5;
2235 2232
2233 IInventoryService invService = m_scene.RequestModuleInterface<IInventoryService>();
2236 // If there are any items then we have to start sending them off in this packet - the next folder will have 2234 // If there are any items then we have to start sending them off in this packet - the next folder will have
2237 // to be in its own bulk update packet. Also, we can only fit 5 items in a packet (at least this was the limit 2235 // to be in its own bulk update packet. Also, we can only fit 5 items in a packet (at least this was the limit
2238 // being used on the Linden grid at 20081203). 2236 // being used on the Linden grid at 20081203).
2239 List<InventoryItemBase> items = folder.RequestListOfItems(); 2237 InventoryCollection contents = invService.GetFolderContent(AgentId, folder.ID); // folder.RequestListOfItems();
2238 List<InventoryItemBase> items = contents.Items;
2240 while (items.Count > 0) 2239 while (items.Count > 0)
2241 { 2240 {
2242 BulkUpdateInventoryPacket bulkUpdate 2241 BulkUpdateInventoryPacket bulkUpdate
@@ -2268,8 +2267,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2268 folderDataBlocks.Add(GenerateBulkUpdateFolderDataBlock(folder)); 2267 folderDataBlocks.Add(GenerateBulkUpdateFolderDataBlock(folder));
2269 } 2268 }
2270 2269
2271 List<InventoryFolderImpl> subFolders = folder.RequestListOfFolderImpls(); 2270 List<InventoryFolderBase> subFolders = contents.Folders;
2272 foreach (InventoryFolderImpl subFolder in subFolders) 2271 foreach (InventoryFolderBase subFolder in subFolders)
2273 { 2272 {
2274 SendBulkUpdateInventoryFolderRecursive(subFolder, ref folderDataBlocks, transactionId); 2273 SendBulkUpdateInventoryFolderRecursive(subFolder, ref folderDataBlocks, transactionId);
2275 } 2274 }
@@ -6667,20 +6666,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6667 } 6666 }
6668 else // Agent 6667 else // Agent
6669 { 6668 {
6670 CachedUserInfo userInfo = ((Scene)m_scene).CommsManager.UserProfileCacheService.GetUserDetails(AgentId); 6669 //InventoryItemBase assetRequestItem = userInfo.RootFolder.FindItem(itemID);
6671 if (userInfo == null) 6670 IInventoryService invService = m_scene.RequestModuleInterface<IInventoryService>();
6672 { 6671 InventoryItemBase assetRequestItem = invService.GetItem(new InventoryItemBase(itemID));
6673 m_log.ErrorFormat(
6674 "[CLIENT]: Could not resolve user {0} for caps inventory update",
6675 AgentId);
6676
6677 break;
6678 }
6679
6680 if (userInfo.RootFolder == null)
6681 break;
6682
6683 InventoryItemBase assetRequestItem = userInfo.RootFolder.FindItem(itemID);
6684 if (assetRequestItem == null) 6672 if (assetRequestItem == null)
6685 { 6673 {
6686 assetRequestItem = ((Scene)m_scene).CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID); 6674 assetRequestItem = ((Scene)m_scene).CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID);