From ac31cb89d59b1d9be84df94ef3f26cad8624c452 Mon Sep 17 00:00:00 2001 From: "Teravus Ovares (Dan Olivares)" Date: Fri, 16 Oct 2009 16:22:10 -0400 Subject: [PATCH 1/2] * Ensure that at least 20 frames run before letting avatar in. --- OpenSim/Region/Framework/Scenes/Scene.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index d3d397dde2..c4622cd7d8 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -128,6 +128,7 @@ namespace OpenSim.Region.Framework.Scenes public CommunicationsManager CommsManager; protected SceneCommunicationService m_sceneGridService; + public bool loginsdisabled = true; public SceneCommunicationService SceneGridService { @@ -1062,6 +1063,11 @@ namespace OpenSim.Region.Framework.Scenes StatsReporter.SetActiveScripts(m_sceneGraph.GetActiveScriptsCount()); StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS()); } + if (loginsdisabled && ((m_frame % 20) == 0)) + { + m_log.Debug("[REGION]: Enabling Logins"); + loginsdisabled = false; + } } catch (NotImplementedException) { @@ -3227,6 +3233,11 @@ namespace OpenSim.Region.Framework.Scenes /// also return a reason. public bool NewUserConnection(AgentCircuitData agent, out string reason) { + if (loginsdisabled) + { + reason = "Logins Disabled"; + return false; + } // Don't disable this log message - it's too helpful m_log.InfoFormat( "[CONNECTION BEGIN]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5})", From f5964347bdb7df75ec41dcdfc7e9f648caa18ee2 Mon Sep 17 00:00:00 2001 From: "Teravus Ovares (Dan Olivares)" Date: Fri, 16 Oct 2009 16:25:48 -0400 Subject: [PATCH 2/2] * fix previous commit --- OpenSim/Region/Framework/Scenes/Scene.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index c4622cd7d8..29d2a84f0d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1063,7 +1063,7 @@ namespace OpenSim.Region.Framework.Scenes StatsReporter.SetActiveScripts(m_sceneGraph.GetActiveScriptsCount()); StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS()); } - if (loginsdisabled && ((m_frame % 20) == 0)) + if (loginsdisabled && (m_frame > 20)) { m_log.Debug("[REGION]: Enabling Logins"); loginsdisabled = false;