aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-03-21 00:46:08 +0000
committerJustin Clark-Casey (justincc)2013-03-21 00:46:08 +0000
commit46c833810ccd9dd0c3273803e208dc85bb0860a9 (patch)
treeb30743cd471a706fdfd240747194607dd8f13a0c /OpenSim
parentminor: disable logging on regression TestCrossOnSameSimulator() that I accide... (diff)
downloadopensim-SC_OLD-46c833810ccd9dd0c3273803e208dc85bb0860a9.zip
opensim-SC_OLD-46c833810ccd9dd0c3273803e208dc85bb0860a9.tar.gz
opensim-SC_OLD-46c833810ccd9dd0c3273803e208dc85bb0860a9.tar.bz2
opensim-SC_OLD-46c833810ccd9dd0c3273803e208dc85bb0860a9.tar.xz
On a teleport, lock m_agentsInTransit whilst we grab the value to check for completion just to be sure we're not using a thread cached version.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs9
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs8
2 files changed, 12 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs
index 24d81d9..7314727 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs
@@ -292,8 +292,15 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
292 292
293 // There should be no race condition here since no other code should be removing the agent transfer or 293 // There should be no race condition here since no other code should be removing the agent transfer or
294 // changing the state to another other than Transferring => ReceivedAtDestination. 294 // changing the state to another other than Transferring => ReceivedAtDestination.
295 while (m_agentsInTransit[id] != AgentTransferState.ReceivedAtDestination && count-- > 0) 295
296 while (count-- > 0)
296 { 297 {
298 lock (m_agentsInTransit)
299 {
300 if (m_agentsInTransit[id] == AgentTransferState.ReceivedAtDestination)
301 break;
302 }
303
297// m_log.Debug(" >>> Waiting... " + count); 304// m_log.Debug(" >>> Waiting... " + count);
298 Thread.Sleep(100); 305 Thread.Sleep(100);
299 } 306 }
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
index d6bc313..de4458d 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
@@ -107,7 +107,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
107 } 107 }
108 108
109 [Test] 109 [Test]
110 public void TestSameSimulatorSeparatedRegions() 110 public void TestSameSimulatorIsolatedRegions()
111 { 111 {
112 TestHelpers.InMethod(); 112 TestHelpers.InMethod();
113// TestHelpers.EnableLogging(); 113// TestHelpers.EnableLogging();
@@ -180,7 +180,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
180 /// Test teleport procedures when the target simulator returns false when queried about access. 180 /// Test teleport procedures when the target simulator returns false when queried about access.
181 /// </summary> 181 /// </summary>
182 [Test] 182 [Test]
183 public void TestSameSimulatorSeparatedRegions_DeniedOnQueryAccess() 183 public void TestSameSimulatorIsolatedRegions_DeniedOnQueryAccess()
184 { 184 {
185 TestHelpers.InMethod(); 185 TestHelpers.InMethod();
186// TestHelpers.EnableLogging(); 186// TestHelpers.EnableLogging();
@@ -264,7 +264,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
264 /// Test teleport procedures when the target simulator create agent step is refused. 264 /// Test teleport procedures when the target simulator create agent step is refused.
265 /// </summary> 265 /// </summary>
266 [Test] 266 [Test]
267 public void TestSameSimulatorSeparatedRegions_DeniedOnCreateAgent() 267 public void TestSameSimulatorIsolatedRegions_DeniedOnCreateAgent()
268 { 268 {
269 TestHelpers.InMethod(); 269 TestHelpers.InMethod();
270// TestHelpers.EnableLogging(); 270// TestHelpers.EnableLogging();
@@ -345,7 +345,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
345 /// (for CreateAgent) but the viewer cannot reach the destination region due to network issues. 345 /// (for CreateAgent) but the viewer cannot reach the destination region due to network issues.
346 /// </remarks> 346 /// </remarks>
347 [Test] 347 [Test]
348 public void TestSameSimulatorSeparatedRegions_DestinationDidNotProcessViewerConnection() 348 public void TestSameSimulatorIsolatedRegions_DestinationDidNotProcessViewerConnection()
349 { 349 {
350 TestHelpers.InMethod(); 350 TestHelpers.InMethod();
351// TestHelpers.EnableLogging(); 351// TestHelpers.EnableLogging();