aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
diff options
context:
space:
mode:
authorMelanie2009-08-15 19:00:56 +0100
committerMelanie2009-08-15 19:00:56 +0100
commit973be659459c577433b831c451ff07048aa078be (patch)
tree887f0586edbb936cca2fb8381699d921a2299492 /OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
parentChanged FromAssetID to FromItemID (diff)
downloadopensim-SC_OLD-973be659459c577433b831c451ff07048aa078be.zip
opensim-SC_OLD-973be659459c577433b831c451ff07048aa078be.tar.gz
opensim-SC_OLD-973be659459c577433b831c451ff07048aa078be.tar.bz2
opensim-SC_OLD-973be659459c577433b831c451ff07048aa078be.tar.xz
Merge branch 'master' of ../opensim-diva/ into inventory-connector
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs')
-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 7633b7b..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 }
@@ -6609,20 +6608,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6609 } 6608 }
6610 else // Agent 6609 else // Agent
6611 { 6610 {
6612 CachedUserInfo userInfo = ((Scene)m_scene).CommsManager.UserProfileCacheService.GetUserDetails(AgentId); 6611 //InventoryItemBase assetRequestItem = userInfo.RootFolder.FindItem(itemID);
6613 if (userInfo == null) 6612 IInventoryService invService = m_scene.RequestModuleInterface<IInventoryService>();
6614 { 6613 InventoryItemBase assetRequestItem = invService.GetItem(new InventoryItemBase(itemID));
6615 m_log.ErrorFormat(
6616 "[CLIENT]: Could not resolve user {0} for caps inventory update",
6617 AgentId);
6618
6619 break;
6620 }
6621
6622 if (userInfo.RootFolder == null)
6623 break;
6624
6625 InventoryItemBase assetRequestItem = userInfo.RootFolder.FindItem(itemID);
6626 if (assetRequestItem == null) 6614 if (assetRequestItem == null)
6627 { 6615 {
6628 assetRequestItem = ((Scene)m_scene).CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID); 6616 assetRequestItem = ((Scene)m_scene).CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID);