aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
diff options
context:
space:
mode:
authorAdam Frisby2009-05-23 05:44:18 +0000
committerAdam Frisby2009-05-23 05:44:18 +0000
commit3b1b3ac9bbd77796a55bcc75d08f78bff5ca78af (patch)
tree3f9694631e41a4daf4465fea4a35bb966805d362 /OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
parent* NetworkUtil now handles an error case in a way which is easier to debug. (diff)
downloadopensim-SC-3b1b3ac9bbd77796a55bcc75d08f78bff5ca78af.zip
opensim-SC-3b1b3ac9bbd77796a55bcc75d08f78bff5ca78af.tar.gz
opensim-SC-3b1b3ac9bbd77796a55bcc75d08f78bff5ca78af.tar.bz2
opensim-SC-3b1b3ac9bbd77796a55bcc75d08f78bff5ca78af.tar.xz
* Breaks OpenSim.. err I mean.. adds NAT translation support to EnableSimulator EventQueue methods.
* NB: This may actually break logins on certain regions. Shake well before consuming.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
index 0699552..85a3d96 100644
--- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
@@ -34,6 +34,7 @@ using OpenMetaverse;
34using OpenMetaverse.StructuredData; 34using OpenMetaverse.StructuredData;
35using log4net; 35using log4net;
36using OpenSim.Framework; 36using OpenSim.Framework;
37using OpenSim.Framework.Client;
37using OpenSim.Framework.Communications; 38using OpenSim.Framework.Communications;
38using OpenSim.Framework.Communications.Cache; 39using OpenSim.Framework.Communications.Cache;
39using OpenSim.Framework.Communications.Capabilities; 40using OpenSim.Framework.Communications.Capabilities;
@@ -306,6 +307,14 @@ namespace OpenSim.Region.Framework.Scenes
306 IEventQueue eq = avatar.Scene.RequestModuleInterface<IEventQueue>(); 307 IEventQueue eq = avatar.Scene.RequestModuleInterface<IEventQueue>();
307 if (eq != null) 308 if (eq != null)
308 { 309 {
310 #region IP Translation for NAT
311 IClientIPEndpoint ipepClient;
312 if(avatar.ClientView.TryGet(out ipepClient))
313 {
314 endPoint.Address = NetworkUtil.GetIPFor(ipepClient.EndPoint, endPoint.Address);
315 }
316 #endregion
317
309 eq.EnableSimulator(reg.RegionHandle, endPoint, avatar.UUID); 318 eq.EnableSimulator(reg.RegionHandle, endPoint, avatar.UUID);
310 eq.EstablishAgentCommunication(avatar.UUID, endPoint, capsPath); 319 eq.EstablishAgentCommunication(avatar.UUID, endPoint, capsPath);
311 m_log.DebugFormat("[CAPS]: Sending new CAPS seed url {0} to client {1} in region {2}", 320 m_log.DebugFormat("[CAPS]: Sending new CAPS seed url {0} to client {1} in region {2}",
@@ -812,6 +821,14 @@ namespace OpenSim.Region.Framework.Scenes
812 821
813 if (eq != null) 822 if (eq != null)
814 { 823 {
824 #region IP Translation for NAT
825 IClientIPEndpoint ipepClient;
826 if (avatar.ClientView.TryGet(out ipepClient))
827 {
828 endPoint.Address = NetworkUtil.GetIPFor(ipepClient.EndPoint, endPoint.Address);
829 }
830 #endregion
831
815 eq.EnableSimulator(reg.RegionHandle, endPoint, avatar.UUID); 832 eq.EnableSimulator(reg.RegionHandle, endPoint, avatar.UUID);
816 833
817 // ES makes the client send a UseCircuitCode message to the destination, 834 // ES makes the client send a UseCircuitCode message to the destination,