From 2fd252f5a9ffc06fcaabf2a1e0889f01dcba4889 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 10 Jan 2015 10:32:33 -0800 Subject: [PATCH] SimulatorFeatures: the viewer also takes GridName in OpenSim extras. Added that (plus GridURL, in case viewers want to use it too) to the GridService that gives out that info to simulators. --- .../Linden/Caps/SimulatorFeaturesModule.cs | 5 ++++- OpenSim/Services/GridService/GridService.cs | 13 +++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs index d4bdef60e1..07e8025c06 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs @@ -83,7 +83,10 @@ namespace OpenSim.Region.ClientStack.Linden if (config != null) { - // These are normaly set in their respective modules + // + // All this is obsolete since getting these features from the grid service!! + // Will be removed after the next release + // m_SearchURL = config.GetString("SearchServerURI", m_SearchURL); m_DestinationGuideURL = config.GetString ("DestinationGuideURI", m_DestinationGuideURL); diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index 29723d8329..3b1a07e694 100644 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs @@ -170,6 +170,19 @@ namespace OpenSim.Services.GridService if (!string.IsNullOrEmpty(configVal)) m_ExtraFeatures["destination-guide-url"] = configVal; + configVal = Util.GetConfigVarFromSections( + config, "GatekeeperURI", new string[] { "Startup", "Hypergrid" }, String.Empty); + if (!string.IsNullOrEmpty(configVal)) + m_ExtraFeatures["GridURL"] = configVal; + + configVal = Util.GetConfigVarFromSections( + config, "GridName", new string[] { "Const", "Hypergrid" }, String.Empty); + if (string.IsNullOrEmpty(configVal)) + configVal = Util.GetConfigVarFromSections( + config, "gridname", new string[] { "GridInfo" }, String.Empty); + if (!string.IsNullOrEmpty(configVal)) + m_ExtraFeatures["GridName"] = configVal; + m_ExtraFeatures["ExportSupported"] = gridConfig.GetString("ExportSupported", "true"); }