From e6bb86a22428c6ed9e3d97e5347835e5e5cff598 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 22 Mar 2009 15:42:22 +0000 Subject: Add QueryItem method to secure inventory and HG inventory, change method sig to provide additional information the HG needs. --- .../Communications/Hypergrid/HGInventoryService.cs | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'OpenSim/Region/Communications/Hypergrid') diff --git a/OpenSim/Region/Communications/Hypergrid/HGInventoryService.cs b/OpenSim/Region/Communications/Hypergrid/HGInventoryService.cs index 8296910..9d70c46 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGInventoryService.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGInventoryService.cs @@ -317,6 +317,29 @@ namespace OpenSim.Region.Communications.Hypergrid return false; } + + public InventoryItemBase QueryItem(InventoryItemBase item, UUID session_id) + { + if (IsLocalStandaloneUser(item.Owner)) + { + return base.QueryItem(item); + } + + try + { + string invServ = GetUserInventoryURI(item.Owner); + + return SynchronousRestSessionObjectPoster.BeginPostObject( + "POST", invServ + "/QueryItem/", item, session_id.ToString(), item.Owner.ToString()); + } + catch (WebException e) + { + m_log.ErrorFormat("[HGrid INVENTORY SERVICE]: Query inventory item operation failed, {0} {1}", + e.Source, e.Message); + } + + return null; + } #endregion #region Methods common to ISecureInventoryService and IInventoryService -- cgit v1.1