Moved RegionUp to REST/LocalComms. The original functionality has been entirely maintained, although it will have to be revisited soon, because it's buggy.

This commit is contained in:
diva
2009-02-14 16:37:55 +00:00
parent d31bf02eaf
commit 217ffee8cb
6 changed files with 361 additions and 37 deletions

View File

@@ -422,6 +422,8 @@ namespace OpenSim.Region.Framework.Scenes
/// <returns>True after all operations complete, throws exceptions otherwise.</returns>
public override bool OtherRegionUp(RegionInfo otherRegion)
{
m_log.InfoFormat("[SCENE]: Region {0} up in coords {1}-{2}", otherRegion.RegionName, otherRegion.RegionLocX, otherRegion.RegionLocY);
if (RegionInfo.RegionHandle != otherRegion.RegionHandle)
{
for (int i = 0; i < m_neighbours.Count; i++)
@@ -517,6 +519,13 @@ namespace OpenSim.Region.Framework.Scenes
return found;
}
// Alias IncomingHelloNeighbour OtherRegionUp, for now
public bool IncomingHelloNeighbour(RegionInfo neighbour)
{
return OtherRegionUp(neighbour);
}
/// <summary>
/// Given float seconds, this will restart the region.
/// </summary>
@@ -2569,7 +2578,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="region"></param>
public void InformClientOfNeighbor(ScenePresence presence, RegionInfo region)
{
m_sceneGridService.InformNeighborChildAgent(presence, region, m_neighbours);
m_sceneGridService.InformNeighborChildAgent(presence, region);
}
/// <summary>

View File

@@ -459,7 +459,7 @@ namespace OpenSim.Region.Framework.Scenes
/// This informs a single neighboring region about agent "avatar".
/// Calls an asynchronous method to do so.. so it doesn't lag the sim.
/// </summary>
public void InformNeighborChildAgent(ScenePresence avatar, SimpleRegionInfo region, List<RegionInfo> neighbours)
public void InformNeighborChildAgent(ScenePresence avatar, SimpleRegionInfo region)
{
AgentCircuitData agent = avatar.ControllingClient.RequestClientInfo();
agent.BaseFolder = UUID.Zero;
@@ -493,8 +493,10 @@ namespace OpenSim.Region.Framework.Scenes
m_log.Info("[INTERGRID]: Starting to inform neighbors that I'm here");
//RegionUpData regiondata = new RegionUpData(region.RegionLocX, region.RegionLocY, region.ExternalHostName, region.InternalEndPoint.Port);
bool regionAccepted =
m_commsProvider.InterRegion.RegionUp(new SerializableRegionInfo(region), regionhandle);
//bool regionAccepted =
// m_commsProvider.InterRegion.RegionUp(new SerializableRegionInfo(region), regionhandle);
bool regionAccepted = m_interregionCommsOut.SendHelloNeighbour(regionhandle, region);
if (regionAccepted)
{
@@ -519,7 +521,7 @@ namespace OpenSim.Region.Framework.Scenes
{
//m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName);
List<SimpleRegionInfo> neighbours = new List<SimpleRegionInfo>();
// This stays uncached because we don't already know about our neighbors at this point.
neighbours = m_commsProvider.GridService.RequestNeighbours(m_regionInfo.RegionLocX, m_regionInfo.RegionLocY);