From 8aae9094128069b83fbf11cb77503e29fd381b25 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Thu, 20 Dec 2007 06:31:03 +0000 Subject: * Added a configuration parameter on the Grid Server to disallow forceful banlists. * Added a way for Grid based configuration parameters to (generally used in overriding functionality) to get to the regions on Registration. --- .../Communications/Local/LocalBackEndServices.cs | 22 ++++++++++++++++++ .../Region/Communications/OGS1/OGS1GridServices.cs | 27 +++++++++++++++++++++- 2 files changed, 48 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Communications') diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs index f57de1c..f6137f7 100644 --- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs +++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs @@ -43,6 +43,8 @@ namespace OpenSim.Region.Communications.Local private Dictionary m_remoteRegionInfoCache = new Dictionary(); + private Dictionary m_queuedGridSettings = new Dictionary(); + public string _gdebugRegionName = ""; public string gdebugRegionName @@ -218,6 +220,26 @@ namespace OpenSim.Region.Communications.Local return false; } + // This function Is only here to keep this class in line with the Grid Interface. + // It never gets called. + public virtual Dictionary GetGridSettings() + { + Dictionary returnGridSettings = new Dictionary(); + lock (m_queuedGridSettings) + { + returnGridSettings = m_queuedGridSettings; + m_queuedGridSettings.Clear(); + } + + return returnGridSettings; + } + + public virtual void SetForcefulBanlistsDisallowed(ulong regionHandle) + { + m_queuedGridSettings.Add("allow_forceful_banlines", "FALSE"); + + } + public bool TriggerRegionUp(RegionInfo region, ulong regionhandle) { if (m_regionListeners.ContainsKey(regionhandle)) diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index 060fe28..7adac58 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs @@ -50,6 +50,7 @@ namespace OpenSim.Region.Communications.OGS1 private LocalBackEndServices m_localBackend = new LocalBackEndServices(); private Dictionary m_remoteRegionInfoCache = new Dictionary(); private List m_knownRegions = new List(); + private Dictionary m_queuedGridSettings = new Dictionary(); public BaseHttpServer httpListener; public NetworkServersInfo serversInfo; @@ -134,7 +135,15 @@ namespace OpenSim.Region.Communications.OGS1 else { m_knownRegions = RequestNeighbours(regionInfo.RegionLocX, regionInfo.RegionLocY); - + if (GridRespData.ContainsKey("allow_forceful_banlines")) + { + + if ((string)GridRespData["allow_forceful_banlines"] != "TRUE") + { + //m_localBackend.SetForcefulBanlistsDisallowed(regionInfo.RegionHandle); + m_queuedGridSettings.Add("allow_forceful_banlines", "FALSE"); + } + } } return m_localBackend.RegisterRegion(regionInfo); @@ -144,7 +153,23 @@ namespace OpenSim.Region.Communications.OGS1 { return false; } + public virtual Dictionary GetGridSettings() + { + Dictionary returnGridSettings = new Dictionary(); + lock (m_queuedGridSettings) + { + foreach (string Dictkey in m_queuedGridSettings.Keys) + { + returnGridSettings.Add(Dictkey, m_queuedGridSettings[Dictkey]); + + } + + m_queuedGridSettings.Clear(); + } + + return returnGridSettings; + } /// /// /// -- cgit v1.1