Fixed line endings from previous commit

remove-scene-viewer
Dan Lake 2011-10-06 23:20:51 -07:00
parent f26a966b8e
commit 4b46b7a5ad
3 changed files with 51 additions and 51 deletions

View File

@ -1109,7 +1109,7 @@ namespace OpenSim.Region.Framework.Scenes
// Kick all ROOT agents with the message, 'The simulator is going down' // Kick all ROOT agents with the message, 'The simulator is going down'
ForEachScenePresence(delegate(ScenePresence avatar) ForEachScenePresence(delegate(ScenePresence avatar)
{ {
avatar.RemoveNeighbourRegion(RegionInfo.RegionHandle); avatar.RemoveNeighbourRegion(RegionInfo.RegionHandle);
if (!avatar.IsChildAgent) if (!avatar.IsChildAgent)
@ -3102,7 +3102,7 @@ namespace OpenSim.Region.Framework.Scenes
avatar.Scene.NeedSceneCacheClear(avatar.UUID); avatar.Scene.NeedSceneCacheClear(avatar.UUID);
if (closeChildAgents && !avatar.IsChildAgent) if (closeChildAgents && !avatar.IsChildAgent)
{ {
List<ulong> regions = avatar.KnownRegionHandles; List<ulong> regions = avatar.KnownRegionHandles;
regions.Remove(RegionInfo.RegionHandle); regions.Remove(RegionInfo.RegionHandle);
m_sceneGridService.SendCloseChildAgentConnections(agentID, regions); m_sceneGridService.SendCloseChildAgentConnections(agentID, regions);

View File

@ -1075,10 +1075,10 @@ namespace OpenSim.Region.Framework.Scenes
public void StopFlying() public void StopFlying()
{ {
ControllingClient.StopFlying(this); ControllingClient.StopFlying(this);
} }
// neighbouring regions we have enabled a child agent in // neighbouring regions we have enabled a child agent in
// holds the seed cap for the child agent in that region // holds the seed cap for the child agent in that region
private Dictionary<ulong, string> m_knownChildRegions = new Dictionary<ulong, string>(); private Dictionary<ulong, string> m_knownChildRegions = new Dictionary<ulong, string>();
public void AddNeighbourRegion(ulong regionHandle, string cap) public void AddNeighbourRegion(ulong regionHandle, string cap)
@ -1095,12 +1095,12 @@ namespace OpenSim.Region.Framework.Scenes
} }
public void RemoveNeighbourRegion(ulong regionHandle) public void RemoveNeighbourRegion(ulong regionHandle)
{ {
lock (m_knownChildRegions) lock (m_knownChildRegions)
{ {
// Checking ContainsKey is redundant as Remove works either way and returns a bool // Checking ContainsKey is redundant as Remove works either way and returns a bool
// This is here to allow the Debug output to be conditional on removal // This is here to allow the Debug output to be conditional on removal
//if (m_knownChildRegions.ContainsKey(regionHandle)) //if (m_knownChildRegions.ContainsKey(regionHandle))
// m_log.DebugFormat(" !!! removing known region {0} in {1}. Count = {2}", regionHandle, Scene.RegionInfo.RegionName, m_knownChildRegions.Count); // m_log.DebugFormat(" !!! removing known region {0} in {1}. Count = {2}", regionHandle, Scene.RegionInfo.RegionName, m_knownChildRegions.Count);
m_knownChildRegions.Remove(regionHandle); m_knownChildRegions.Remove(regionHandle);
} }
@ -1113,39 +1113,39 @@ namespace OpenSim.Region.Framework.Scenes
RemoveNeighbourRegion(handle); RemoveNeighbourRegion(handle);
Scene.CapsModule.DropChildSeed(UUID, handle); Scene.CapsModule.DropChildSeed(UUID, handle);
} }
} }
public Dictionary<ulong, string> KnownRegions public Dictionary<ulong, string> KnownRegions
{ {
get get
{ {
lock (m_knownChildRegions) lock (m_knownChildRegions)
return new Dictionary<ulong, string>(m_knownChildRegions); return new Dictionary<ulong, string>(m_knownChildRegions);
} }
set set
{ {
// Replacing the reference is atomic but we still need to lock on // Replacing the reference is atomic but we still need to lock on
// the original dictionary object which may be in use elsewhere // the original dictionary object which may be in use elsewhere
lock (m_knownChildRegions) lock (m_knownChildRegions)
m_knownChildRegions = value; m_knownChildRegions = value;
} }
} }
public List<ulong> KnownRegionHandles public List<ulong> KnownRegionHandles
{ {
get get
{ {
return new List<ulong>(KnownRegions.Keys); return new List<ulong>(KnownRegions.Keys);
} }
} }
public int KnownRegionCount public int KnownRegionCount
{ {
get get
{ {
lock (m_knownChildRegions) lock (m_knownChildRegions)
return m_knownChildRegions.Count; return m_knownChildRegions.Count;
} }
} }
#endregion #endregion
@ -2986,13 +2986,13 @@ namespace OpenSim.Region.Framework.Scenes
/// <returns></returns> /// <returns></returns>
public void CloseChildAgents(uint newRegionX, uint newRegionY) public void CloseChildAgents(uint newRegionX, uint newRegionY)
{ {
List<ulong> byebyeRegions = new List<ulong>(); List<ulong> byebyeRegions = new List<ulong>();
List<ulong> knownRegions = KnownRegionHandles; List<ulong> knownRegions = KnownRegionHandles;
m_log.DebugFormat( m_log.DebugFormat(
"[SCENE PRESENCE]: Closing child agents. Checking {0} regions in {1}", "[SCENE PRESENCE]: Closing child agents. Checking {0} regions in {1}",
knownRegions.Count, Scene.RegionInfo.RegionName); knownRegions.Count, Scene.RegionInfo.RegionName);
//DumpKnownRegions(); //DumpKnownRegions();
foreach (ulong handle in knownRegions) foreach (ulong handle in knownRegions)
{ {
// Don't close the agent on this region yet // Don't close the agent on this region yet
@ -3434,10 +3434,10 @@ namespace OpenSim.Region.Framework.Scenes
public void Close() public void Close()
{ {
if (!IsChildAgent) if (!IsChildAgent)
m_scene.AttachmentsModule.DeleteAttachmentsFromScene(this, false); m_scene.AttachmentsModule.DeleteAttachmentsFromScene(this, false);
// Clear known regions // Clear known regions
KnownRegions = new Dictionary<ulong, string>(); KnownRegions = new Dictionary<ulong, string>();
lock (m_reprioritization_timer) lock (m_reprioritization_timer)
{ {

View File

@ -215,8 +215,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests
string cap = presence.ControllingClient.RequestClientInfo().CapsPath; string cap = presence.ControllingClient.RequestClientInfo().CapsPath;
presence.AddNeighbourRegion(region2, cap); presence.AddNeighbourRegion(region2, cap);
presence.AddNeighbourRegion(region3, cap); presence.AddNeighbourRegion(region3, cap);
Assert.That(presence.KnownRegionCount, Is.EqualTo(2)); Assert.That(presence.KnownRegionCount, Is.EqualTo(2));
} }