Merge branch 'master' into careminster-presence-refactor

avinationmerge
Melanie 2010-08-08 18:24:33 +01:00
commit 321e1148da
7 changed files with 112 additions and 11 deletions

View File

@ -169,7 +169,10 @@ namespace OpenSim.Data.Null
public List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y)
{
return Get((int)RegionFlags.FallbackRegion, scopeID);
List<RegionData> regions = Get((int)RegionFlags.FallbackRegion, scopeID);
RegionDataDistanceCompare distanceComparer = new RegionDataDistanceCompare(x, y);
regions.Sort(distanceComparer);
return regions;
}
public List<RegionData> GetHyperlinks(UUID scopeID)

View File

@ -901,6 +901,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
LLClientView client = new LLClientView(remoteEndPoint, m_scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode);
client.OnLogout += LogoutHandler;
client.DisableFacelights = m_disableFacelights;
// Start the IClientAPI
// Spin it off so that it doesn't clog up the LLUDPServer

View File

@ -57,6 +57,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests
config.Configs["Modules"].Set("GridServices", "LocalGridServicesConnector");
config.Configs["GridService"].Set("LocalServiceModule", "OpenSim.Services.GridService.dll:GridService");
config.Configs["GridService"].Set("StorageProvider", "OpenSim.Data.Null.dll");
config.Configs["GridService"].Set("Region_Test_Region_1", "DefaultRegion");
config.Configs["GridService"].Set("Region_Test_Region_2", "FallbackRegion");
config.Configs["GridService"].Set("Region_Test_Region_3", "FallbackRegion");
config.Configs["GridService"].Set("Region_Other_Region_4", "FallbackRegion");
m_LocalConnector = new LocalGridServicesConnector(config);
}
@ -69,7 +73,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests
{
SetUp();
// Create 3 regions
// Create 4 regions
GridRegion r1 = new GridRegion();
r1.RegionName = "Test Region 1";
r1.RegionID = new UUID(1);
@ -82,7 +86,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests
s.RegionInfo.RegionID = r1.RegionID;
m_LocalConnector.AddRegion(s);
GridRegion r2 = new GridRegion();
r2.RegionName = "Test Region 2";
r2.RegionID = new UUID(2);
@ -107,11 +110,28 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests
s.RegionInfo.RegionID = r3.RegionID;
m_LocalConnector.AddRegion(s);
GridRegion r4 = new GridRegion();
r4.RegionName = "Other Region 4";
r4.RegionID = new UUID(4);
r4.RegionLocX = 1004 * (int)Constants.RegionSize;
r4.RegionLocY = 1002 * (int)Constants.RegionSize;
r4.ExternalHostName = "127.0.0.1";
r4.HttpPort = 9004;
r4.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0);
s = new Scene(new RegionInfo());
s.RegionInfo.RegionID = r4.RegionID;
m_LocalConnector.AddRegion(s);
m_LocalConnector.RegisterRegion(UUID.Zero, r1);
GridRegion result = m_LocalConnector.GetRegionByName(UUID.Zero, "Test");
Assert.IsNotNull(result, "Retrieved GetRegionByName is null");
Assert.That(result.RegionName, Is.EqualTo("Test Region 1"), "Retrieved region's name does not match");
m_LocalConnector.RegisterRegion(UUID.Zero, r2);
m_LocalConnector.RegisterRegion(UUID.Zero, r3);
m_LocalConnector.RegisterRegion(UUID.Zero, r4);
result = m_LocalConnector.GetRegionByUUID(UUID.Zero, new UUID(1));
Assert.IsNotNull(result, "Retrieved GetRegionByUUID is null");
Assert.That(result.RegionID, Is.EqualTo(new UUID(1)), "Retrieved region's UUID does not match");
@ -120,23 +140,53 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests
Assert.IsNotNull(result, "Retrieved GetRegionByPosition is null");
Assert.That(result.RegionLocX, Is.EqualTo(1000 * (int)Constants.RegionSize), "Retrieved region's position does not match");
m_LocalConnector.RegisterRegion(UUID.Zero, r2);
m_LocalConnector.RegisterRegion(UUID.Zero, r3);
List<GridRegion> results = m_LocalConnector.GetNeighbours(UUID.Zero, new UUID(1));
Assert.IsNotNull(results, "Retrieved neighbours list is null");
Assert.That(results.Count, Is.EqualTo(1), "Retrieved neighbour collection is greater than expected");
Assert.That(results[0].RegionID, Is.EqualTo(new UUID(2)), "Retrieved region's UUID does not match");
results = m_LocalConnector.GetRegionsByName(UUID.Zero, "Test", 10);
Assert.IsNotNull(results, "Retrieved GetRegionsByName list is null");
Assert.IsNotNull(results, "Retrieved GetRegionsByName collection is null");
Assert.That(results.Count, Is.EqualTo(3), "Retrieved neighbour collection is less than expected");
results = m_LocalConnector.GetRegionRange(UUID.Zero, 900 * (int)Constants.RegionSize, 1002 * (int)Constants.RegionSize,
900 * (int)Constants.RegionSize, 1100 * (int)Constants.RegionSize);
Assert.IsNotNull(results, "Retrieved GetRegionRange list is null");
Assert.IsNotNull(results, "Retrieved GetRegionRange collection is null");
Assert.That(results.Count, Is.EqualTo(2), "Retrieved neighbour collection is not the number expected");
results = m_LocalConnector.GetDefaultRegions(UUID.Zero);
Assert.IsNotNull(results, "Retrieved GetDefaultRegions collection is null");
Assert.That(results.Count, Is.EqualTo(1), "Retrieved default regions collection has not the expected size");
Assert.That(results[0].RegionID, Is.EqualTo(new UUID(1)), "Retrieved default region's UUID does not match");
results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r1.RegionLocX, r1.RegionLocY);
Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 1 is null");
Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 1 has not the expected size");
Assert.That(results[0].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions for default region are not in the expected order 2-4-3");
Assert.That(results[1].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions for default region are not in the expected order 2-4-3");
Assert.That(results[2].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions for default region are not in the expected order 2-4-3");
results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r2.RegionLocX, r2.RegionLocY);
Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 2 is null");
Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 2 has not the expected size");
Assert.That(results[0].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions are not in the expected order 2-4-3");
Assert.That(results[1].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions are not in the expected order 2-4-3");
Assert.That(results[2].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions are not in the expected order 2-4-3");
results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r3.RegionLocX, r3.RegionLocY);
Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 3 is null");
Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 3 has not the expected size");
Assert.That(results[0].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions are not in the expected order 3-4-2");
Assert.That(results[1].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions are not in the expected order 3-4-2");
Assert.That(results[2].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions are not in the expected order 3-4-2");
results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r4.RegionLocX, r4.RegionLocY);
Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 4 is null");
Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 4 has not the expected size");
Assert.That(results[0].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions are not in the expected order 4-3-2");
Assert.That(results[1].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions are not in the expected order 4-3-2");
Assert.That(results[2].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions are not in the expected order 4-3-2");
results = m_LocalConnector.GetHyperlinks(UUID.Zero);
Assert.IsNotNull(results, "Retrieved GetHyperlinks list is null");
Assert.That(results.Count, Is.EqualTo(0), "Retrieved linked regions collection is not the number expected");

View File

@ -2317,8 +2317,8 @@ namespace OpenSim.Region.Framework.Scenes
/// </summary>
public void ScheduleGroupForFullUpdate()
{
//if (IsAttachment)
// m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1}", Name, LocalId);
// if (IsAttachment)
// m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1}", Name, LocalId);
checkAtTargets();
RootPart.ScheduleFullUpdate();

View File

@ -20,6 +20,7 @@
LibraryModule = true
LLLoginServiceInConnector = true
GridInfoServiceInConnector = true
[AssetService]
LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService"

View File

@ -76,3 +76,47 @@
; If false, HG TPs happen only to the Default regions specified in [GridService] section
AllowTeleportsToAnyRegion = true
[GridInfoService]
; These settings are used to return information on a get_grid_info call.
; Client launcher scripts and third-party clients make use of this to
; autoconfigure the client and to provide a nice user experience. If you
; want to facilitate that, you should configure the settings here according
; to your grid or standalone setup.
;
; See http://opensimulator.org/wiki/GridInfo
; login uri: for grid this is the login server URI
login = http://127.0.0.1:9000/
; long grid name: the long name of your grid
gridname = "the lost continent of hippo"
; short grid name: the short name of your grid
gridnick = "hippogrid"
; login page: optional: if it exists it will be used to tell the client to use
; this as splash page
; currently unused
;welcome = http://127.0.0.1/welcome
; helper uri: optional: if it exists if will be used to tell the client to use
; this for all economy related things
; currently unused
;economy = http://127.0.0.1:9000/
; web page of grid: optional: page providing further information about your grid
; currently unused
;about = http://127.0.0.1/about/
; account creation: optional: page providing further information about obtaining
; a user account on your grid
; currently unused
;register = http://127.0.0.1/register
; help: optional: page providing further assistance for users of your grid
; currently unused
;help = http://127.0.0.1/help
; password help: optional: page providing password assistance for users of your grid
; currently unused
;password = http://127.0.0.1/password

View File

@ -27,6 +27,7 @@
NeighbourServiceInConnector = true
LibraryModule = true
LLLoginServiceInConnector = true
GridInfoServiceInConnector = true
AuthenticationServiceInConnector = true
SimulationServiceInConnector = true