From 5e579b71fdd51fc840ddbece99322e1f9c9be805 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 5 Sep 2011 22:55:48 +0100 Subject: Allow the HGInventoryBroker to set the UserManager when it instantiates a RemoteXInventoryServiceConnector for a visiting HG user. Not doing this causes NREs whenever that user tries to access inventory when Hypergrid is turned on since the Remote connector does not have a scene (which is only used to fetch the UserManager) Aims to address http://opensimulator.org/mantis/view.php?id=5669 --- .../ServiceConnectorsOut/Inventory/HGInventoryBroker.cs | 11 +++++++++-- .../Inventory/RemoteXInventoryServiceConnector.cs | 7 ++++++- 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs index 72ae3363..f9e4bb9 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs @@ -572,14 +572,21 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory string connectorType = new HeloServicesConnector(url).Helo(); m_log.DebugFormat("[HG INVENTORY SERVICE]: HELO returned {0}", connectorType); if (connectorType == "opensim-simian") + { connector = new SimianInventoryServiceConnector(url); + } else - connector = new RemoteXInventoryServicesConnector(url); + { + RemoteXInventoryServicesConnector rxisc = new RemoteXInventoryServicesConnector(url); + rxisc.UserManager = UserManagementModule; + connector = rxisc; + } + m_connectors.Add(url, connector); } } + return connector; } - } } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs index 8f1f257..4a3ccc5 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs @@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory private XInventoryServicesConnector m_RemoteConnector; private IUserManagement m_UserManager; - private IUserManagement UserManager + public IUserManagement UserManager { get { @@ -60,6 +60,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory } return m_UserManager; } + + set + { + m_UserManager = value; + } } public Type ReplaceableInterface -- cgit v1.1