aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/ChildAgentDataUpdate.cs6
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs14
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs26
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs27
4 files changed, 48 insertions, 25 deletions
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs
index 1c5f558..18d008c 100644
--- a/OpenSim/Framework/ChildAgentDataUpdate.cs
+++ b/OpenSim/Framework/ChildAgentDataUpdate.cs
@@ -287,6 +287,12 @@ namespace OpenSim.Framework
287 public Vector3 AtAxis; 287 public Vector3 AtAxis;
288 public Vector3 LeftAxis; 288 public Vector3 LeftAxis;
289 public Vector3 UpAxis; 289 public Vector3 UpAxis;
290
291 /// <summary>
292 /// Signal on a V2 teleport that Scene.IncomingChildAgentDataUpdate(AgentData ad) should wait for the
293 /// scene presence to become root (triggered when the viewer sends a CompleteAgentMovement UDP packet after
294 /// establishing the connection triggered by it's receipt of a TeleportFinish EQ message).
295 /// </summary>
290 public bool SenderWantsToWaitForRoot; 296 public bool SenderWantsToWaitForRoot;
291 297
292 public float Far; 298 public float Far;
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 80c125a..01ef710 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -688,8 +688,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
688 if (version.Equals("SIMULATION/0.2")) 688 if (version.Equals("SIMULATION/0.2"))
689 TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason); 689 TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason);
690 else 690 else
691 TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason); 691 TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason);
692
693 } 692 }
694 693
695 private void TransferAgent_V1(ScenePresence sp, AgentCircuitData agentCircuit, GridRegion reg, GridRegion finalDestination, 694 private void TransferAgent_V1(ScenePresence sp, AgentCircuitData agentCircuit, GridRegion reg, GridRegion finalDestination,
@@ -698,7 +697,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
698 ulong destinationHandle = finalDestination.RegionHandle; 697 ulong destinationHandle = finalDestination.RegionHandle;
699 AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode); 698 AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode);
700 699
701 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Using TP V1"); 700 m_log.DebugFormat(
701 "[ENTITY TRANSFER MODULE]: Using TP V1 for {0} going from {1} to {2}",
702 sp.Name, Scene.Name, finalDestination.RegionName);
703
702 // Let's create an agent there if one doesn't exist yet. 704 // Let's create an agent there if one doesn't exist yet.
703 // NOTE: logout will always be false for a non-HG teleport. 705 // NOTE: logout will always be false for a non-HG teleport.
704 bool logout = false; 706 bool logout = false;
@@ -1079,20 +1081,22 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1079 if (!sp.DoNotCloseAfterTeleport) 1081 if (!sp.DoNotCloseAfterTeleport)
1080 { 1082 {
1081 // OK, it got this agent. Let's close everything 1083 // OK, it got this agent. Let's close everything
1082 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Closing in agent {0} in region {1}", sp.Name, Scene.RegionInfo.RegionName); 1084 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Closing in agent {0} in region {1}", sp.Name, Scene.Name);
1083 sp.CloseChildAgents(newRegionX, newRegionY); 1085 sp.CloseChildAgents(newRegionX, newRegionY);
1084 sp.Scene.IncomingCloseAgent(sp.UUID, false); 1086 sp.Scene.IncomingCloseAgent(sp.UUID, false);
1085 1087
1086 } 1088 }
1087 else 1089 else
1088 { 1090 {
1089 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Not closing agent {0}, user is back in {0}", sp.Name, Scene.RegionInfo.RegionName); 1091 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Not closing agent {0}, user is back in {0}", sp.Name, Scene.Name);
1090 sp.DoNotCloseAfterTeleport = false; 1092 sp.DoNotCloseAfterTeleport = false;
1091 } 1093 }
1092 } 1094 }
1093 else 1095 else
1096 {
1094 // now we have a child agent in this region. 1097 // now we have a child agent in this region.
1095 sp.Reset(); 1098 sp.Reset();
1099 }
1096 } 1100 }
1097 1101
1098 /// <summary> 1102 /// <summary>
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 503b81a..56cd57e 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4222,36 +4222,42 @@ namespace OpenSim.Region.Framework.Scenes
4222 } 4222 }
4223 4223
4224 // We have to wait until the viewer contacts this region 4224 // We have to wait until the viewer contacts this region
4225 // after receiving the EnableSimulator HTTP Event Queue message. This triggers the viewer to send 4225 // after receiving the EnableSimulator HTTP Event Queue message (for the v1 teleport protocol)
4226 // or TeleportFinish (for the v2 teleport protocol). This triggers the viewer to send
4226 // a UseCircuitCode packet which in turn calls AddNewClient which finally creates the ScenePresence. 4227 // a UseCircuitCode packet which in turn calls AddNewClient which finally creates the ScenePresence.
4227 ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID); 4228 ScenePresence sp = WaitGetScenePresence(cAgentData.AgentID);
4228 4229
4229 if (childAgentUpdate != null) 4230 if (sp != null)
4230 { 4231 {
4231 if (cAgentData.SessionID != childAgentUpdate.ControllingClient.SessionId) 4232 if (cAgentData.SessionID != sp.ControllingClient.SessionId)
4232 { 4233 {
4233 m_log.WarnFormat("[SCENE]: Attempt to update agent {0} with invalid session id {1} (possibly from simulator in older version; tell them to update).", childAgentUpdate.UUID, cAgentData.SessionID); 4234 m_log.WarnFormat(
4235 "[SCENE]: Attempt to update agent {0} with invalid session id {1} (possibly from simulator in older version; tell them to update).",
4236 sp.UUID, cAgentData.SessionID);
4237
4234 Console.WriteLine(String.Format("[SCENE]: Attempt to update agent {0} ({1}) with invalid session id {2}", 4238 Console.WriteLine(String.Format("[SCENE]: Attempt to update agent {0} ({1}) with invalid session id {2}",
4235 childAgentUpdate.UUID, childAgentUpdate.ControllingClient.SessionId, cAgentData.SessionID)); 4239 sp.UUID, sp.ControllingClient.SessionId, cAgentData.SessionID));
4236 } 4240 }
4237 4241
4238 childAgentUpdate.ChildAgentDataUpdate(cAgentData); 4242 sp.ChildAgentDataUpdate(cAgentData);
4239 4243
4240 int ntimes = 20; 4244 int ntimes = 20;
4241 if (cAgentData.SenderWantsToWaitForRoot) 4245 if (cAgentData.SenderWantsToWaitForRoot)
4242 { 4246 {
4243 while (childAgentUpdate.IsChildAgent && ntimes-- > 0) 4247 while (sp.IsChildAgent && ntimes-- > 0)
4244 Thread.Sleep(1000); 4248 Thread.Sleep(1000);
4245 4249
4246 m_log.DebugFormat( 4250 m_log.DebugFormat(
4247 "[SCENE]: Found presence {0} {1} {2} in {3} after {4} waits", 4251 "[SCENE]: Found presence {0} {1} {2} in {3} after {4} waits",
4248 childAgentUpdate.Name, childAgentUpdate.UUID, childAgentUpdate.IsChildAgent ? "child" : "root", RegionInfo.RegionName, 20 - ntimes); 4252 sp.Name, sp.UUID, sp.IsChildAgent ? "child" : "root", Name, 20 - ntimes);
4249 4253
4250 if (childAgentUpdate.IsChildAgent) 4254 if (sp.IsChildAgent)
4251 return false; 4255 return false;
4252 } 4256 }
4257
4253 return true; 4258 return true;
4254 } 4259 }
4260
4255 return false; 4261 return false;
4256 } 4262 }
4257 4263
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 0ba2dab..7fd1302 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -285,10 +285,24 @@ namespace OpenSim.Region.Framework.Scenes
285 /// </summary> 285 /// </summary>
286 private Vector3 posLastSignificantMove; 286 private Vector3 posLastSignificantMove;
287 287
288 // For teleports and crossings callbacks 288 #region For teleports and crossings callbacks
289
290 /// <summary>
291 /// In the V1 teleport protocol, the destination simulator sends ReleaseAgent to this address.
292 /// </summary>
289 string m_callbackURI; 293 string m_callbackURI;
294
290 UUID m_originRegionID; 295 UUID m_originRegionID;
291 296
297 /// <summary>
298 /// Used by the entity transfer module to signal when the presence should not be closed because a subsequent
299 /// teleport is reusing the connection.
300 /// </summary>
301 /// <remarks>May be refactored or move somewhere else soon.</remarks>
302 public bool DoNotCloseAfterTeleport { get; set; }
303
304 #endregion
305
292 /// <value> 306 /// <value>
293 /// Script engines present in the scene 307 /// Script engines present in the scene
294 /// </value> 308 /// </value>
@@ -717,13 +731,6 @@ namespace OpenSim.Region.Framework.Scenes
717 } 731 }
718 } 732 }
719 733
720 /// <summary>
721 /// Used by the entity transfer module to signal when the presence should not be closed because a subsequent
722 /// teleport is reusing the connection.
723 /// </summary>
724 /// <remarks>May be refactored or move somewhere else soon.</remarks>
725 public bool DoNotCloseAfterTeleport { get; set; }
726
727 private float m_speedModifier = 1.0f; 734 private float m_speedModifier = 1.0f;
728 735
729 public float SpeedModifier 736 public float SpeedModifier
@@ -1325,14 +1332,14 @@ namespace OpenSim.Region.Framework.Scenes
1325 int count = 20; 1332 int count = 20;
1326 while (m_originRegionID.Equals(UUID.Zero) && count-- > 0) 1333 while (m_originRegionID.Equals(UUID.Zero) && count-- > 0)
1327 { 1334 {
1328 m_log.DebugFormat("[SCENE PRESENCE]: Agent {0} waiting for update in {1}", client.Name, Scene.RegionInfo.RegionName); 1335 m_log.DebugFormat("[SCENE PRESENCE]: Agent {0} waiting for update in {1}", client.Name, Scene.Name);
1329 Thread.Sleep(200); 1336 Thread.Sleep(200);
1330 } 1337 }
1331 1338
1332 if (m_originRegionID.Equals(UUID.Zero)) 1339 if (m_originRegionID.Equals(UUID.Zero))
1333 { 1340 {
1334 // Movement into region will fail 1341 // Movement into region will fail
1335 m_log.WarnFormat("[SCENE PRESENCE]: Update agent {0} never arrived", client.Name); 1342 m_log.WarnFormat("[SCENE PRESENCE]: Update agent {0} never arrived in {1}", client.Name, Scene.Name);
1336 return false; 1343 return false;
1337 } 1344 }
1338 1345