mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 18:25:33 +08:00
*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
This commit is contained in:
@@ -51,29 +51,31 @@ namespace OpenSim.Framework
|
||||
private ConfigurationOptionResult resultFunction;
|
||||
|
||||
private IGenericConfig configurationPlugin = null;
|
||||
|
||||
private bool useConsoleToPromptOnError = true;
|
||||
/// <summary>
|
||||
/// This is the default configuration DLL loaded
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user