Fix regression in SimulatorFeatures module that would stop OpenSimulator from starting if no [SimulatorFeatures] section was present in config.

bullet-2.82
Justin Clark-Casey (justincc) 2014-08-01 20:29:25 +01:00
parent dfd0c2a54a
commit 7cec4997db
1 changed files with 20 additions and 12 deletions

View File

@ -78,21 +78,29 @@ namespace OpenSim.Region.ClientStack.Linden
public void Initialise(IConfigSource source)
{
IConfig config = source.Configs ["SimulatorFeatures"];
string featuresURI = config.GetString ("ExtraFeaturesServiceURI", string.Empty);
if (string.IsNullOrEmpty (featuresURI)) {
m_log.Info ("ExtraFeaturesServiceURI is undefined. The grid's ExtraFeatures will not be available to regions in this instnace.");
} else {
IConfig config = source.Configs["SimulatorFeatures"];
if (config != null)
{
string featuresURI = config.GetString("ExtraFeaturesServiceURI", string.Empty);
if (string.IsNullOrEmpty(featuresURI))
{
m_log.Info("ExtraFeaturesServiceURI is undefined. The grid's ExtraFeatures will not be available to regions in this instnace.");
}
else
{
GetGridExtraFeatures(featuresURI);
}
if (config != null && m_AllowOverride == true)
if (m_AllowOverride)
{
m_SearchURL = config.GetString("SearchServerURI", string.Empty);
m_DestinationGuideURL = config.GetString ("DestinationGuideURI", string.Empty);
m_SearchURL = config.GetString("SearchServerURI", m_SearchURL);
m_DestinationGuideURL = config.GetString ("DestinationGuideURI", m_DestinationGuideURL);
m_ExportSupported = config.GetBoolean("ExportSupported", m_ExportSupported);
}
}
AddDefaultFeatures();
}