aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs27
1 files changed, 24 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index fde922f..77b980c 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -25,6 +25,7 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System;
28using System.Collections.Generic; 29using System.Collections.Generic;
29using System.Threading; 30using System.Threading;
30using OpenMetaverse; 31using OpenMetaverse;
@@ -404,7 +405,8 @@ namespace OpenSim.Region.Framework.Scenes
404 return; 405 return;
405 } 406 }
406 407
407 InventoryItemBase item = InventoryService.GetItem(new InventoryItemBase(itemID)); 408 InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId);
409 item = InventoryService.GetItem(item);
408 410
409 if (item != null) 411 if (item != null)
410 { 412 {
@@ -557,15 +559,34 @@ namespace OpenSim.Region.Framework.Scenes
557 /// <param name="remoteClient"></param> 559 /// <param name="remoteClient"></param>
558 /// <param name="folderID"></param> 560 /// <param name="folderID"></param>
559 561
562 delegate void PurgeFolderDelegate(UUID userID, UUID folder);
563
560 public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, UUID folderID) 564 public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, UUID folderID)
561 { 565 {
562 InventoryFolderBase folder = new InventoryFolderBase(folderID); 566 PurgeFolderDelegate d = PurgeFolderAsync;
567 try
568 {
569 d.BeginInvoke(remoteClient.AgentId, folderID, PurgeFolderCompleted, d);
570 }
571 catch (Exception e)
572 {
573 m_log.WarnFormat("[AGENT INVENTORY]: Exception on purge folder for user {0}: {1}", remoteClient.AgentId, e.Message);
574 }
575 }
576
577
578 private void PurgeFolderAsync(UUID userID, UUID folderID)
579 {
580 InventoryFolderBase folder = new InventoryFolderBase(folderID, userID);
563 581
564 if (InventoryService.PurgeFolder(folder)) 582 if (InventoryService.PurgeFolder(folder))
565 m_log.DebugFormat("[AGENT INVENTORY]: folder {0} purged successfully", folderID); 583 m_log.DebugFormat("[AGENT INVENTORY]: folder {0} purged successfully", folderID);
566 else 584 else
567 m_log.WarnFormat("[AGENT INVENTORY]: could not purge folder {0}", folderID); 585 m_log.WarnFormat("[AGENT INVENTORY]: could not purge folder {0}", folderID);
568 } 586 }
569 587
588 private void PurgeFolderCompleted(IAsyncResult iar)
589 {
590 }
570 } 591 }
571} 592}