diff options
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 85a3d96..b89a5f2 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -812,17 +812,32 @@ namespace OpenSim.Region.Framework.Scenes | |||
812 | 812 | ||
813 | if (Util.IsOutsideView(oldRegionX, newRegionX, oldRegionY, newRegionY)) | 813 | if (Util.IsOutsideView(oldRegionX, newRegionX, oldRegionY, newRegionY)) |
814 | { | 814 | { |
815 | capsPath | 815 | #region IP Translation for NAT |
816 | = "http://" | 816 | IClientIPEndpoint ipepClient; |
817 | + reg.ExternalHostName | 817 | if (avatar.ClientView.TryGet(out ipepClient)) |
818 | + ":" | 818 | { |
819 | + reg.HttpPort | 819 | capsPath |
820 | + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); | 820 | = "http://" |
821 | + NetworkUtil.GetHostFor(ipepClient.EndPoint, reg.ExternalHostName) | ||
822 | + ":" | ||
823 | + reg.HttpPort | ||
824 | + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); | ||
825 | } | ||
826 | else | ||
827 | { | ||
828 | capsPath | ||
829 | = "http://" | ||
830 | + reg.ExternalHostName | ||
831 | + ":" | ||
832 | + reg.HttpPort | ||
833 | + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); | ||
834 | } | ||
835 | #endregion | ||
821 | 836 | ||
822 | if (eq != null) | 837 | if (eq != null) |
823 | { | 838 | { |
824 | #region IP Translation for NAT | 839 | #region IP Translation for NAT |
825 | IClientIPEndpoint ipepClient; | 840 | // Uses ipepClient above |
826 | if (avatar.ClientView.TryGet(out ipepClient)) | 841 | if (avatar.ClientView.TryGet(out ipepClient)) |
827 | { | 842 | { |
828 | endPoint.Address = NetworkUtil.GetIPFor(ipepClient.EndPoint, endPoint.Address); | 843 | endPoint.Address = NetworkUtil.GetIPFor(ipepClient.EndPoint, endPoint.Address); |