From 3ce46adb2a614dda85b8207bb327dae6024824d8 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 18 Sep 2013 22:56:00 +0100
Subject: minor: Make log message when Scene.IncomingChildAgentDateUpdate()
 more explicit that there is a problem if it still finds the agent to be a
 child if the sender wanted to wait till it became root

Add some comments about the mssage sequence, though much more data is at
http://opensimulator.org/wiki/Teleports
---
 OpenSim/Region/Framework/Scenes/Scene.cs         | 11 ++++++++---
 OpenSim/Region/Framework/Scenes/ScenePresence.cs |  5 ++++-
 2 files changed, 12 insertions(+), 4 deletions(-)

(limited to 'OpenSim')

diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index e00206f..6c9a8df 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4338,9 +4338,14 @@ namespace OpenSim.Region.Framework.Scenes
                     while (sp.IsChildAgent && ntimes-- > 0)
                         Thread.Sleep(1000);
 
-                    m_log.DebugFormat(
-                        "[SCENE]: Found presence {0} {1} {2} in {3} after {4} waits",
-                        sp.Name, sp.UUID, sp.IsChildAgent ? "child" : "root", Name, 20 - ntimes);
+                    if (sp.IsChildAgent)
+                        m_log.DebugFormat(
+                            "[SCENE]: Found presence {0} {1} unexpectedly still child in {2}",
+                            sp.Name, sp.UUID, Name);
+                    else
+                        m_log.DebugFormat(
+                            "[SCENE]: Found presence {0} {1} as root in {2} after {3} waits",
+                                sp.Name, sp.UUID, Name, 20 - ntimes);
 
                     if (sp.IsChildAgent)
                         return false;
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index b4e8f09..d542e47 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1354,7 +1354,10 @@ namespace OpenSim.Region.Framework.Scenes
 
         private bool WaitForUpdateAgent(IClientAPI client)
         {
-            // Before UpdateAgent, m_originRegionID is UUID.Zero; after, it's non-Zero
+            // Before the source region executes UpdateAgent
+            // (which triggers Scene.IncomingChildAgentDataUpdate(AgentData cAgentData) here in the destination, 
+            // m_originRegionID is UUID.Zero; after, it's non-Zero.  The CompleteMovement sequence initiated from the
+            // viewer (in turn triggered by the source region sending it a TeleportFinish event) waits until it's non-zero
             int count = 50;
             while (m_originRegionID.Equals(UUID.Zero) && count-- > 0)
             {
-- 
cgit v1.1