diff options
author | Justin Clark-Casey (justincc) | 2011-09-07 23:16:19 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-09-07 23:16:19 +0100 |
commit | 7cadb89a0f5a298beda619c395c0810ca198a718 (patch) | |
tree | 67c5a761d3626593e0f9939dc530c902ef4d7ca7 /OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs | |
parent | Add temporary debugging in HGInventoryBroker and RemoveXInventoryServiceConne... (diff) | |
download | opensim-SC_OLD-7cadb89a0f5a298beda619c395c0810ca198a718.zip opensim-SC_OLD-7cadb89a0f5a298beda619c395c0810ca198a718.tar.gz opensim-SC_OLD-7cadb89a0f5a298beda619c395c0810ca198a718.tar.bz2 opensim-SC_OLD-7cadb89a0f5a298beda619c395c0810ca198a718.tar.xz |
When a region is added to the HG Inventory Broker, also pass this through to the embedded local inventory connector to prevent an NRE when that connector tries to lookup the UserManager through the scene.
This is to address http://opensimulator.org/mantis/view.php?id=5669
However, if this failure was happening I'm kind of surprised that local HG inventory was working at all.....
We probably weren't seeing these exceptions previously because we weren't logging them when the reached the top of a FireAndForget thread.
Diffstat (limited to '')
-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 |