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

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