Some work on cleanly removing Regions.

afrisby
MW 2007-11-13 12:23:05 +00:00
parent 7f8a69f181
commit 297cc7ef4f
7 changed files with 87 additions and 30 deletions

View File

@ -439,6 +439,7 @@ namespace OpenSim.Framework
void SetDebug(int newDebug);
void InPacket(Packet NewPack);
void Close();
void Stop();
event ViewerEffectEventHandler OnViewerEffect;
event Action<IClientAPI> OnLogout;
event Action<IClientAPI> OnConnectionClosed;

View File

@ -435,10 +435,6 @@ namespace OpenSim
}
}
protected void ConnectToRemoteGridServer()
{
}
#endregion
/// <summary>

View File

@ -158,6 +158,16 @@ namespace OpenSim.Region.ClientStack
ClientThread.Abort();
}
public void Stop()
{
clientPingTimer.Stop();
libsecondlife.Packets.DisableSimulatorPacket disable = new libsecondlife.Packets.DisableSimulatorPacket();
OutPacket(disable);
ClientThread.Abort();
}
#endregion
# region Packet Handling

View File

@ -241,11 +241,26 @@ namespace OpenSim.Region.Environment.Scenes
#region Startup / Close Methods
public override void Close()
{
ForEachScenePresence(delegate(ScenePresence avatar)
{
avatar.ControllingClient.Stop();
});
m_heartbeatTimer.Close();
m_innerScene.Close();
m_sceneGridService.Close();
foreach (IRegionModule module in this.Modules.Values)
{
if (!module.IsSharedModule)
{
module.Close();
}
}
Modules.Clear();
base.Close();
}
/// <summary>

View File

@ -179,6 +179,35 @@ namespace OpenSim.Region.Environment.Scenes
}
}
public bool TryGetScene(string regionName, out Scene scene)
{
foreach (Scene mscene in m_localScenes)
{
if (String.Compare(mscene.RegionInfo.RegionName, regionName, true) == 0)
{
scene = mscene;
return true;
}
}
scene = null;
return false;
}
public bool TryGetScene(LLUUID regionID, out Scene scene)
{
foreach (Scene mscene in m_localScenes)
{
if (mscene.RegionInfo.RegionID == regionID)
{
scene = mscene;
return true;
}
}
scene = null;
return false;
}
public void SetDebugPacketOnCurrentScene(LogBase log, int newDebug)
{
ForEachCurrentScene(delegate(Scene scene)

View File

@ -1197,6 +1197,7 @@ namespace OpenSim.Region.Environment.Scenes
{
m_wearables[wearableId] = wearable;
SendOwnWearables();
}
private void SendOwnWearables()

View File

@ -427,6 +427,11 @@ namespace SimpleApp
{
}
public void Stop()
{
}
private uint m_circuitCode;
public uint CircuitCode