aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework
diff options
context:
space:
mode:
authorTom Grimshaw2010-05-29 01:03:59 -0700
committerTom Grimshaw2010-05-29 01:03:59 -0700
commit2f409116db570be77fc75df188a4044250dce226 (patch)
tree424980e50591e1d4b7d89fe88960e457b19c457d /OpenSim/Region/CoreModules/Framework
parentMerge branch 'careminster-presence-refactor' of www.3dhosting.de:/var/git/car... (diff)
downloadopensim-SC-2f409116db570be77fc75df188a4044250dce226.zip
opensim-SC-2f409116db570be77fc75df188a4044250dce226.tar.gz
opensim-SC-2f409116db570be77fc75df188a4044250dce226.tar.bz2
opensim-SC-2f409116db570be77fc75df188a4044250dce226.tar.xz
Stop IGridService from throwing a fatal exception when an IPEndPoint cannot be resolved, and add some handlers to deal with this cleanly; a condition was observed on OSGrid where a neighbouring region with an invalid (unresolveable) hostname would prevent a region from starting. This is bad.
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs31
1 files changed, 20 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index ef37f63..dc1025d 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -261,7 +261,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
261 // This may be a costly operation. The reg.ExternalEndPoint field is not a passive field, 261 // This may be a costly operation. The reg.ExternalEndPoint field is not a passive field,
262 // it's actually doing a lot of work. 262 // it's actually doing a lot of work.
263 IPEndPoint endPoint = finalDestination.ExternalEndPoint; 263 IPEndPoint endPoint = finalDestination.ExternalEndPoint;
264 if (endPoint.Address != null) 264 if (endPoint != null && endPoint.Address != null)
265 { 265 {
266 // Fixing a bug where teleporting while sitting results in the avatar ending up removed from 266 // Fixing a bug where teleporting while sitting results in the avatar ending up removed from
267 // both regions 267 // both regions
@@ -825,15 +825,19 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
825 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} to client {1}", capsPath, agent.UUID); 825 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} to client {1}", capsPath, agent.UUID);
826 826
827 IEventQueue eq = agent.Scene.RequestModuleInterface<IEventQueue>(); 827 IEventQueue eq = agent.Scene.RequestModuleInterface<IEventQueue>();
828 if (eq != null) 828 IPEndPoint neighbourExternal = neighbourRegion.ExternalEndPoint;
829 { 829 if (neighbourExternal != null)
830 eq.CrossRegion(neighbourHandle, pos, agent.Velocity, neighbourRegion.ExternalEndPoint,
831 capsPath, agent.UUID, agent.ControllingClient.SessionId);
832 }
833 else
834 { 830 {
835 agent.ControllingClient.CrossRegion(neighbourHandle, pos, agent.Velocity, neighbourRegion.ExternalEndPoint, 831 if (eq != null)
836 capsPath); 832 {
833 eq.CrossRegion(neighbourHandle, pos, agent.Velocity, neighbourExternal,
834 capsPath, agent.UUID, agent.ControllingClient.SessionId);
835 }
836 else
837 {
838 agent.ControllingClient.CrossRegion(neighbourHandle, pos, agent.Velocity, neighbourExternal,
839 capsPath);
840 }
837 } 841 }
838 842
839 if (!WaitForCallback(agent.UUID)) 843 if (!WaitForCallback(agent.UUID))
@@ -906,10 +910,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
906 agent.child = true; 910 agent.child = true;
907 agent.Appearance = sp.Appearance; 911 agent.Appearance = sp.Appearance;
908 912
909 InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync; 913 IPEndPoint external = region.ExternalEndPoint;
910 d.BeginInvoke(sp, agent, region, region.ExternalEndPoint, true, 914 if (external != null)
915 {
916 InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync;
917 d.BeginInvoke(sp, agent, region, external, true,
911 InformClientOfNeighbourCompleted, 918 InformClientOfNeighbourCompleted,
912 d); 919 d);
920 }
913 } 921 }
914 #endregion 922 #endregion
915 923
@@ -1038,6 +1046,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1038 InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync; 1046 InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync;
1039 try 1047 try
1040 { 1048 {
1049 //neighbour.ExternalEndPoint may return null, which will be caught
1041 d.BeginInvoke(sp, cagents[count], neighbour, neighbour.ExternalEndPoint, newAgent, 1050 d.BeginInvoke(sp, cagents[count], neighbour, neighbour.ExternalEndPoint, newAgent,
1042 InformClientOfNeighbourCompleted, 1051 InformClientOfNeighbourCompleted,
1043 d); 1052 d);