From 37ae6451f9ddb2e07402a5e79a9ab58668781104 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 3 Oct 2011 23:25:09 +0100
Subject: Remove vestigal RegionStatus.SlaveScene.

This appears to be code clutter since the code that uses this has long gone.
---
 OpenSim/Framework/IScene.cs                        |  3 -
 .../Region/ClientStack/Linden/UDP/LLUDPServer.cs   | 22 ++----
 OpenSim/Region/Framework/Scenes/Scene.cs           | 87 +++++++++++-----------
 3 files changed, 49 insertions(+), 63 deletions(-)

diff --git a/OpenSim/Framework/IScene.cs b/OpenSim/Framework/IScene.cs
index 8f7a2e5..e0cb897 100644
--- a/OpenSim/Framework/IScene.cs
+++ b/OpenSim/Framework/IScene.cs
@@ -33,15 +33,12 @@ namespace OpenSim.Framework
 {
     public delegate void restart(RegionInfo thisRegion);
 
-    //public delegate void regionup (RegionInfo thisRegion);
-
     public enum RegionStatus : int
     {
         Down = 0,
         Up = 1,
         Crashed = 2,
         Starting = 3,
-        SlaveScene = 4
     };
             
     /// <value>
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index f2388cd..304efe6 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -929,25 +929,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
             UUID sessionID = useCircuitCode.CircuitCode.SessionID;
             uint circuitCode = useCircuitCode.CircuitCode.Code;
 
-            if (m_scene.RegionStatus != RegionStatus.SlaveScene)
+            AuthenticateResponse sessionInfo;
+            if (IsClientAuthorized(useCircuitCode, out sessionInfo))
             {
-                AuthenticateResponse sessionInfo;
-                if (IsClientAuthorized(useCircuitCode, out sessionInfo))
-                {
-                    AddClient(circuitCode, agentID, sessionID, remoteEndPoint, sessionInfo);
-                }
-                else
-                {
-                    // Don't create circuits for unauthorized clients
-                    m_log.WarnFormat(
-                        "[LLUDPSERVER]: Connection request for client {0} connecting with unnotified circuit code {1} from {2}",
-                        useCircuitCode.CircuitCode.ID, useCircuitCode.CircuitCode.Code, remoteEndPoint);
-                }
+                AddClient(circuitCode, agentID, sessionID, remoteEndPoint, sessionInfo);
             }
             else
             {
-                // Slave regions don't accept new clients
-                m_log.Debug("[LLUDPSERVER]: Slave region " + m_scene.RegionInfo.RegionName + " ignoring UseCircuitCode packet");
+                // Don't create circuits for unauthorized clients
+                m_log.WarnFormat(
+                    "[LLUDPSERVER]: Connection request for client {0} connecting with unnotified circuit code {1} from {2}",
+                    useCircuitCode.CircuitCode.ID, useCircuitCode.CircuitCode.Code, remoteEndPoint);
             }
         }
 
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index eadec09..88b682b 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1278,56 +1278,53 @@ namespace OpenSim.Region.Framework.Scenes
                     tempOnRezMS = Util.EnvironmentTickCountSubtract(tmpTempOnRezMS);
                 }
 
-                if (RegionStatus != RegionStatus.SlaveScene)
+                if (Frame % m_update_events == 0)
                 {
-                    if (Frame % m_update_events == 0)
-                    {
-                        int evMS = Util.EnvironmentTickCount();
-                        UpdateEvents();
-                        eventMS = Util.EnvironmentTickCountSubtract(evMS); ;
-                    }
-
-                    if (Frame % m_update_backup == 0)
-                    {
-                        int backMS = Util.EnvironmentTickCount();
-                        UpdateStorageBackup();
-                        backupMS = Util.EnvironmentTickCountSubtract(backMS);
-                    }
-
-                    if (Frame % m_update_terrain == 0)
-                    {
-                        int terMS = Util.EnvironmentTickCount();
-                        UpdateTerrain();
-                        terrainMS = Util.EnvironmentTickCountSubtract(terMS);
-                    }
+                    int evMS = Util.EnvironmentTickCount();
+                    UpdateEvents();
+                    eventMS = Util.EnvironmentTickCountSubtract(evMS); ;
+                }
 
-                    //if (Frame % m_update_land == 0)
-                    //{
-                    //    int ldMS = Util.EnvironmentTickCount();
-                    //    UpdateLand();
-                    //    landMS = Util.EnvironmentTickCountSubtract(ldMS);
-                    //}
+                if (Frame % m_update_backup == 0)
+                {
+                    int backMS = Util.EnvironmentTickCount();
+                    UpdateStorageBackup();
+                    backupMS = Util.EnvironmentTickCountSubtract(backMS);
+                }
 
-                    frameMS = Util.EnvironmentTickCountSubtract(tmpFrameMS);
-                    otherMS = tempOnRezMS + eventMS + backupMS + terrainMS + landMS;
-                    lastCompletedFrame = Util.EnvironmentTickCount();
-
-                    // if (Frame%m_update_avatars == 0)
-                    //   UpdateInWorldTime();
-                    StatsReporter.AddPhysicsFPS(physicsFPS);
-                    StatsReporter.AddTimeDilation(TimeDilation);
-                    StatsReporter.AddFPS(1);
-                    StatsReporter.SetRootAgents(m_sceneGraph.GetRootAgentCount());
-                    StatsReporter.SetChildAgents(m_sceneGraph.GetChildAgentCount());
-                    StatsReporter.SetObjects(m_sceneGraph.GetTotalObjectsCount());
-                    StatsReporter.SetActiveObjects(m_sceneGraph.GetActiveObjectsCount());
-                    StatsReporter.addFrameMS(frameMS);
-                    StatsReporter.addPhysicsMS(physicsMS + physicsMS2);
-                    StatsReporter.addOtherMS(otherMS);
-                    StatsReporter.SetActiveScripts(m_sceneGraph.GetActiveScriptsCount());
-                    StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS());
+                if (Frame % m_update_terrain == 0)
+                {
+                    int terMS = Util.EnvironmentTickCount();
+                    UpdateTerrain();
+                    terrainMS = Util.EnvironmentTickCountSubtract(terMS);
                 }
 
+                //if (Frame % m_update_land == 0)
+                //{
+                //    int ldMS = Util.EnvironmentTickCount();
+                //    UpdateLand();
+                //    landMS = Util.EnvironmentTickCountSubtract(ldMS);
+                //}
+
+                frameMS = Util.EnvironmentTickCountSubtract(tmpFrameMS);
+                otherMS = tempOnRezMS + eventMS + backupMS + terrainMS + landMS;
+                lastCompletedFrame = Util.EnvironmentTickCount();
+
+                // if (Frame%m_update_avatars == 0)
+                //   UpdateInWorldTime();
+                StatsReporter.AddPhysicsFPS(physicsFPS);
+                StatsReporter.AddTimeDilation(TimeDilation);
+                StatsReporter.AddFPS(1);
+                StatsReporter.SetRootAgents(m_sceneGraph.GetRootAgentCount());
+                StatsReporter.SetChildAgents(m_sceneGraph.GetChildAgentCount());
+                StatsReporter.SetObjects(m_sceneGraph.GetTotalObjectsCount());
+                StatsReporter.SetActiveObjects(m_sceneGraph.GetActiveObjectsCount());
+                StatsReporter.addFrameMS(frameMS);
+                StatsReporter.addPhysicsMS(physicsMS + physicsMS2);
+                StatsReporter.addOtherMS(otherMS);
+                StatsReporter.SetActiveScripts(m_sceneGraph.GetActiveScriptsCount());
+                StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS());
+
                 if (LoginsDisabled && Frame == 20)
                 {
                     // In 99.9% of cases it is a bad idea to manually force garbage collection. However,
-- 
cgit v1.1