diff options
author | BlueWall | 2011-11-26 17:20:20 -0500 |
---|---|---|
committer | BlueWall | 2011-11-26 17:20:20 -0500 |
commit | 19c10c892adc7168107e8866cf4d7d20b876e2a8 (patch) | |
tree | 6c6ed57160a010a17c95dbda6901f97dd845b9e4 /OpenSim/Region/Framework | |
parent | Add missing property to llGetLinkPrimitiveParams (diff) | |
parent | When removing an LSL sensor for a script (e.g. through llResetScript() or sta... (diff) | |
download | opensim-SC-19c10c892adc7168107e8866cf4d7d20b876e2a8.zip opensim-SC-19c10c892adc7168107e8866cf4d7d20b876e2a8.tar.gz opensim-SC-19c10c892adc7168107e8866cf4d7d20b876e2a8.tar.bz2 opensim-SC-19c10c892adc7168107e8866cf4d7d20b876e2a8.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | 68 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 4 |
2 files changed, 7 insertions, 65 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index 270e582..6ba74c7 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |||
@@ -330,7 +330,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
330 | } | 330 | } |
331 | } | 331 | } |
332 | } | 332 | } |
333 | } | 333 | } |
334 | 334 | ||
335 | public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs) | 335 | public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs) |
336 | { | 336 | { |
@@ -484,6 +484,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
484 | // can be handled transparently). | 484 | // can be handled transparently). |
485 | InventoryFolderImpl fold = null; | 485 | InventoryFolderImpl fold = null; |
486 | if (LibraryService != null && LibraryService.LibraryRootFolder != null) | 486 | if (LibraryService != null && LibraryService.LibraryRootFolder != null) |
487 | { | ||
487 | if ((fold = LibraryService.LibraryRootFolder.FindFolder(folderID)) != null) | 488 | if ((fold = LibraryService.LibraryRootFolder.FindFolder(folderID)) != null) |
488 | { | 489 | { |
489 | remoteClient.SendInventoryFolderDetails( | 490 | remoteClient.SendInventoryFolderDetails( |
@@ -491,6 +492,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
491 | fold.RequestListOfFolders(), fold.Version, fetchFolders, fetchItems); | 492 | fold.RequestListOfFolders(), fold.Version, fetchFolders, fetchItems); |
492 | return; | 493 | return; |
493 | } | 494 | } |
495 | } | ||
494 | 496 | ||
495 | // We're going to send the reply async, because there may be | 497 | // We're going to send the reply async, because there may be |
496 | // an enormous quantity of packets -- basically the entire inventory! | 498 | // an enormous quantity of packets -- basically the entire inventory! |
@@ -511,64 +513,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
511 | SendInventoryDelegate d = (SendInventoryDelegate)iar.AsyncState; | 513 | SendInventoryDelegate d = (SendInventoryDelegate)iar.AsyncState; |
512 | d.EndInvoke(iar); | 514 | d.EndInvoke(iar); |
513 | } | 515 | } |
514 | |||
515 | /// <summary> | ||
516 | /// Handle the caps inventory descendents fetch. | ||
517 | /// | ||
518 | /// Since the folder structure is sent to the client on login, I believe we only need to handle items. | ||
519 | /// Diva comment 8/13/2009: what if someone gave us a folder in the meantime?? | ||
520 | /// </summary> | ||
521 | /// <param name="agentID"></param> | ||
522 | /// <param name="folderID"></param> | ||
523 | /// <param name="ownerID"></param> | ||
524 | /// <param name="fetchFolders"></param> | ||
525 | /// <param name="fetchItems"></param> | ||
526 | /// <param name="sortOrder"></param> | ||
527 | /// <returns>null if the inventory look up failed</returns> | ||
528 | public InventoryCollection HandleFetchInventoryDescendentsCAPS(UUID agentID, UUID folderID, UUID ownerID, | ||
529 | bool fetchFolders, bool fetchItems, int sortOrder, out int version) | ||
530 | { | ||
531 | m_log.DebugFormat( | ||
532 | "[INVENTORY CACHE]: Fetching folders ({0}), items ({1}) from {2} for agent {3}", | ||
533 | fetchFolders, fetchItems, folderID, agentID); | ||
534 | |||
535 | // FIXME MAYBE: We're not handling sortOrder! | ||
536 | |||
537 | // TODO: This code for looking in the folder for the library should be folded back into the | ||
538 | // CachedUserInfo so that this class doesn't have to know the details (and so that multiple libraries, etc. | ||
539 | // can be handled transparently). | ||
540 | InventoryFolderImpl fold; | ||
541 | if (LibraryService != null && LibraryService.LibraryRootFolder != null) | ||
542 | if ((fold = LibraryService.LibraryRootFolder.FindFolder(folderID)) != null) | ||
543 | { | ||
544 | version = 0; | ||
545 | InventoryCollection ret = new InventoryCollection(); | ||
546 | ret.Folders = new List<InventoryFolderBase>(); | ||
547 | ret.Items = fold.RequestListOfItems(); | ||
548 | |||
549 | return ret; | ||
550 | } | ||
551 | |||
552 | InventoryCollection contents = new InventoryCollection(); | ||
553 | |||
554 | if (folderID != UUID.Zero) | ||
555 | { | ||
556 | contents = InventoryService.GetFolderContent(agentID, folderID); | ||
557 | InventoryFolderBase containingFolder = new InventoryFolderBase(); | ||
558 | containingFolder.ID = folderID; | ||
559 | containingFolder.Owner = agentID; | ||
560 | containingFolder = InventoryService.GetFolder(containingFolder); | ||
561 | version = containingFolder.Version; | ||
562 | } | ||
563 | else | ||
564 | { | ||
565 | // Lost itemsm don't really need a version | ||
566 | version = 1; | ||
567 | } | ||
568 | |||
569 | return contents; | ||
570 | |||
571 | } | ||
572 | 516 | ||
573 | /// <summary> | 517 | /// <summary> |
574 | /// Handle an inventory folder creation request from the client. | 518 | /// Handle an inventory folder creation request from the client. |
@@ -643,14 +587,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
643 | } | 587 | } |
644 | } | 588 | } |
645 | 589 | ||
590 | delegate void PurgeFolderDelegate(UUID userID, UUID folder); | ||
591 | |||
646 | /// <summary> | 592 | /// <summary> |
647 | /// This should delete all the items and folders in the given directory. | 593 | /// This should delete all the items and folders in the given directory. |
648 | /// </summary> | 594 | /// </summary> |
649 | /// <param name="remoteClient"></param> | 595 | /// <param name="remoteClient"></param> |
650 | /// <param name="folderID"></param> | 596 | /// <param name="folderID"></param> |
651 | |||
652 | delegate void PurgeFolderDelegate(UUID userID, UUID folder); | ||
653 | |||
654 | public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, UUID folderID) | 597 | public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, UUID folderID) |
655 | { | 598 | { |
656 | PurgeFolderDelegate d = PurgeFolderAsync; | 599 | PurgeFolderDelegate d = PurgeFolderAsync; |
@@ -664,7 +607,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
664 | } | 607 | } |
665 | } | 608 | } |
666 | 609 | ||
667 | |||
668 | private void PurgeFolderAsync(UUID userID, UUID folderID) | 610 | private void PurgeFolderAsync(UUID userID, UUID folderID) |
669 | { | 611 | { |
670 | InventoryFolderBase folder = new InventoryFolderBase(folderID, userID); | 612 | InventoryFolderBase folder = new InventoryFolderBase(folderID, userID); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index d80944b..daddb90 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -832,8 +832,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
832 | invString.AddSectionEnd(); | 832 | invString.AddSectionEnd(); |
833 | 833 | ||
834 | invString.AddNameValueLine("asset_id", item.AssetID.ToString()); | 834 | invString.AddNameValueLine("asset_id", item.AssetID.ToString()); |
835 | invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]); | 835 | invString.AddNameValueLine("type", Utils.AssetTypeToString((AssetType)item.Type)); |
836 | invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]); | 836 | invString.AddNameValueLine("inv_type", Utils.InventoryTypeToString((InventoryType)item.InvType)); |
837 | invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags)); | 837 | invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags)); |
838 | 838 | ||
839 | invString.AddSaleStart(); | 839 | invString.AddSaleStart(); |