aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs57
1 files changed, 35 insertions, 22 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 7633b7b..06bea3d 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -197,6 +197,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
197 private ObjectExtraParams handlerUpdateExtraParams; //OnUpdateExtraParams; 197 private ObjectExtraParams handlerUpdateExtraParams; //OnUpdateExtraParams;
198 private ObjectDuplicate handlerObjectDuplicate; 198 private ObjectDuplicate handlerObjectDuplicate;
199 private ObjectDuplicateOnRay handlerObjectDuplicateOnRay; 199 private ObjectDuplicateOnRay handlerObjectDuplicateOnRay;
200 private ObjectRequest handlerObjectRequest;
200 private ObjectSelect handlerObjectSelect; 201 private ObjectSelect handlerObjectSelect;
201 private ObjectDeselect handlerObjectDeselect; 202 private ObjectDeselect handlerObjectDeselect;
202 private ObjectIncludeInSearch handlerObjectIncludeInSearch; 203 private ObjectIncludeInSearch handlerObjectIncludeInSearch;
@@ -1083,6 +1084,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1083 public event GodKickUser OnGodKickUser; 1084 public event GodKickUser OnGodKickUser;
1084 public event ObjectExtraParams OnUpdateExtraParams; 1085 public event ObjectExtraParams OnUpdateExtraParams;
1085 public event UpdateShape OnUpdatePrimShape; 1086 public event UpdateShape OnUpdatePrimShape;
1087 public event ObjectRequest OnObjectRequest;
1086 public event ObjectSelect OnObjectSelect; 1088 public event ObjectSelect OnObjectSelect;
1087 public event ObjectDeselect OnObjectDeselect; 1089 public event ObjectDeselect OnObjectDeselect;
1088 public event GenericCall7 OnObjectDescription; 1090 public event GenericCall7 OnObjectDescription;
@@ -2156,16 +2158,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2156 2158
2157 protected void SendBulkUpdateInventoryFolder(InventoryFolderBase folderBase) 2159 protected void SendBulkUpdateInventoryFolder(InventoryFolderBase folderBase)
2158 { 2160 {
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. 2161 // We will use the same transaction id for all the separate packets to be sent out in this update.
2163 UUID transactionId = UUID.Random(); 2162 UUID transactionId = UUID.Random();
2164 2163
2165 List<BulkUpdateInventoryPacket.FolderDataBlock> folderDataBlocks 2164 List<BulkUpdateInventoryPacket.FolderDataBlock> folderDataBlocks
2166 = new List<BulkUpdateInventoryPacket.FolderDataBlock>(); 2165 = new List<BulkUpdateInventoryPacket.FolderDataBlock>();
2167 2166
2168 SendBulkUpdateInventoryFolderRecursive(folder, ref folderDataBlocks, transactionId); 2167 SendBulkUpdateInventoryFolderRecursive(folderBase, ref folderDataBlocks, transactionId);
2169 2168
2170 if (folderDataBlocks.Count > 0) 2169 if (folderDataBlocks.Count > 0)
2171 { 2170 {
@@ -2191,17 +2190,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2191 /// <param name="folderDataBlocks"></param> 2190 /// <param name="folderDataBlocks"></param>
2192 /// <param name="transactionId"></param> 2191 /// <param name="transactionId"></param>
2193 private void SendBulkUpdateInventoryFolderRecursive( 2192 private void SendBulkUpdateInventoryFolderRecursive(
2194 InventoryFolderImpl folder, ref List<BulkUpdateInventoryPacket.FolderDataBlock> folderDataBlocks, 2193 InventoryFolderBase folder, ref List<BulkUpdateInventoryPacket.FolderDataBlock> folderDataBlocks,
2195 UUID transactionId) 2194 UUID transactionId)
2196 { 2195 {
2197 folderDataBlocks.Add(GenerateBulkUpdateFolderDataBlock(folder)); 2196 folderDataBlocks.Add(GenerateBulkUpdateFolderDataBlock(folder));
2198 2197
2199 const int MAX_ITEMS_PER_PACKET = 5; 2198 const int MAX_ITEMS_PER_PACKET = 5;
2200 2199
2200 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 2201 // 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 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
2203 // being used on the Linden grid at 20081203). 2203 // being used on the Linden grid at 20081203).
2204 List<InventoryItemBase> items = folder.RequestListOfItems(); 2204 InventoryCollection contents = invService.GetFolderContent(AgentId, folder.ID); // folder.RequestListOfItems();
2205 List<InventoryItemBase> items = contents.Items;
2205 while (items.Count > 0) 2206 while (items.Count > 0)
2206 { 2207 {
2207 BulkUpdateInventoryPacket bulkUpdate 2208 BulkUpdateInventoryPacket bulkUpdate
@@ -2233,8 +2234,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2233 folderDataBlocks.Add(GenerateBulkUpdateFolderDataBlock(folder)); 2234 folderDataBlocks.Add(GenerateBulkUpdateFolderDataBlock(folder));
2234 } 2235 }
2235 2236
2236 List<InventoryFolderImpl> subFolders = folder.RequestListOfFolderImpls(); 2237 List<InventoryFolderBase> subFolders = contents.Folders;
2237 foreach (InventoryFolderImpl subFolder in subFolders) 2238 foreach (InventoryFolderBase subFolder in subFolders)
2238 { 2239 {
2239 SendBulkUpdateInventoryFolderRecursive(subFolder, ref folderDataBlocks, transactionId); 2240 SendBulkUpdateInventoryFolderRecursive(subFolder, ref folderDataBlocks, transactionId);
2240 } 2241 }
@@ -5937,6 +5938,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5937 5938
5938 break; 5939 break;
5939 5940
5941 case PacketType.RequestMultipleObjects:
5942 RequestMultipleObjectsPacket incomingRequest = (RequestMultipleObjectsPacket)Pack;
5943
5944 #region Packet Session and User Check
5945 if (m_checkPackets)
5946 {
5947 if (incomingRequest.AgentData.SessionID != SessionId ||
5948 incomingRequest.AgentData.AgentID != AgentId)
5949 break;
5950 }
5951 #endregion
5952
5953 handlerObjectRequest = null;
5954
5955 for (int i = 0; i < incomingRequest.ObjectData.Length; i++)
5956 {
5957 handlerObjectRequest = OnObjectRequest;
5958 if (handlerObjectRequest != null)
5959 {
5960 handlerObjectRequest(incomingRequest.ObjectData[i].ID, this);
5961 }
5962 }
5963 break;
5940 case PacketType.ObjectSelect: 5964 case PacketType.ObjectSelect:
5941 ObjectSelectPacket incomingselect = (ObjectSelectPacket)Pack; 5965 ObjectSelectPacket incomingselect = (ObjectSelectPacket)Pack;
5942 5966
@@ -6609,20 +6633,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6609 } 6633 }
6610 else // Agent 6634 else // Agent
6611 { 6635 {
6612 CachedUserInfo userInfo = ((Scene)m_scene).CommsManager.UserProfileCacheService.GetUserDetails(AgentId); 6636 //InventoryItemBase assetRequestItem = userInfo.RootFolder.FindItem(itemID);
6613 if (userInfo == null) 6637 IInventoryService invService = m_scene.RequestModuleInterface<IInventoryService>();
6614 { 6638 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) 6639 if (assetRequestItem == null)
6627 { 6640 {
6628 assetRequestItem = ((Scene)m_scene).CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID); 6641 assetRequestItem = ((Scene)m_scene).CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID);