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
remove-scene-viewer
Justin Clark-Casey (justincc) 2011-09-05 22:55:48 +01:00
parent 9f75eaf50e
commit 5e579b71fd
2 changed files with 15 additions and 3 deletions

View File

@ -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;
}
}
}

View File

@ -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