From 25ccb2595faeba00f53e0f387082a1a62fb87051 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 25 Sep 2020 11:49:48 +0100 Subject: [PATCH] more on GridInfo, fix HasHGConfig --- OpenSim/Framework/GridInfo.cs | 7 +++++-- OpenSim/Services/GridService/HypergridLinker.cs | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/OpenSim/Framework/GridInfo.cs b/OpenSim/Framework/GridInfo.cs index 97771daa8d..6defe3b86c 100644 --- a/OpenSim/Framework/GridInfo.cs +++ b/OpenSim/Framework/GridInfo.cs @@ -198,13 +198,16 @@ namespace OpenSim.Framework if (string.IsNullOrEmpty(gatekeeper)) { m_hasHGconfig = false; - if(!string.IsNullOrEmpty(defaultHost)) + if (!string.IsNullOrEmpty(defaultHost)) m_gateKeeperURL = new OSHostURL(defaultHost, true); } else + { m_gateKeeperURL = new OSHostURL(gatekeeper, true); + m_hasHGconfig = true; + } - if(m_gateKeeperURL.URLType == UriHostNameType.Unknown) + if (m_gateKeeperURL.URLType == UriHostNameType.Unknown) throw new Exception(String.Format("could not find gatekeeper URL")); if (m_gateKeeperURL.IP == null) throw new Exception(String.Format("could not resolve gatekeeper hostname")); diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index 19585de1d9..6a332dcb35 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs @@ -97,6 +97,9 @@ namespace OpenSim.Services.GridService m_MapTileDirectory = gridConfig.GetString("MapTileDirectory", "maptiles"); m_ThisGridInfo = new GridInfo(config); + if(!m_ThisGridInfo.HasHGConfig) + throw new Exception("missing HyperGrid configuration"); + m_log.DebugFormat("[HYPERGRID LINKER]: Local Gatekeeper: {0}", m_ThisGridInfo.GateKeeperURL); m_GatekeeperConnector = new GatekeeperServiceConnector(m_AssetService);