diff options
author | Teravus Ovares (Dan Olivares) | 2009-08-19 14:43:18 -0400 |
---|---|---|
committer | Teravus Ovares (Dan Olivares) | 2009-08-19 14:43:18 -0400 |
commit | 289439c8329d992251769aa83e3d7809f651de26 (patch) | |
tree | 8a1e596190f197fa5f70f21a8c968d2c55004cde /OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |
parent | Add Border (a virtual border management class) (diff) | |
parent | Added MoveItems, which is most useful upon viewer-delete inventory operation.... (diff) | |
download | opensim-SC-289439c8329d992251769aa83e3d7809f651de26.zip opensim-SC-289439c8329d992251769aa83e3d7809f651de26.tar.gz opensim-SC-289439c8329d992251769aa83e3d7809f651de26.tar.bz2 opensim-SC-289439c8329d992251769aa83e3d7809f651de26.tar.xz |
Merge branch 'master' of ssh://MyConnection/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | 27 |
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 | ||
28 | using System; | ||
28 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
29 | using System.Threading; | 30 | using System.Threading; |
30 | using OpenMetaverse; | 31 | using 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 | } |