aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-09-07 23:16:19 +0100
committerJustin Clark-Casey (justincc)2011-09-07 23:16:19 +0100
commit7cadb89a0f5a298beda619c395c0810ca198a718 (patch)
tree67c5a761d3626593e0f9939dc530c902ef4d7ca7 /OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs
parentAdd temporary debugging in HGInventoryBroker and RemoveXInventoryServiceConne... (diff)
downloadopensim-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/RemoteXInventoryServiceConnector.cs22
1 files changed, 9 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs
index 97fdd4e..eb90774 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs
@@ -45,6 +45,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
45 private static readonly ILog m_log = 45 private static readonly ILog m_log =
46 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 47
48 /// <summary>
49 /// Scene used by this module. This currently needs to be publicly settable for HGInventoryBroker.
50 /// </summary>
51 public Scene Scene { get; set; }
52
48 private bool m_Enabled = false; 53 private bool m_Enabled = false;
49 private Scene m_Scene; 54 private Scene m_Scene;
50 private XInventoryServicesConnector m_RemoteConnector; 55 private XInventoryServicesConnector m_RemoteConnector;
@@ -56,24 +61,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
56 { 61 {
57 if (m_UserManager == null) 62 if (m_UserManager == null)
58 { 63 {
59 m_UserManager = m_Scene.RequestModuleInterface<IUserManagement>(); 64 m_UserManager = Scene.RequestModuleInterface<IUserManagement>();
60 65
61 if (m_UserManager == null) 66 if (m_UserManager == null)
62 m_log.ErrorFormat( 67 m_log.ErrorFormat(
63 "[XINVENTORY CONNECTOR]: Could not retrieve IUserManagement module from {0}", 68 "[XINVENTORY CONNECTOR]: Could not retrieve IUserManagement module from {0}",
64 m_Scene.RegionInfo.RegionName); 69 Scene.RegionInfo.RegionName);
65 } 70 }
66 71
67 return m_UserManager; 72 return m_UserManager;
68 } 73 }
69
70 set
71 {
72 m_log.WarnFormat(
73 "[XINVENTORY CONNECTOR]: Manually setting UserManager {0} (scene {1})", value, m_Scene);
74
75 m_UserManager = value;
76 }
77 } 74 }
78 75
79 public Type ReplaceableInterface 76 public Type ReplaceableInterface
@@ -141,15 +138,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
141 138
142 scene.RegisterModuleInterface<IInventoryService>(this); 139 scene.RegisterModuleInterface<IInventoryService>(this);
143 140
144 if (m_Scene == null) 141 if (Scene == null)
145 m_Scene = scene; 142 Scene = scene;
146 } 143 }
147 144
148 public void RemoveRegion(Scene scene) 145 public void RemoveRegion(Scene scene)
149 { 146 {
150 if (!m_Enabled) 147 if (!m_Enabled)
151 return; 148 return;
152
153 } 149 }
154 150
155 public void RegionLoaded(Scene scene) 151 public void RegionLoaded(Scene scene)