diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs index d9d7318..0d121ed 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs | |||
@@ -148,8 +148,29 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
148 | 148 | ||
149 | scene.RegisterModuleInterface<IInventoryService>(this); | 149 | scene.RegisterModuleInterface<IInventoryService>(this); |
150 | 150 | ||
151 | scene.EventManager.OnClientClosed += OnClientClosed; | 151 | if (m_Scenes.Count == 1) |
152 | { | ||
153 | // FIXME: The local connector needs the scene to extract the UserManager. However, it's not enabled so | ||
154 | // we can't just add the region. But this approach is super-messy. | ||
155 | if (m_LocalGridInventoryService is RemoteXInventoryServicesConnector) | ||
156 | { | ||
157 | m_log.DebugFormat( | ||
158 | "[HG INVENTORY BROKER]: Manually setting scene in RemoteXInventoryServicesConnector to {0}", | ||
159 | scene.RegionInfo.RegionName); | ||
160 | |||
161 | ((RemoteXInventoryServicesConnector)m_LocalGridInventoryService).Scene = scene; | ||
162 | } | ||
163 | else if (m_LocalGridInventoryService is LocalInventoryServicesConnector) | ||
164 | { | ||
165 | m_log.DebugFormat( | ||
166 | "[HG INVENTORY BROKER]: Manually setting scene in LocalInventoryServicesConnector to {0}", | ||
167 | scene.RegionInfo.RegionName); | ||
168 | |||
169 | ((LocalInventoryServicesConnector)m_LocalGridInventoryService).Scene = scene; | ||
170 | } | ||
152 | 171 | ||
172 | scene.EventManager.OnClientClosed += OnClientClosed; | ||
173 | } | ||
153 | } | 174 | } |
154 | 175 | ||
155 | public void RemoveRegion(Scene scene) | 176 | public void RemoveRegion(Scene scene) |
@@ -586,7 +607,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
586 | else | 607 | else |
587 | { | 608 | { |
588 | RemoteXInventoryServicesConnector rxisc = new RemoteXInventoryServicesConnector(url); | 609 | RemoteXInventoryServicesConnector rxisc = new RemoteXInventoryServicesConnector(url); |
589 | rxisc.UserManager = UserManagementModule; | 610 | rxisc.Scene = m_Scenes[0]; |
590 | connector = rxisc; | 611 | connector = rxisc; |
591 | } | 612 | } |
592 | 613 | ||
@@ -597,4 +618,4 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
597 | return connector; | 618 | return connector; |
598 | } | 619 | } |
599 | } | 620 | } |
600 | } | 621 | } \ No newline at end of file |