diff options
3 files changed, 23 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs index 58bd4ea..d38ac9b 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs | |||
@@ -51,7 +51,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
51 | private static string LogHeader = "[LOCAL GRID SERVICE CONNECTOR]"; | 51 | private static string LogHeader = "[LOCAL GRID SERVICE CONNECTOR]"; |
52 | 52 | ||
53 | private IGridService m_GridService; | 53 | private IGridService m_GridService; |
54 | private RegionInfoCache m_RegionInfoCache = null; | 54 | private RegionInfoCache m_RegionInfoCache; |
55 | 55 | ||
56 | private bool m_Enabled; | 56 | private bool m_Enabled; |
57 | 57 | ||
@@ -60,9 +60,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
60 | m_log.DebugFormat("{0} LocalGridServicesConnector no parms.", LogHeader); | 60 | m_log.DebugFormat("{0} LocalGridServicesConnector no parms.", LogHeader); |
61 | } | 61 | } |
62 | 62 | ||
63 | public LocalGridServicesConnector(IConfigSource source, RegionInfoCache regionInfoCache) | 63 | public LocalGridServicesConnector(IConfigSource source) |
64 | { | 64 | { |
65 | m_log.DebugFormat("{0} LocalGridServicesConnector instantiated directly.", LogHeader); | 65 | m_log.DebugFormat("{0} LocalGridServicesConnector instantiated directly.", LogHeader); |
66 | InitialiseService(source, null); | ||
67 | } | ||
68 | |||
69 | public LocalGridServicesConnector(IConfigSource source, RegionInfoCache regionInfoCache) | ||
70 | { | ||
71 | m_log.DebugFormat("{0} LocalGridServicesConnector instantiated directly witj cache.", LogHeader); | ||
66 | InitialiseService(source, regionInfoCache); | 72 | InitialiseService(source, regionInfoCache); |
67 | } | 73 | } |
68 | 74 | ||
@@ -85,9 +91,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
85 | { | 91 | { |
86 | string name = moduleConfig.GetString("GridServices", ""); | 92 | string name = moduleConfig.GetString("GridServices", ""); |
87 | if (name == Name) | 93 | if (name == Name) |
88 | { | 94 | { |
89 | 95 | if(InitialiseService(source, null)) | |
90 | if(InitialiseService(source,null)) | ||
91 | m_log.Info("[LOCAL GRID SERVICE CONNECTOR]: Local grid connector enabled"); | 96 | m_log.Info("[LOCAL GRID SERVICE CONNECTOR]: Local grid connector enabled"); |
92 | } | 97 | } |
93 | } | 98 | } |
@@ -95,7 +100,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
95 | 100 | ||
96 | private bool InitialiseService(IConfigSource source, RegionInfoCache ric) | 101 | private bool InitialiseService(IConfigSource source, RegionInfoCache ric) |
97 | { | 102 | { |
98 | if(ric == null) | 103 | if(ric == null && m_RegionInfoCache == null) |
99 | m_RegionInfoCache = new RegionInfoCache(); | 104 | m_RegionInfoCache = new RegionInfoCache(); |
100 | else | 105 | else |
101 | m_RegionInfoCache = ric; | 106 | m_RegionInfoCache = ric; |
@@ -150,7 +155,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
150 | 155 | ||
151 | scene.RegisterModuleInterface<IGridService>(this); | 156 | scene.RegisterModuleInterface<IGridService>(this); |
152 | 157 | ||
153 | m_RegionInfoCache.CacheLocal(new GridRegion(scene.RegionInfo)); | 158 | GridRegion r = new GridRegion(scene.RegionInfo); |
159 | m_RegionInfoCache.CacheLocal(r); | ||
160 | |||
154 | scene.EventManager.OnRegionUp += OnRegionUp; | 161 | scene.EventManager.OnRegionUp += OnRegionUp; |
155 | } | 162 | } |
156 | 163 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs index 21f7567..96ff4b3 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs | |||
@@ -56,7 +56,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
56 | private IGridService m_LocalGridService; | 56 | private IGridService m_LocalGridService; |
57 | private IGridService m_RemoteGridService; | 57 | private IGridService m_RemoteGridService; |
58 | 58 | ||
59 | private RegionInfoCache m_RegionInfoCache = new RegionInfoCache(); | 59 | private RegionInfoCache m_RegionInfoCache; |
60 | 60 | ||
61 | public RemoteGridServicesConnector() | 61 | public RemoteGridServicesConnector() |
62 | { | 62 | { |
@@ -122,6 +122,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
122 | return false; | 122 | return false; |
123 | } | 123 | } |
124 | 124 | ||
125 | if(m_RegionInfoCache == null) | ||
126 | m_RegionInfoCache = new RegionInfoCache(); | ||
127 | |||
125 | return true; | 128 | return true; |
126 | } | 129 | } |
127 | 130 | ||
diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs index bdf217c..f8485e0 100644 --- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs | |||
@@ -156,6 +156,9 @@ namespace OpenSim.Tests.Common | |||
156 | TestScene testScene = new TestScene( | 156 | TestScene testScene = new TestScene( |
157 | regInfo, m_acm, SimDataService, m_estateDataService, configSource, null); | 157 | regInfo, m_acm, SimDataService, m_estateDataService, configSource, null); |
158 | 158 | ||
159 | testScene.RegionInfo.EstateSettings = new EstateSettings(); | ||
160 | testScene.RegionInfo.EstateSettings.EstateOwner = UUID.Random(); | ||
161 | |||
159 | INonSharedRegionModule godsModule = new GodsModule(); | 162 | INonSharedRegionModule godsModule = new GodsModule(); |
160 | godsModule.Initialise(new IniConfigSource()); | 163 | godsModule.Initialise(new IniConfigSource()); |
161 | godsModule.AddRegion(testScene); | 164 | godsModule.AddRegion(testScene); |
@@ -197,13 +200,12 @@ namespace OpenSim.Tests.Common | |||
197 | m_presenceService.RegionLoaded(testScene); | 200 | m_presenceService.RegionLoaded(testScene); |
198 | testScene.AddRegionModule(m_presenceService.Name, m_presenceService); | 201 | testScene.AddRegionModule(m_presenceService.Name, m_presenceService); |
199 | 202 | ||
200 | testScene.RegionInfo.EstateSettings.EstateOwner = UUID.Random(); | 203 | |
201 | testScene.SetModuleInterfaces(); | 204 | testScene.SetModuleInterfaces(); |
202 | 205 | ||
203 | testScene.LandChannel = new TestLandChannel(testScene); | 206 | testScene.LandChannel = new TestLandChannel(testScene); |
204 | testScene.LoadWorldMap(); | 207 | testScene.LoadWorldMap(); |
205 | 208 | ||
206 | testScene.RegionInfo.EstateSettings = new EstateSettings(); | ||
207 | testScene.LoginsEnabled = true; | 209 | testScene.LoginsEnabled = true; |
208 | testScene.RegisterRegionWithGrid(); | 210 | testScene.RegisterRegionWithGrid(); |
209 | 211 | ||