diff options
author | UbitUmarov | 2017-05-22 19:14:19 +0100 |
---|---|---|
committer | UbitUmarov | 2017-05-22 19:16:42 +0100 |
commit | 73222e4dd4e735225845184de22e245c454b40db (patch) | |
tree | 49916523ffd58cc1325371b682fd182571f4f25b /OpenSim/Region/CoreModules/Framework | |
parent | PGSQL: Another missing cast in XInventoryData (diff) | |
download | opensim-SC_OLD-73222e4dd4e735225845184de22e245c454b40db.zip opensim-SC_OLD-73222e4dd4e735225845184de22e245c454b40db.tar.gz opensim-SC_OLD-73222e4dd4e735225845184de22e245c454b40db.tar.bz2 opensim-SC_OLD-73222e4dd4e735225845184de22e245c454b40db.tar.xz |
fix IClientIPEndpoint broken by justin long ago.. but stop using it
except on SceneBanner, later it my be also removed from there and
everywhere
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 87b76dc..3564f7f 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -813,8 +813,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
813 | agentCircuit.Id0 = currentAgentCircuit.Id0; | 813 | agentCircuit.Id0 = currentAgentCircuit.Id0; |
814 | } | 814 | } |
815 | 815 | ||
816 | IClientIPEndpoint ipepClient; | ||
817 | |||
818 | uint newRegionX, newRegionY, oldRegionX, oldRegionY; | 816 | uint newRegionX, newRegionY, oldRegionX, oldRegionY; |
819 | Util.RegionHandleToRegionLoc(destinationHandle, out newRegionX, out newRegionY); | 817 | Util.RegionHandleToRegionLoc(destinationHandle, out newRegionX, out newRegionY); |
820 | Util.RegionHandleToRegionLoc(sourceRegion.RegionHandle, out oldRegionX, out oldRegionY); | 818 | Util.RegionHandleToRegionLoc(sourceRegion.RegionHandle, out oldRegionX, out oldRegionY); |
@@ -834,11 +832,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
834 | 832 | ||
835 | //sp.ControllingClient.SendTeleportProgress(teleportFlags, "Creating agent..."); | 833 | //sp.ControllingClient.SendTeleportProgress(teleportFlags, "Creating agent..."); |
836 | #region IP Translation for NAT | 834 | #region IP Translation for NAT |
837 | // Uses ipepClient above | 835 | IPEndPoint clientEP = sp.ControllingClient.RemoteEndPoint; |
838 | if (sp.ClientView.TryGet(out ipepClient)) | 836 | if (clientEP != null && clientEP.Address != null) |
839 | { | 837 | endPoint.Address = NetworkUtil.GetIPFor(clientEP.Address, endPoint.Address); |
840 | endPoint.Address = NetworkUtil.GetIPFor(ipepClient.EndPoint, endPoint.Address); | 838 | |
841 | } | ||
842 | #endregion | 839 | #endregion |
843 | agentCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath(); | 840 | agentCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath(); |
844 | } | 841 | } |
@@ -1746,10 +1743,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1746 | if (m_eqModule != null) | 1743 | if (m_eqModule != null) |
1747 | { | 1744 | { |
1748 | #region IP Translation for NAT | 1745 | #region IP Translation for NAT |
1749 | IClientIPEndpoint ipepClient; | 1746 | IPEndPoint clientEP = agent.ControllingClient.RemoteEndPoint; |
1750 | if (agent.ClientView.TryGet(out ipepClient)) | 1747 | if (clientEP != null && clientEP.Address != null) |
1751 | endPoint.Address = NetworkUtil.GetIPFor(ipepClient.EndPoint, endPoint.Address); | 1748 | endPoint.Address = NetworkUtil.GetIPFor(clientEP.Address, endPoint.Address); |
1752 | 1749 | ||
1753 | m_log.DebugFormat("{0} {1} is sending {2} EnableSimulator for neighbour region {3}(loc=<{4},{5}>,siz=<{6},{7}>) " + | 1750 | m_log.DebugFormat("{0} {1} is sending {2} EnableSimulator for neighbour region {3}(loc=<{4},{5}>,siz=<{6},{7}>) " + |
1754 | "and EstablishAgentCommunication with seed cap {8}", LogHeader, | 1751 | "and EstablishAgentCommunication with seed cap {8}", LogHeader, |
1755 | source.RegionName, agent.Name, | 1752 | source.RegionName, agent.Name, |
@@ -2402,11 +2399,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
2402 | if(sp == null || sp.IsDeleted || sp.ClientView == null) // something bad already happened | 2399 | if(sp == null || sp.IsDeleted || sp.ClientView == null) // something bad already happened |
2403 | return; | 2400 | return; |
2404 | 2401 | ||
2405 | IClientIPEndpoint ipepClient; | 2402 | IPEndPoint clientEP = sp.ControllingClient.RemoteEndPoint; |
2406 | if (sp.ClientView.TryGet(out ipepClient)) | 2403 | if (clientEP != null && clientEP.Address != null) |
2407 | { | 2404 | endPoint.Address = NetworkUtil.GetIPFor(clientEP.Address, endPoint.Address); |
2408 | endPoint.Address = NetworkUtil.GetIPFor(ipepClient.EndPoint, endPoint.Address); | ||
2409 | } | ||
2410 | #endregion | 2405 | #endregion |
2411 | 2406 | ||
2412 | m_log.DebugFormat("{0} {1} is sending {2} EnableSimulator for neighbour region {3}(loc=<{4},{5}>,siz=<{6},{7}>) " + | 2407 | m_log.DebugFormat("{0} {1} is sending {2} EnableSimulator for neighbour region {3}(loc=<{4},{5}>,siz=<{6},{7}>) " + |