aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs25
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/BaseInventoryConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs18
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs10
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs31
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs2
8 files changed, 63 insertions, 33 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 16ce9e0..e2fb659 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -7053,14 +7053,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7053 if (OnRemoveInventoryItem != null) 7053 if (OnRemoveInventoryItem != null)
7054 { 7054 {
7055 handlerRemoveInventoryItem = null; 7055 handlerRemoveInventoryItem = null;
7056 List<UUID> uuids = new List<UUID>();
7056 foreach (RemoveInventoryItemPacket.InventoryDataBlock datablock in removeItem.InventoryData) 7057 foreach (RemoveInventoryItemPacket.InventoryDataBlock datablock in removeItem.InventoryData)
7057 { 7058 {
7058 handlerRemoveInventoryItem = OnRemoveInventoryItem; 7059 uuids.Add(datablock.ItemID);
7059 if (handlerRemoveInventoryItem != null)
7060 {
7061 handlerRemoveInventoryItem(this, datablock.ItemID);
7062 }
7063 } 7060 }
7061 handlerRemoveInventoryItem = OnRemoveInventoryItem;
7062 if (handlerRemoveInventoryItem != null)
7063 {
7064 handlerRemoveInventoryItem(this, uuids);
7065 }
7066
7064 } 7067 }
7065 break; 7068 break;
7066 case PacketType.RemoveInventoryFolder: 7069 case PacketType.RemoveInventoryFolder:
@@ -7116,13 +7119,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7116 if (OnRemoveInventoryItem != null) 7119 if (OnRemoveInventoryItem != null)
7117 { 7120 {
7118 handlerRemoveInventoryItem = null; 7121 handlerRemoveInventoryItem = null;
7122 List<UUID> uuids = new List<UUID>();
7119 foreach (RemoveInventoryObjectsPacket.ItemDataBlock datablock in removeObject.ItemData) 7123 foreach (RemoveInventoryObjectsPacket.ItemDataBlock datablock in removeObject.ItemData)
7120 { 7124 {
7121 handlerRemoveInventoryItem = OnRemoveInventoryItem; 7125 uuids.Add(datablock.ItemID);
7122 if (handlerRemoveInventoryItem != null) 7126 }
7123 { 7127 handlerRemoveInventoryItem = OnRemoveInventoryItem;
7124 handlerRemoveInventoryItem(this, datablock.ItemID); 7128 if (handlerRemoveInventoryItem != null)
7125 } 7129 {
7130 handlerRemoveInventoryItem(this, uuids);
7126 } 7131 }
7127 } 7132 }
7128 break; 7133 break;
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index 3a65336..5afbf68 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -267,7 +267,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
267 item.Folder = trashFolder.ID; 267 item.Folder = trashFolder.ID;
268 268
269 // Diva comment: can't we just update this item??? 269 // Diva comment: can't we just update this item???
270 invService.DeleteItem(item); 270 List<UUID> uuids = new List<UUID>();
271 uuids.Add(item.ID);
272 invService.DeleteItems(item.Owner, uuids);
271 scene.AddInventoryItem(client, item); 273 scene.AddInventoryItem(client, item);
272 } 274 }
273 else 275 else
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/BaseInventoryConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/BaseInventoryConnector.cs
index ef5ffe1..d1ae3e4 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/BaseInventoryConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/BaseInventoryConnector.cs
@@ -186,7 +186,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
186 /// </summary> 186 /// </summary>
187 /// <param name="item"></param> 187 /// <param name="item"></param>
188 /// <returns>true if the item was successfully deleted</returns> 188 /// <returns>true if the item was successfully deleted</returns>
189 public abstract bool DeleteItem(InventoryItemBase item); 189 public abstract bool DeleteItems(UUID ownerID, List<UUID> itemIDs);
190 190
191 public abstract InventoryItemBase GetItem(InventoryItemBase item); 191 public abstract InventoryItemBase GetItem(InventoryItemBase item);
192 192
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs
index 3649097..6a1f2d5 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs
@@ -393,18 +393,22 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
393 } 393 }
394 } 394 }
395 395
396 public override bool DeleteItem(InventoryItemBase item) 396 public override bool DeleteItems(UUID ownerID, List<UUID> itemIDs)
397 { 397 {
398 if (item == null) 398 m_log.DebugFormat("[HG INVENTORY CONNECTOR]: Delete {0} items for user {1}", itemIDs.Count, ownerID);
399
400 if (itemIDs == null)
399 return false; 401 return false;
402 if (itemIDs.Count == 0)
403 return true;
400 404
401 if (IsLocalGridUser(item.Owner)) 405 if (IsLocalGridUser(ownerID))
402 return m_GridService.DeleteItem(item); 406 return m_GridService.DeleteItems(ownerID, itemIDs);
403 else 407 else
404 { 408 {
405 UUID sessionID = GetSessionID(item.Owner); 409 UUID sessionID = GetSessionID(ownerID);
406 string uri = GetUserInventoryURI(item.Owner) + "/" + item.Owner.ToString(); 410 string uri = GetUserInventoryURI(ownerID) + "/" + ownerID.ToString();
407 return m_HGService.DeleteItem(uri, item, sessionID); 411 return m_HGService.DeleteItems(uri, itemIDs, sessionID);
408 } 412 }
409 } 413 }
410 414
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
index 2fbc5fe..b2640af 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
@@ -294,9 +294,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
294 /// </summary> 294 /// </summary>
295 /// <param name="item"></param> 295 /// <param name="item"></param>
296 /// <returns>true if the item was successfully deleted</returns> 296 /// <returns>true if the item was successfully deleted</returns>
297 public override bool DeleteItem(InventoryItemBase item) 297 public override bool DeleteItems(UUID ownerID, List<UUID> itemIDs)
298 { 298 {
299 return m_InventoryService.DeleteItem(item); 299 return m_InventoryService.DeleteItems(ownerID, itemIDs);
300 } 300 }
301 301
302 public override InventoryItemBase GetItem(InventoryItemBase item) 302 public override InventoryItemBase GetItem(InventoryItemBase item)
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs
index 522f680..012f0e3 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs
@@ -273,13 +273,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
273 return m_RemoteConnector.UpdateItem(item.Owner.ToString(), item, sessionID); 273 return m_RemoteConnector.UpdateItem(item.Owner.ToString(), item, sessionID);
274 } 274 }
275 275
276 public override bool DeleteItem(InventoryItemBase item) 276 public override bool DeleteItems(UUID ownerID, List<UUID> itemIDs)
277 { 277 {
278 if (item == null) 278 if (itemIDs == null)
279 return false; 279 return false;
280 if (itemIDs.Count == 0)
281 return true;
280 282
281 UUID sessionID = GetSessionID(item.Owner); 283 UUID sessionID = GetSessionID(ownerID);
282 return m_RemoteConnector.DeleteItem(item.Owner.ToString(), item, sessionID); 284 return m_RemoteConnector.DeleteItems(ownerID.ToString(), itemIDs, sessionID);
283 } 285 }
284 286
285 public override InventoryItemBase GetItem(InventoryItemBase item) 287 public override InventoryItemBase GetItem(InventoryItemBase item)
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 48c7f4e..5e2eb73 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -477,7 +477,11 @@ namespace OpenSim.Region.Framework.Scenes
477 if (!Permissions.BypassPermissions()) 477 if (!Permissions.BypassPermissions())
478 { 478 {
479 if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) 479 if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
480 InventoryService.DeleteItem(new InventoryItemBase(itemId)); 480 {
481 List<UUID> items = new List<UUID>();
482 items.Add(itemId);
483 InventoryService.DeleteItems(senderId, items);
484 }
481 } 485 }
482 486
483 return itemCopy; 487 return itemCopy;
@@ -652,7 +656,9 @@ namespace OpenSim.Region.Framework.Scenes
652 item.Folder = folderID; 656 item.Folder = folderID;
653 657
654 // Diva comment: can't we just update? 658 // Diva comment: can't we just update?
655 InventoryService.DeleteItem(item); 659 List<UUID> uuids = new List<UUID>();
660 uuids.Add(item.ID);
661 InventoryService.DeleteItems(item.Owner, uuids);
656 662
657 AddInventoryItem(remoteClient, item); 663 AddInventoryItem(remoteClient, item);
658 } 664 }
@@ -799,9 +805,10 @@ namespace OpenSim.Region.Framework.Scenes
799 /// </summary> 805 /// </summary>
800 /// <param name="remoteClient"></param> 806 /// <param name="remoteClient"></param>
801 /// <param name="itemID"></param> 807 /// <param name="itemID"></param>
802 private void RemoveInventoryItem(IClientAPI remoteClient, UUID itemID) 808 private void RemoveInventoryItem(IClientAPI remoteClient, List<UUID> itemIDs)
803 { 809 {
804 InventoryService.DeleteItem(new InventoryItemBase(itemID)); 810 //m_log.Debug("[SCENE INVENTORY]: user " + remoteClient.AgentId);
811 InventoryService.DeleteItems(remoteClient.AgentId, itemIDs);
805 } 812 }
806 813
807 /// <summary> 814 /// <summary>
@@ -1248,7 +1255,11 @@ namespace OpenSim.Region.Framework.Scenes
1248 if (!Permissions.BypassPermissions()) 1255 if (!Permissions.BypassPermissions())
1249 { 1256 {
1250 if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) 1257 if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
1251 RemoveInventoryItem(remoteClient, itemID); 1258 {
1259 List<UUID> uuids = new List<UUID>();
1260 uuids.Add(itemID);
1261 RemoveInventoryItem(remoteClient, uuids);
1262 }
1252 } 1263 }
1253 } 1264 }
1254 else 1265 else
@@ -2144,7 +2155,11 @@ namespace OpenSim.Region.Framework.Scenes
2144 // copy ones will be lost, so avoid it 2155 // copy ones will be lost, so avoid it
2145 // 2156 //
2146 if (!attachment) 2157 if (!attachment)
2147 InventoryService.DeleteItem(item); 2158 {
2159 List<UUID> uuids = new List<UUID>();
2160 uuids.Add(item.ID);
2161 InventoryService.DeleteItems(item.Owner, uuids);
2162 }
2148 } 2163 }
2149 } 2164 }
2150 2165
@@ -2404,7 +2419,9 @@ namespace OpenSim.Region.Framework.Scenes
2404 } 2419 }
2405 part.ParentGroup.DetachToGround(); 2420 part.ParentGroup.DetachToGround();
2406 2421
2407 InventoryService.DeleteItem(new InventoryItemBase(inventoryID)); 2422 List<UUID> uuids = new List<UUID>();
2423 uuids.Add(inventoryID);
2424 InventoryService.DeleteItems(remoteClient.AgentId, uuids);
2408 remoteClient.SendRemoveInventoryItem(inventoryID); 2425 remoteClient.SendRemoveInventoryItem(inventoryID);
2409 } 2426 }
2410 SendAttachEvent(part.ParentGroup.LocalId, itemID, UUID.Zero); 2427 SendAttachEvent(part.ParentGroup.LocalId, itemID, UUID.Zero);
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index 1bbca49..a2414e5 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -560,7 +560,7 @@ namespace OpenSim.Region.Framework.Scenes
560 560
561 public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, UUID folderID) 561 public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, UUID folderID)
562 { 562 {
563 InventoryFolderBase folder = new InventoryFolderBase(folderID); 563 InventoryFolderBase folder = new InventoryFolderBase(folderID, remoteClient.AgentId);
564 564
565 if (InventoryService.PurgeFolder(folder)) 565 if (InventoryService.PurgeFolder(folder))
566 m_log.DebugFormat("[AGENT INVENTORY]: folder {0} purged successfully", folderID); 566 m_log.DebugFormat("[AGENT INVENTORY]: folder {0} purged successfully", folderID);