From 783b1b548f24b002f09cf2ceb0bdab76afed0fab Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 22 Oct 2010 23:34:53 +0100 Subject: Revert "* additional serveruri cleanup" This reverts commit 19119d7705f8381a3c207d0e64a23243215a12b9. --- OpenSim/Services/LLLoginService/LLLoginResponse.cs | 29 +++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services/LLLoginService/LLLoginResponse.cs') diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs index f985ab2..0da1715 100644 --- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs +++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs @@ -333,7 +333,34 @@ namespace OpenSim.Services.LLLoginService private void FillOutSeedCap(AgentCircuitData aCircuit, GridRegion destination, IPEndPoint ipepClient) { - SeedCapability = destination.ServerURI + CapsUtil.GetCapsSeedPath(aCircuit.CapsPath); + string capsSeedPath = String.Empty; + + // Don't use the following! It Fails for logging into any region not on the same port as the http server! + // Kept here so it doesn't happen again! + // response.SeedCapability = regionInfo.ServerURI + capsSeedPath; + + #region IP Translation for NAT + if (ipepClient != null) + { + capsSeedPath + = "http://" + + NetworkUtil.GetHostFor(ipepClient.Address, destination.ExternalHostName) + + ":" + + destination.HttpPort + + CapsUtil.GetCapsSeedPath(aCircuit.CapsPath); + } + else + { + capsSeedPath + = "http://" + + destination.ExternalHostName + + ":" + + destination.HttpPort + + CapsUtil.GetCapsSeedPath(aCircuit.CapsPath); + } + #endregion + + SeedCapability = capsSeedPath; } private void SetDefaultValues() -- cgit v1.1