send it to regions

This commit is contained in:
UbitUmarov
2020-11-12 04:27:39 +00:00
parent 66af978208
commit 19b26811c8
2 changed files with 30 additions and 2 deletions

View File

@@ -656,9 +656,9 @@ namespace OpenSim.Framework
}
if (m_gateKeeperAlias != null && m_gateKeeperAlias.Count > 0)
{
m_gridUrlAlias = new string[m_homeURLAlias.Count];
m_gridUrlAlias = new string[m_gateKeeperAlias.Count];
int i = 0;
foreach (OSHHTPHost a in m_homeURLAlias)
foreach (OSHHTPHost a in m_gateKeeperAlias)
m_gridUrlAlias[i++] = a.URI;
}
}

View File

@@ -29,6 +29,7 @@ using System;
using System.Collections.Generic;
using System.Net;
using System.Reflection;
using System.Text;
using Nini.Config;
using log4net;
using OpenSim.Framework;
@@ -186,6 +187,33 @@ namespace OpenSim.Services.GridService
m_ExtraFeatures["GridName"] = configVal;
m_ExtraFeatures["ExportSupported"] = gridConfig.GetString("ExportSupported", "true");
string[] sections = new string[] { "Const, Startup", "Hypergrid", "GatekeeperService" };
string gatekeeperURIAlias = Util.GetConfigVarFromSections<string>(config, "GatekeeperURIAlias", sections, string.Empty);
if (!string.IsNullOrWhiteSpace(gatekeeperURIAlias))
{
string[] alias = gatekeeperURIAlias.Split(',');
if(alias.Length > 0)
{
StringBuilder sb = osStringBuilderCache.Acquire();
int last = alias.Length -1;
for (int i = 0; i < alias.Length; ++i)
{
OSHHTPHost tmp = new OSHHTPHost(alias[i], false);
if (tmp.IsValidHost)
{
sb.Append(tmp.URI);
if(i < last)
sb.Append(',');
}
}
if(sb.Length > 0)
m_ExtraFeatures["GridURLAlias"] = osStringBuilderCache.GetStringAndRelease(sb);
else
osStringBuilderCache.Release(sb);
}
}
}
#region IGridService