From 7cec4997dbdb01a6768d809a6498c488b90d798f Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 1 Aug 2014 20:29:25 +0100 Subject: Fix regression in SimulatorFeatures module that would stop OpenSimulator from starting if no [SimulatorFeatures] section was present in config. --- .../Linden/Caps/SimulatorFeaturesModule.cs | 32 ++++++++++++++-------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs index 2859953..91226ae 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs @@ -78,20 +78,28 @@ 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 { - GetGridExtraFeatures(featuresURI); - } + 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) - { - m_SearchURL = config.GetString("SearchServerURI", string.Empty); - m_DestinationGuideURL = config.GetString ("DestinationGuideURI", string.Empty); + if (m_AllowOverride) + { + m_SearchURL = config.GetString("SearchServerURI", m_SearchURL); + m_DestinationGuideURL = config.GetString ("DestinationGuideURI", m_DestinationGuideURL); - m_ExportSupported = config.GetBoolean("ExportSupported", m_ExportSupported); + m_ExportSupported = config.GetBoolean("ExportSupported", m_ExportSupported); + } } AddDefaultFeatures(); -- cgit v1.1