* Restaring the sim works fine in grid mode now. Sims announce themselves to their neighbors when they start up. Neighbors get this message and tell their agents that there's a new sim up.

* Certain unrecoverable physics based crashes in ODE are now hooked up to the 'restart the sim' routine.
This commit is contained in:
Teravus Ovares
2007-11-28 06:18:07 +00:00
parent f3895c1e01
commit b7d596a6af
13 changed files with 354 additions and 47 deletions

View File

@@ -106,7 +106,6 @@ namespace OpenSim.Region.Communications.Local
return regionHost;
}
return null;
}
public bool DeregisterRegion(RegionInfo regionInfo)
@@ -201,8 +200,9 @@ namespace OpenSim.Region.Communications.Local
/// <param name="agentData"></param>
/// <returns></returns>
///
public bool RegionUp(RegionInfo region)
public bool RegionUp(SearializableRegionInfo sregion)
{
RegionInfo region = new RegionInfo(sregion);
foreach (RegionCommsListener listener in m_regionListeners.Values)
{
listener.TriggerRegionUp(region);
@@ -213,8 +213,13 @@ namespace OpenSim.Region.Communications.Local
public bool TriggerRegionUp(RegionInfo region)
{
foreach (RegionCommsListener listener in m_regionListeners.Values)
{
listener.TriggerRegionUp(region);
}
return false;
return true;
}
public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData)

View File

@@ -133,14 +133,10 @@ namespace OpenSim.Region.Communications.OGS1
}
else
{
//m_knownRegions = RequestNeighbours(regionInfo.RegionLocX, regionInfo.RegionLocY);
m_knownRegions = RequestNeighbours(regionInfo.RegionLocX, regionInfo.RegionLocY);
}
//SimpleRegionInfo regiondata = new SimpleRegionInfo();
//regiondata.RegionID = griddatahash["UUID"];
//regiondata.RemotingAddress =
return m_localBackend.RegisterRegion(regionInfo);
}
@@ -458,7 +454,7 @@ namespace OpenSim.Region.Communications.OGS1
InterRegionSingleton.Instance.OnPrimGroupArrival += IncomingPrim;
InterRegionSingleton.Instance.OnPrimGroupNear += TriggerExpectPrimCrossing;
InterRegionSingleton.Instance.OnRegionUp += TriggerRegionUp;
InterRegionSingleton.Instance.OnRegionUp += RegionUp;
//InterRegionSingleton.Instance.OnRegionUp += RegionUp;
}
#region Methods called by regions in this instance
@@ -541,11 +537,10 @@ namespace OpenSim.Region.Communications.OGS1
MainLog.Instance.Debug(e.ToString());
return false;
}
return true;
}
// UGLY!
public bool RegionUp(RegionInfo region)
public bool RegionUp(SearializableRegionInfo region)
{
// This is stupid. For this to work, when the region registers it must request nearby map blocks.
@@ -558,11 +553,11 @@ namespace OpenSim.Region.Communications.OGS1
{
return true;
}
return true;
foreach (SimpleRegionInfo knownregion in m_knownRegions)
{
// Wha?
RegionInfo regInfo = RequestNeighbourInfo(knownregion.RegionID);
SearializableRegionInfo regInfo = new SearializableRegionInfo(RequestNeighbourInfo(knownregion.RegionID));
try
{
@@ -572,7 +567,7 @@ namespace OpenSim.Region.Communications.OGS1
//don't want to be creating a new link to the remote instance every time like we are here
bool retValue = false;
OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject(
typeof(OGS1InterRegionRemoting),
"tcp://" + regInfo.RemotingAddress +
@@ -588,38 +583,38 @@ namespace OpenSim.Region.Communications.OGS1
Console.WriteLine("remoting object not found");
}
remObject = null;
//MainLog.Instance.Verbose("INTER", gdebugRegionName + ": OGS1 tried to NotifyRegionUp for " + region.RegionName + " and got " + retValue.ToString());
MainLog.Instance.Verbose("INTER", gdebugRegionName + ": OGS1 tried to NotifyRegionUp for " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
}
}
catch (RemotingException e)
{
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
MainLog.Instance.Debug(e.ToString());
//return false;
}
catch (SocketException e)
{
MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
MainLog.Instance.Debug(e.ToString());
//return false;
}
catch (InvalidCredentialException e)
{
MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
MainLog.Instance.Debug(e.ToString());
//return false;
}
catch (AuthenticationException e)
{
MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
MainLog.Instance.Debug(e.ToString());
//return false;
}
catch (Exception e)
{
MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
MainLog.Instance.Debug(e.ToString());
//return false;
}
@@ -702,7 +697,6 @@ namespace OpenSim.Region.Communications.OGS1
MainLog.Instance.Debug(e.ToString());
return false;
}
return true;
}
/// <summary>
///
@@ -843,13 +837,13 @@ namespace OpenSim.Region.Communications.OGS1
}
}
public bool TriggerRegionUp(RegionInfo regionData)
public bool TriggerRegionUp(SearializableRegionInfo regionData)
{
//MainLog.Instance.Verbose("INTER", gdebugRegionName + ": Incoming OGS1 RegionUpReport " + regionData.RegionName);
MainLog.Instance.Verbose("INTER", gdebugRegionName + ": Incoming OGS1 RegionUpReport: " + regionData.RegionLocX + "," + regionData.RegionLocY);
try
{
return m_localBackend.TriggerRegionUp(regionData);
return m_localBackend.TriggerRegionUp(new RegionInfo(regionData));
}
catch (RemotingException e)

View File

@@ -41,7 +41,7 @@ namespace OpenSim.Region.Communications.OGS1
public delegate bool PrimGroupArrival(ulong regionHandle, LLUUID primID, string objData);
public delegate bool RegionUP (RegionInfo region);
public delegate bool RegionUp (SearializableRegionInfo region);
public sealed class InterRegionSingleton
{
@@ -76,11 +76,12 @@ namespace OpenSim.Region.Communications.OGS1
return false;
}
public bool RegionUp(RegionInfo region)
public bool RegionUp(SearializableRegionInfo sregion)
{
if (OnRegionUp != null)
{
return OnRegionUp(region);
return OnRegionUp(sregion);
}
return false;
}
@@ -129,7 +130,7 @@ namespace OpenSim.Region.Communications.OGS1
return false;
}
}
public bool RegionUp(RegionInfo region)
public bool RegionUp(SearializableRegionInfo region)
{
try
{
@@ -141,6 +142,7 @@ namespace OpenSim.Region.Communications.OGS1
return false;
}
}
public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying)
{
try