aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs23
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs10
2 files changed, 16 insertions, 17 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 15a0493..e638d9a 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4513,8 +4513,7 @@ Label_GroupsDone:
4513 "[SCENE]: update for {0} in {1} refused: Logins Disabled", cAgentData.AgentID, RegionInfo.RegionName); 4513 "[SCENE]: update for {0} in {1} refused: Logins Disabled", cAgentData.AgentID, RegionInfo.RegionName);
4514 return false; 4514 return false;
4515 } 4515 }
4516 // We have to wait until the viewer contacts this region after receiving EAC. 4516
4517 // That calls AddNewClient, which finally creates the ScenePresence
4518 int flags = GetUserFlags(cAgentData.AgentID); 4517 int flags = GetUserFlags(cAgentData.AgentID);
4519 if (RegionInfo.EstateSettings.IsBanned(cAgentData.AgentID, flags)) 4518 if (RegionInfo.EstateSettings.IsBanned(cAgentData.AgentID, flags))
4520 { 4519 {
@@ -4551,32 +4550,26 @@ Label_GroupsDone:
4551 if (cAgentData.SessionID != sp.ControllingClient.SessionId) 4550 if (cAgentData.SessionID != sp.ControllingClient.SessionId)
4552 { 4551 {
4553 m_log.WarnFormat( 4552 m_log.WarnFormat(
4554 "[SCENE]: Attempt to update agent {0} with invalid session id {1} (possibly from simulator in older version; tell them to update).", 4553 "[SCENE]: Attempt to update agent {0} with diferent session id {1} != {2}",
4555 sp.UUID, cAgentData.SessionID); 4554 sp.UUID, sp.ControllingClient.SessionId, cAgentData.SessionID);
4556 4555 return false;
4557 Console.WriteLine(String.Format("[SCENE]: Attempt to update agent {0} ({1}) with invalid session id {2}",
4558 sp.UUID, sp.ControllingClient.SessionId, cAgentData.SessionID));
4559 } 4556 }
4560 4557
4561 sp.UpdateChildAgent(cAgentData); 4558 sp.UpdateChildAgent(cAgentData);
4562 4559
4563 int ntimes = 20; 4560 int ntimes = 100;
4564 if (cAgentData.SenderWantsToWaitForRoot) 4561 if (cAgentData.SenderWantsToWaitForRoot)
4565 { 4562 {
4566 while (sp.IsChildAgent && ntimes-- > 0) 4563 while (sp.IsChildAgent && ntimes-- > 0)
4567 Thread.Sleep(1000); 4564 Thread.Sleep(250);
4568 4565
4569 if (sp.IsChildAgent) 4566 if (sp.IsChildAgent)
4567 {
4570 m_log.WarnFormat( 4568 m_log.WarnFormat(
4571 "[SCENE]: Found presence {0} {1} unexpectedly still child in {2}", 4569 "[SCENE]: Found presence {0} {1} unexpectedly still child in {2}",
4572 sp.Name, sp.UUID, Name); 4570 sp.Name, sp.UUID, Name);
4573 else
4574 m_log.InfoFormat(
4575 "[SCENE]: Found presence {0} {1} as root in {2} after {3} waits",
4576 sp.Name, sp.UUID, Name, 20 - ntimes);
4577
4578 if (sp.IsChildAgent)
4579 return false; 4571 return false;
4572 }
4580 } 4573 }
4581 4574
4582 return true; 4575 return true;
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 9c929a7..ed4cafa 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1559,6 +1559,7 @@ namespace OpenSim.Region.Framework.Scenes
1559 /// </remarks> 1559 /// </remarks>
1560 public void MakeChildAgent(ulong newRegionHandle) 1560 public void MakeChildAgent(ulong newRegionHandle)
1561 { 1561 {
1562 m_updateAgentReceivedAfterTransferEvent.Reset();
1562 haveGroupInformation = false; 1563 haveGroupInformation = false;
1563 gotCrossUpdate = false; 1564 gotCrossUpdate = false;
1564 crossingFlags = 0; 1565 crossingFlags = 0;
@@ -2000,6 +2001,10 @@ namespace OpenSim.Region.Framework.Scenes
2000 } 2001 }
2001 } 2002 }
2002 catch { } 2003 catch { }
2004 finally
2005 {
2006 m_updateAgentReceivedAfterTransferEvent.Reset();
2007 }
2003 2008
2004 return false; 2009 return false;
2005 } 2010 }
@@ -2286,8 +2291,8 @@ namespace OpenSim.Region.Framework.Scenes
2286 { 2291 {
2287 if (m_attachments.Count > 0) 2292 if (m_attachments.Count > 0)
2288 { 2293 {
2289 m_log.DebugFormat( 2294// m_log.DebugFormat(
2290 "[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name); 2295// "[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name);
2291 2296
2292 foreach (SceneObjectGroup sog in m_attachments) 2297 foreach (SceneObjectGroup sog in m_attachments)
2293 { 2298 {
@@ -5713,6 +5718,7 @@ namespace OpenSim.Region.Framework.Scenes
5713 { 5718 {
5714 IgnoredControls = ScriptControlled.CONTROL_ZERO; 5719 IgnoredControls = ScriptControlled.CONTROL_ZERO;
5715 obj.eventControls = (ScriptControlled)controls; 5720 obj.eventControls = (ScriptControlled)controls;
5721 obj.ignoreControls = ScriptControlled.CONTROL_ZERO;
5716 } 5722 }
5717 5723
5718 lock (scriptedcontrols) 5724 lock (scriptedcontrols)