more on GridInfo, fix HasHGConfig

This commit is contained in:
UbitUmarov
2020-09-25 11:49:48 +01:00
parent 9734a86489
commit 25ccb2595f
2 changed files with 8 additions and 2 deletions

View File

@@ -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"));

View File

@@ -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);