aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs26
1 files changed, 16 insertions, 10 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