aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-08-07 23:17:31 +0100
committerJustin Clark-Casey (justincc)2013-08-07 23:17:31 +0100
commitb10710d4a5f7fb33ee9b90aefac16ac3d4647db6 (patch)
treecc80637dd6261f3e384f56f3cd83251fe2d04979 /OpenSim/Region/Framework/Scenes
parentAdd post-CreateAgent teleport cancellation/abortion functionality from v1 tra... (diff)
downloadopensim-SC_OLD-b10710d4a5f7fb33ee9b90aefac16ac3d4647db6.zip
opensim-SC_OLD-b10710d4a5f7fb33ee9b90aefac16ac3d4647db6.tar.gz
opensim-SC_OLD-b10710d4a5f7fb33ee9b90aefac16ac3d4647db6.tar.bz2
opensim-SC_OLD-b10710d4a5f7fb33ee9b90aefac16ac3d4647db6.tar.xz
minor: add some method doc to ScenePresence fields used for entity transfer, add minor details to some log messages, rename a misleading local variable name.
No functional changes.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs26
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs27
2 files changed, 33 insertions, 20 deletions
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