From 97f4226666b5d3525999550e1362180be182cc87 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Mon, 13 Oct 2008 20:35:45 +0000 Subject: * Apply a modified version of the part of http://opensimulator.org/mantis/view.php?id=2361 that allows region registration to be enabled/disabled on the grid server * Region registration is enabled by default in the configuration unless the user chooses otherwise * On the console * show status - shows grid status * enable-reg - enables region registration to the grid * disable-reg - disables region registration * Enabling or disabling region registration will not affect any other grid functions or regions already on the grid --- OpenSim/Framework/EstateSettings.cs | 2 +- OpenSim/Framework/GridConfig.cs | 12 +++++++++++- OpenSim/Framework/PacketPool.cs | 2 +- OpenSim/Framework/RegionSettings.cs | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs index b7dccdb..f8595e0 100644 --- a/OpenSim/Framework/EstateSettings.cs +++ b/OpenSim/Framework/EstateSettings.cs @@ -290,7 +290,7 @@ namespace OpenSim.Framework l_EstateManagers.Clear(); configMember.performConfigurationRetrieve(); } - catch (Exception e) + catch (Exception) { } } diff --git a/OpenSim/Framework/GridConfig.cs b/OpenSim/Framework/GridConfig.cs index 889f345..52bc3d6 100644 --- a/OpenSim/Framework/GridConfig.cs +++ b/OpenSim/Framework/GridConfig.cs @@ -34,6 +34,7 @@ namespace OpenSim.Framework public static uint DefaultHttpPort = 8001; public string AllowForcefulBanlines = "TRUE"; + public bool AllowRegionRegistration = true; public string AssetRecvKey = String.Empty; public string AssetSendKey = String.Empty; @@ -90,7 +91,13 @@ namespace OpenSim.Framework configMember.addConfigurationOption("allow_forceful_banlines", ConfigurationOption.ConfigurationTypes.TYPE_STRING, - "Allow Forceful Banlines", "TRUE", true); + "Allow Forceful Banlines", "TRUE", true); + + configMember.addConfigurationOption("allow_region_registration", + ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, + "Allow regions to register immediately upon grid server startup? true/false", + "True", + false); } public bool handleIncomingConfiguration(string configuration_key, object configuration_result) @@ -133,6 +140,9 @@ namespace OpenSim.Framework case "allow_forceful_banlines": AllowForcefulBanlines = (string) configuration_result; break; + case "allow_region_registration": + AllowRegionRegistration = (bool)configuration_result; + break; } return true; diff --git a/OpenSim/Framework/PacketPool.cs b/OpenSim/Framework/PacketPool.cs index 807403e..e24da42 100644 --- a/OpenSim/Framework/PacketPool.cs +++ b/OpenSim/Framework/PacketPool.cs @@ -36,7 +36,7 @@ namespace OpenSim.Framework { private static readonly PacketPool instance = new PacketPool(); - private const bool packetPoolEnabled = false; + private bool packetPoolEnabled = false; private readonly Dictionary> pool = new Dictionary>(); diff --git a/OpenSim/Framework/RegionSettings.cs b/OpenSim/Framework/RegionSettings.cs index 6281d6c..ba04513 100644 --- a/OpenSim/Framework/RegionSettings.cs +++ b/OpenSim/Framework/RegionSettings.cs @@ -50,7 +50,7 @@ namespace OpenSim.Framework configMember = new ConfigurationMember(Path.Combine(Util.configDir(), "estate_settings.xml"), "ESTATE SETTINGS", LoadConfigurationOptions, HandleIncomingConfiguration, true); configMember.performConfigurationRetrieve(); } - catch (Exception e) + catch (Exception) { } } -- cgit v1.1