From 81b4c7be3e84b29e5fcc387f578afdc07b806048 Mon Sep 17 00:00:00 2001 From: mingchen Date: Fri, 4 Jan 2008 14:14:15 +0000 Subject: *Added ability to skip any use of the console when configuring and assume default value. This is useful when the server is running by itself and a new region request is added without sufficient information --- OpenSim/Framework/ConfigurationMember.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'OpenSim/Framework/ConfigurationMember.cs') diff --git a/OpenSim/Framework/ConfigurationMember.cs b/OpenSim/Framework/ConfigurationMember.cs index a5ab613..2def070 100644 --- a/OpenSim/Framework/ConfigurationMember.cs +++ b/OpenSim/Framework/ConfigurationMember.cs @@ -51,29 +51,31 @@ namespace OpenSim.Framework private ConfigurationOptionResult resultFunction; private IGenericConfig configurationPlugin = null; - + private bool useConsoleToPromptOnError = true; /// /// This is the default configuration DLL loaded /// private string configurationPluginFilename = "OpenSim.Framework.Configuration.XML.dll"; public ConfigurationMember(string configuration_filename, string configuration_description, - ConfigurationOptionsLoad load_function, ConfigurationOptionResult result_function) + ConfigurationOptionsLoad load_function, ConfigurationOptionResult result_function, bool use_console_to_prompt_on_error) { configurationFilename = configuration_filename; configurationDescription = configuration_description; loadFunction = load_function; resultFunction = result_function; + useConsoleToPromptOnError = use_console_to_prompt_on_error; } public ConfigurationMember(XmlNode configuration_xml, string configuration_description, - ConfigurationOptionsLoad load_function, ConfigurationOptionResult result_function) + ConfigurationOptionsLoad load_function, ConfigurationOptionResult result_function, bool use_console_to_prompt_on_error) { configurationFilename = ""; configurationFromXMLNode = configuration_xml; configurationDescription = configuration_description; loadFunction = load_function; resultFunction = result_function; + useConsoleToPromptOnError = use_console_to_prompt_on_error; } public void setConfigurationFilename(string filename) @@ -231,7 +233,7 @@ namespace OpenSim.Framework if (attribute == null) { - if (configOption.configurationUseDefaultNoPrompt) + if (configOption.configurationUseDefaultNoPrompt || useConsoleToPromptOnError == false) { console_result = configOption.configurationDefault; } -- cgit v1.1