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 | |
parent | PGSQL: Another missing cast in XInventoryData (diff) | |
download | opensim-SC-73222e4dd4e735225845184de22e245c454b40db.zip opensim-SC-73222e4dd4e735225845184de22e245c454b40db.tar.gz opensim-SC-73222e4dd4e735225845184de22e245c454b40db.tar.bz2 opensim-SC-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 '')
4 files changed, 15 insertions, 20 deletions
diff --git a/OpenSim/Framework/Client/IClientIPEndpoint.cs b/OpenSim/Framework/Client/IClientIPEndpoint.cs index 2b99bf0..2194616 100644 --- a/OpenSim/Framework/Client/IClientIPEndpoint.cs +++ b/OpenSim/Framework/Client/IClientIPEndpoint.cs | |||
@@ -34,6 +34,6 @@ namespace OpenSim.Framework.Client | |||
34 | { | 34 | { |
35 | public interface IClientIPEndpoint | 35 | public interface IClientIPEndpoint |
36 | { | 36 | { |
37 | IPAddress EndPoint { get; } | 37 | IPEndPoint RemoteEndPoint { get; } |
38 | } | 38 | } |
39 | } | 39 | } |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 298c933..f658a70 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -62,7 +62,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
62 | /// Handles new client connections | 62 | /// Handles new client connections |
63 | /// Constructor takes a single Packet and authenticates everything | 63 | /// Constructor takes a single Packet and authenticates everything |
64 | /// </summary> | 64 | /// </summary> |
65 | public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IClientInventory, IStatsCollector | 65 | public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IClientInventory, IStatsCollector, IClientIPEndpoint |
66 | { | 66 | { |
67 | /// <value> | 67 | /// <value> |
68 | /// Debug packet level. See OpenSim.RegisterConsoleCommands() for more details. | 68 | /// Debug packet level. See OpenSim.RegisterConsoleCommands() for more details. |
diff --git a/OpenSim/Region/CoreModules/Agent/IPBan/SceneBanner.cs b/OpenSim/Region/CoreModules/Agent/IPBan/SceneBanner.cs index 8502006..b4c68e2 100644 --- a/OpenSim/Region/CoreModules/Agent/IPBan/SceneBanner.cs +++ b/OpenSim/Region/CoreModules/Agent/IPBan/SceneBanner.cs | |||
@@ -53,9 +53,9 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan | |||
53 | if (bans.Count > 0) | 53 | if (bans.Count > 0) |
54 | { | 54 | { |
55 | IClientIPEndpoint ipEndpoint; | 55 | IClientIPEndpoint ipEndpoint; |
56 | if (client.TryGet(out ipEndpoint)) | 56 | if (client.TryGet(out ipEndpoint) && ipEndpoint.RemoteEndPoint != null) |
57 | { | 57 | { |
58 | IPAddress end = ipEndpoint.EndPoint; | 58 | IPAddress end = ipEndpoint.RemoteEndPoint.Address; |
59 | 59 | ||
60 | try | 60 | try |
61 | { | 61 | { |
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}>) " + |