HG: Hopefully this fixes the issues with port 80 once and for all.
parent
236cc1f268
commit
eb273b808e
|
@ -321,7 +321,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
|
args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
|
||||||
args["teleport_flags"] = OSD.FromString(flags.ToString());
|
args["teleport_flags"] = OSD.FromString(flags.ToString());
|
||||||
|
|
||||||
OSDMap result = WebUtil.PostToService(uri, args, 20000);
|
OSDMap result = WebUtil.PostToService(uri, args, 80000);
|
||||||
if (result["Success"].AsBoolean())
|
if (result["Success"].AsBoolean())
|
||||||
{
|
{
|
||||||
OSDMap unpacked = (OSDMap)result["_Result"];
|
OSDMap unpacked = (OSDMap)result["_Result"];
|
||||||
|
|
|
@ -68,6 +68,7 @@ namespace OpenSim.Services.HypergridService
|
||||||
private static UUID m_ScopeID;
|
private static UUID m_ScopeID;
|
||||||
private static bool m_AllowTeleportsToAnyRegion;
|
private static bool m_AllowTeleportsToAnyRegion;
|
||||||
private static string m_ExternalName;
|
private static string m_ExternalName;
|
||||||
|
private static Uri m_Uri;
|
||||||
private static GridRegion m_DefaultGatewayRegion;
|
private static GridRegion m_DefaultGatewayRegion;
|
||||||
|
|
||||||
public GatekeeperService(IConfigSource config, ISimulationService simService)
|
public GatekeeperService(IConfigSource config, ISimulationService simService)
|
||||||
|
@ -99,6 +100,15 @@ namespace OpenSim.Services.HypergridService
|
||||||
if (m_ExternalName != string.Empty && !m_ExternalName.EndsWith("/"))
|
if (m_ExternalName != string.Empty && !m_ExternalName.EndsWith("/"))
|
||||||
m_ExternalName = m_ExternalName + "/";
|
m_ExternalName = m_ExternalName + "/";
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
m_Uri = new Uri(m_ExternalName);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
m_log.WarnFormat("[GATEKEEPER SERVICE]: Malformed gatekeeper address {0}", m_ExternalName);
|
||||||
|
}
|
||||||
|
|
||||||
Object[] args = new Object[] { config };
|
Object[] args = new Object[] { config };
|
||||||
m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args);
|
m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args);
|
||||||
m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args);
|
m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args);
|
||||||
|
@ -433,7 +443,18 @@ namespace OpenSim.Services.HypergridService
|
||||||
string externalname = m_ExternalName.TrimEnd(trailing_slash);
|
string externalname = m_ExternalName.TrimEnd(trailing_slash);
|
||||||
m_log.DebugFormat("[GATEKEEPER SERVICE]: Verifying {0} against {1}", addressee, externalname);
|
m_log.DebugFormat("[GATEKEEPER SERVICE]: Verifying {0} against {1}", addressee, externalname);
|
||||||
|
|
||||||
return string.Equals(addressee, externalname, StringComparison.OrdinalIgnoreCase);
|
Uri uri;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
uri = new Uri(addressee);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
m_log.DebugFormat("[GATEKEEPER SERVICE]: Visitor provided malformed service address {0}", addressee);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return string.Equals(uri.GetLeftPart(UriPartial.Authority), m_Uri.GetLeftPart(UriPartial.Authority), StringComparison.OrdinalIgnoreCase) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
Loading…
Reference in New Issue