Merge branch 'master' into httptests
commit
62d0e50ca4
|
@ -51,7 +51,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
private static string LogHeader = "[LOCAL GRID SERVICE CONNECTOR]";
|
private static string LogHeader = "[LOCAL GRID SERVICE CONNECTOR]";
|
||||||
|
|
||||||
private IGridService m_GridService;
|
private IGridService m_GridService;
|
||||||
private RegionInfoCache m_RegionInfoCache = null;
|
private RegionInfoCache m_RegionInfoCache;
|
||||||
|
|
||||||
private bool m_Enabled;
|
private bool m_Enabled;
|
||||||
|
|
||||||
|
@ -60,9 +60,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
m_log.DebugFormat("{0} LocalGridServicesConnector no parms.", LogHeader);
|
m_log.DebugFormat("{0} LocalGridServicesConnector no parms.", LogHeader);
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalGridServicesConnector(IConfigSource source, RegionInfoCache regionInfoCache)
|
public LocalGridServicesConnector(IConfigSource source)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("{0} LocalGridServicesConnector instantiated directly.", LogHeader);
|
m_log.DebugFormat("{0} LocalGridServicesConnector instantiated directly.", LogHeader);
|
||||||
|
InitialiseService(source, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalGridServicesConnector(IConfigSource source, RegionInfoCache regionInfoCache)
|
||||||
|
{
|
||||||
|
m_log.DebugFormat("{0} LocalGridServicesConnector instantiated directly witj cache.", LogHeader);
|
||||||
InitialiseService(source, regionInfoCache);
|
InitialiseService(source, regionInfoCache);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,7 +92,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
string name = moduleConfig.GetString("GridServices", "");
|
string name = moduleConfig.GetString("GridServices", "");
|
||||||
if (name == Name)
|
if (name == Name)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(InitialiseService(source, null))
|
if(InitialiseService(source, null))
|
||||||
m_log.Info("[LOCAL GRID SERVICE CONNECTOR]: Local grid connector enabled");
|
m_log.Info("[LOCAL GRID SERVICE CONNECTOR]: Local grid connector enabled");
|
||||||
}
|
}
|
||||||
|
@ -95,7 +100,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
|
|
||||||
private bool InitialiseService(IConfigSource source, RegionInfoCache ric)
|
private bool InitialiseService(IConfigSource source, RegionInfoCache ric)
|
||||||
{
|
{
|
||||||
if(ric == null)
|
if(ric == null && m_RegionInfoCache == null)
|
||||||
m_RegionInfoCache = new RegionInfoCache();
|
m_RegionInfoCache = new RegionInfoCache();
|
||||||
else
|
else
|
||||||
m_RegionInfoCache = ric;
|
m_RegionInfoCache = ric;
|
||||||
|
@ -150,7 +155,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
|
|
||||||
scene.RegisterModuleInterface<IGridService>(this);
|
scene.RegisterModuleInterface<IGridService>(this);
|
||||||
|
|
||||||
m_RegionInfoCache.CacheLocal(new GridRegion(scene.RegionInfo));
|
GridRegion r = new GridRegion(scene.RegionInfo);
|
||||||
|
m_RegionInfoCache.CacheLocal(r);
|
||||||
|
|
||||||
scene.EventManager.OnRegionUp += OnRegionUp;
|
scene.EventManager.OnRegionUp += OnRegionUp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
private IGridService m_LocalGridService;
|
private IGridService m_LocalGridService;
|
||||||
private IGridService m_RemoteGridService;
|
private IGridService m_RemoteGridService;
|
||||||
|
|
||||||
private RegionInfoCache m_RegionInfoCache = new RegionInfoCache();
|
private RegionInfoCache m_RegionInfoCache;
|
||||||
|
|
||||||
public RemoteGridServicesConnector()
|
public RemoteGridServicesConnector()
|
||||||
{
|
{
|
||||||
|
@ -122,6 +122,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(m_RegionInfoCache == null)
|
||||||
|
m_RegionInfoCache = new RegionInfoCache();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -156,6 +156,9 @@ namespace OpenSim.Tests.Common
|
||||||
TestScene testScene = new TestScene(
|
TestScene testScene = new TestScene(
|
||||||
regInfo, m_acm, SimDataService, m_estateDataService, configSource, null);
|
regInfo, m_acm, SimDataService, m_estateDataService, configSource, null);
|
||||||
|
|
||||||
|
testScene.RegionInfo.EstateSettings = new EstateSettings();
|
||||||
|
testScene.RegionInfo.EstateSettings.EstateOwner = UUID.Random();
|
||||||
|
|
||||||
INonSharedRegionModule godsModule = new GodsModule();
|
INonSharedRegionModule godsModule = new GodsModule();
|
||||||
godsModule.Initialise(new IniConfigSource());
|
godsModule.Initialise(new IniConfigSource());
|
||||||
godsModule.AddRegion(testScene);
|
godsModule.AddRegion(testScene);
|
||||||
|
@ -197,13 +200,12 @@ namespace OpenSim.Tests.Common
|
||||||
m_presenceService.RegionLoaded(testScene);
|
m_presenceService.RegionLoaded(testScene);
|
||||||
testScene.AddRegionModule(m_presenceService.Name, m_presenceService);
|
testScene.AddRegionModule(m_presenceService.Name, m_presenceService);
|
||||||
|
|
||||||
testScene.RegionInfo.EstateSettings.EstateOwner = UUID.Random();
|
|
||||||
testScene.SetModuleInterfaces();
|
testScene.SetModuleInterfaces();
|
||||||
|
|
||||||
testScene.LandChannel = new TestLandChannel(testScene);
|
testScene.LandChannel = new TestLandChannel(testScene);
|
||||||
testScene.LoadWorldMap();
|
testScene.LoadWorldMap();
|
||||||
|
|
||||||
testScene.RegionInfo.EstateSettings = new EstateSettings();
|
|
||||||
testScene.LoginsEnabled = true;
|
testScene.LoginsEnabled = true;
|
||||||
testScene.RegisterRegionWithGrid();
|
testScene.RegisterRegionWithGrid();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue