diff options
author | Melanie Thielker | 2009-03-22 15:42:22 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-03-22 15:42:22 +0000 |
commit | e6bb86a22428c6ed9e3d97e5347835e5e5cff598 (patch) | |
tree | e4c82542e73b0e048f0f0d1c3b6352515f4ad326 /OpenSim/Framework | |
parent | Fox a null ref in the inventory give module (diff) | |
download | opensim-SC_OLD-e6bb86a22428c6ed9e3d97e5347835e5e5cff598.zip opensim-SC_OLD-e6bb86a22428c6ed9e3d97e5347835e5e5cff598.tar.gz opensim-SC_OLD-e6bb86a22428c6ed9e3d97e5347835e5e5cff598.tar.bz2 opensim-SC_OLD-e6bb86a22428c6ed9e3d97e5347835e5e5cff598.tar.xz |
Add QueryItem method to secure inventory and HG inventory, change method sig to
provide additional information the HG needs.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | 21 | ||||
-rw-r--r-- | OpenSim/Framework/Communications/ISecureInventoryService.cs | 2 |
2 files changed, 16 insertions, 7 deletions
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs index 03569f6..4ea1e22 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | |||
@@ -773,23 +773,30 @@ namespace OpenSim.Framework.Communications.Cache | |||
773 | // The item will be added tot he local cache. Returns true if the item | 773 | // The item will be added tot he local cache. Returns true if the item |
774 | // was found and can be sent to the client | 774 | // was found and can be sent to the client |
775 | // | 775 | // |
776 | public bool QueryItem(UUID itemID) | 776 | public bool QueryItem(InventoryItemBase item) |
777 | { | 777 | { |
778 | if (m_hasReceivedInventory) | 778 | if (m_hasReceivedInventory) |
779 | { | 779 | { |
780 | InventoryItemBase item = RootFolder.FindItem(itemID); | 780 | InventoryItemBase invItem = RootFolder.FindItem(item.ID); |
781 | 781 | ||
782 | if (item != null) | 782 | if (invItem != null) |
783 | { | 783 | { |
784 | // Item is in local cache, just update client | 784 | // Item is in local cache, just update client |
785 | // | 785 | // |
786 | return true; | 786 | return true; |
787 | } | 787 | } |
788 | 788 | ||
789 | item = new InventoryItemBase(); | 789 | InventoryItemBase itemInfo = null; |
790 | item.ID = itemID; | 790 | |
791 | if (m_commsManager.SecureInventoryService != null) | ||
792 | { | ||
793 | m_commsManager.SecureInventoryService.QueryItem(item, m_session_id); | ||
794 | } | ||
795 | else | ||
796 | { | ||
797 | m_commsManager.InventoryService.QueryItem(item); | ||
798 | } | ||
791 | 799 | ||
792 | InventoryItemBase itemInfo = m_commsManager.InventoryService.QueryItem(item); | ||
793 | if (itemInfo != null) | 800 | if (itemInfo != null) |
794 | { | 801 | { |
795 | InventoryFolderImpl folder = RootFolder.FindFolder(itemInfo.Folder); | 802 | InventoryFolderImpl folder = RootFolder.FindFolder(itemInfo.Folder); |
@@ -804,7 +811,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
804 | AddRequest( | 811 | AddRequest( |
805 | new InventoryRequest( | 812 | new InventoryRequest( |
806 | Delegate.CreateDelegate(typeof(QueryItemDelegate), this, "QueryItem"), | 813 | Delegate.CreateDelegate(typeof(QueryItemDelegate), this, "QueryItem"), |
807 | new object[] { itemID })); | 814 | new object[] { item.ID })); |
808 | 815 | ||
809 | return true; | 816 | return true; |
810 | } | 817 | } |
diff --git a/OpenSim/Framework/Communications/ISecureInventoryService.cs b/OpenSim/Framework/Communications/ISecureInventoryService.cs index 6da13fe..d70dd0b 100644 --- a/OpenSim/Framework/Communications/ISecureInventoryService.cs +++ b/OpenSim/Framework/Communications/ISecureInventoryService.cs | |||
@@ -96,6 +96,8 @@ namespace OpenSim.Framework.Communications | |||
96 | /// <returns>true if the item was successfully deleted</returns> | 96 | /// <returns>true if the item was successfully deleted</returns> |
97 | bool DeleteItem(InventoryItemBase item, UUID session_id); | 97 | bool DeleteItem(InventoryItemBase item, UUID session_id); |
98 | 98 | ||
99 | InventoryItemBase QueryItem(InventoryItemBase item, UUID session_id); | ||
100 | |||
99 | /// <summary> | 101 | /// <summary> |
100 | /// Does the given user have an inventory structure? | 102 | /// Does the given user have an inventory structure? |
101 | /// </summary> | 103 | /// </summary> |