From 776b1f341aea5005a94bc3e03159619b3e9ce502 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Mon, 28 Apr 2008 14:41:46 +0000 Subject: From: Dr Scofield Note: This is the first part of some changes from Dr Scofield to support console-less operation of an OpenSim region server. The changes are not yet complete. * refactors OpenSimMain into two classes: OpenSimMain and OpenSimMainConsole. OpenSimMainConsole derives from OpenSimMain and basically is the "old" OpenSimMain * drops StartConsole from RegionApplicationBase (was only called from the "old" OpenSimMain anyhow) * reverts the changes to TryGetScene(string, out scene) as that seems to work perfectly fine * adds a check to region-remove to see whether m_sceneManger.CurrentScene is non-null before comparing it against the region-to-be-removed --- OpenSim/Region/Environment/Scenes/SceneManager.cs | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs index 4ded1a7..2dfea2a 100644 --- a/OpenSim/Region/Environment/Scenes/SceneManager.cs +++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs @@ -268,26 +268,15 @@ namespace OpenSim.Region.Environment.Scenes public bool TryGetScene(string regionName, out Scene scene) { - scene = null; - foreach (Scene mscene in m_localScenes) { - Console.Write("Region tested: " + mscene.RegionInfo.RegionName+" With ID: "+mscene.RegionInfo.RegionID.ToString()); - - - bool b = String.Compare(mscene.RegionInfo.RegionName.Trim(), regionName.Trim(), true) == 0; - - Console.WriteLine(" <==> Result: " + b.ToString()); - - if (b) + if (String.Compare(mscene.RegionInfo.RegionName, regionName, true) == 0) { - - Console.WriteLine("FOUND assigning region to out parameter"); scene = mscene; return true; } } - + scene = null; return false; } -- cgit v1.1