diff options
Diffstat (limited to 'OpenSim/Region')
3 files changed, 33 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 07c3666..01b1668 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -1206,6 +1206,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1206 | // region doesn't take it | 1206 | // region doesn't take it |
1207 | m_entityTransferStateMachine.UpdateInTransit(agent.UUID, AgentTransferState.CleaningUp); | 1207 | m_entityTransferStateMachine.UpdateInTransit(agent.UUID, AgentTransferState.CleaningUp); |
1208 | 1208 | ||
1209 | m_log.WarnFormat( | ||
1210 | "[ENTITY TRANSFER MODULE]: Region {0} would not accept update for agent {1} on cross attempt. Returning to original region.", | ||
1211 | neighbourRegion.RegionName, agent.Name); | ||
1212 | |||
1209 | ReInstantiateScripts(agent); | 1213 | ReInstantiateScripts(agent); |
1210 | agent.AddToPhysicalScene(isFlying); | 1214 | agent.AddToPhysicalScene(isFlying); |
1211 | 1215 | ||
@@ -1225,6 +1229,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1225 | neighbourRegion.RegionHandle); | 1229 | neighbourRegion.RegionHandle); |
1226 | return agent; | 1230 | return agent; |
1227 | } | 1231 | } |
1232 | |||
1228 | // No turning back | 1233 | // No turning back |
1229 | agent.IsChildAgent = true; | 1234 | agent.IsChildAgent = true; |
1230 | 1235 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs index 3c18074..a413546 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs | |||
@@ -219,12 +219,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
219 | { | 219 | { |
220 | // m_log.DebugFormat( | 220 | // m_log.DebugFormat( |
221 | // "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate", | 221 | // "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate", |
222 | // s.RegionInfo.RegionName, destination.RegionHandle); | 222 | // destination.RegionName, destination.RegionID); |
223 | 223 | ||
224 | return m_scenes[destination.RegionID].IncomingChildAgentDataUpdate(cAgentData); | 224 | return m_scenes[destination.RegionID].IncomingChildAgentDataUpdate(cAgentData); |
225 | } | 225 | } |
226 | 226 | ||
227 | // m_log.DebugFormat("[LOCAL COMMS]: Did not find region {0} for ChildAgentUpdate", regionHandle); | 227 | // m_log.DebugFormat( |
228 | // "[LOCAL COMMS]: Did not find region {0} {1} for ChildAgentUpdate", | ||
229 | // destination.RegionName, destination.RegionID); | ||
230 | |||
228 | return false; | 231 | return false; |
229 | } | 232 | } |
230 | 233 | ||
@@ -239,7 +242,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
239 | // note that we really don't need the GridRegion for this call | 242 | // note that we really don't need the GridRegion for this call |
240 | foreach (Scene s in m_scenes.Values) | 243 | foreach (Scene s in m_scenes.Values) |
241 | { | 244 | { |
242 | //m_log.Debug("[LOCAL COMMS]: Found region to send ChildAgentUpdate"); | 245 | // m_log.Debug("[LOCAL COMMS]: Found region to send ChildAgentUpdate"); |
243 | s.IncomingChildAgentDataUpdate(cAgentData); | 246 | s.IncomingChildAgentDataUpdate(cAgentData); |
244 | } | 247 | } |
245 | 248 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs index ef9fff5..81a2fcc 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | ||
29 | using System.Reflection; | 30 | using System.Reflection; |
30 | using Nini.Config; | 31 | using Nini.Config; |
31 | using NUnit.Framework; | 32 | using NUnit.Framework; |
@@ -65,10 +66,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
65 | public void TestCrossOnSameSimulator() | 66 | public void TestCrossOnSameSimulator() |
66 | { | 67 | { |
67 | TestHelpers.InMethod(); | 68 | TestHelpers.InMethod(); |
68 | TestHelpers.EnableLogging(); | 69 | // TestHelpers.EnableLogging(); |
69 | 70 | ||
70 | UUID userId = TestHelpers.ParseTail(0x1); | 71 | UUID userId = TestHelpers.ParseTail(0x1); |
71 | 72 | ||
73 | // TestEventQueueGetModule eqmA = new TestEventQueueGetModule(); | ||
72 | EntityTransferModule etmA = new EntityTransferModule(); | 74 | EntityTransferModule etmA = new EntityTransferModule(); |
73 | EntityTransferModule etmB = new EntityTransferModule(); | 75 | EntityTransferModule etmB = new EntityTransferModule(); |
74 | LocalSimulationConnectorModule lscm = new LocalSimulationConnectorModule(); | 76 | LocalSimulationConnectorModule lscm = new LocalSimulationConnectorModule(); |
@@ -77,7 +79,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
77 | IConfig modulesConfig = config.AddConfig("Modules"); | 79 | IConfig modulesConfig = config.AddConfig("Modules"); |
78 | modulesConfig.Set("EntityTransferModule", etmA.Name); | 80 | modulesConfig.Set("EntityTransferModule", etmA.Name); |
79 | modulesConfig.Set("SimulationServices", lscm.Name); | 81 | modulesConfig.Set("SimulationServices", lscm.Name); |
80 | IConfig entityTransferConfig = config.AddConfig("EntityTransfer"); | 82 | // IConfig entityTransferConfig = config.AddConfig("EntityTransfer"); |
81 | 83 | ||
82 | // In order to run a single threaded regression test we do not want the entity transfer module waiting | 84 | // In order to run a single threaded regression test we do not want the entity transfer module waiting |
83 | // for a callback from the destination scene before removing its avatar data. | 85 | // for a callback from the destination scene before removing its avatar data. |
@@ -89,6 +91,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
89 | 91 | ||
90 | SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); | 92 | SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); |
91 | SceneHelpers.SetupSceneModules(sceneA, config, new CapabilitiesModule(), etmA); | 93 | SceneHelpers.SetupSceneModules(sceneA, config, new CapabilitiesModule(), etmA); |
94 | // SceneHelpers.SetupSceneModules(sceneA, config, new CapabilitiesModule(), etmA, eqmA); | ||
92 | SceneHelpers.SetupSceneModules(sceneB, config, new CapabilitiesModule(), etmB); | 95 | SceneHelpers.SetupSceneModules(sceneB, config, new CapabilitiesModule(), etmB); |
93 | 96 | ||
94 | ScenePresence originalSp = SceneHelpers.AddScenePresence(sceneA, userId, sh.SceneManager); | 97 | ScenePresence originalSp = SceneHelpers.AddScenePresence(sceneA, userId, sh.SceneManager); |
@@ -98,6 +101,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
98 | 101 | ||
99 | // Console.WriteLine("First pos {0}", originalSp.AbsolutePosition); | 102 | // Console.WriteLine("First pos {0}", originalSp.AbsolutePosition); |
100 | 103 | ||
104 | // eqmA.ClearEvents(); | ||
105 | |||
101 | AgentUpdateArgs moveArgs = new AgentUpdateArgs(); | 106 | AgentUpdateArgs moveArgs = new AgentUpdateArgs(); |
102 | //moveArgs.BodyRotation = Quaternion.CreateFromEulers(Vector3.Zero); | 107 | //moveArgs.BodyRotation = Quaternion.CreateFromEulers(Vector3.Zero); |
103 | moveArgs.BodyRotation = Quaternion.CreateFromEulers(new Vector3(0, 0, (float)-(Math.PI / 2))); | 108 | moveArgs.BodyRotation = Quaternion.CreateFromEulers(new Vector3(0, 0, (float)-(Math.PI / 2))); |
@@ -117,6 +122,18 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
117 | // Console.WriteLine("Pos {0}", originalSp.AbsolutePosition); | 122 | // Console.WriteLine("Pos {0}", originalSp.AbsolutePosition); |
118 | } | 123 | } |
119 | 124 | ||
125 | // Need to sort processing of EnableSimulator message on adding scene presences before we can test eqm | ||
126 | // messages | ||
127 | // Dictionary<UUID, List<TestEventQueueGetModule.Event>> eqmEvents = eqmA.Events; | ||
128 | // | ||
129 | // Assert.That(eqmEvents.Count, Is.EqualTo(1)); | ||
130 | // Assert.That(eqmEvents.ContainsKey(originalSp.UUID), Is.True); | ||
131 | // | ||
132 | // List<TestEventQueueGetModule.Event> spEqmEvents = eqmEvents[originalSp.UUID]; | ||
133 | // | ||
134 | // Assert.That(spEqmEvents.Count, Is.EqualTo(1)); | ||
135 | // Assert.That(spEqmEvents[0].Name, Is.EqualTo("CrossRegion")); | ||
136 | |||
120 | // sceneA should now only have a child agent | 137 | // sceneA should now only have a child agent |
121 | ScenePresence spAfterCrossSceneA = sceneA.GetScenePresence(originalSp.UUID); | 138 | ScenePresence spAfterCrossSceneA = sceneA.GetScenePresence(originalSp.UUID); |
122 | Assert.That(spAfterCrossSceneA.IsChildAgent, Is.True); | 139 | Assert.That(spAfterCrossSceneA.IsChildAgent, Is.True); |
@@ -128,12 +145,12 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
128 | 145 | ||
129 | TestClient sceneBTc = ((TestClient)spAfterCrossSceneB.ControllingClient); | 146 | TestClient sceneBTc = ((TestClient)spAfterCrossSceneB.ControllingClient); |
130 | 147 | ||
131 | bool receivedCompleteMovement = false; | 148 | int agentMovementCompleteReceived = 0; |
132 | sceneBTc.OnReceivedMoveAgentIntoRegion += (ri, pos, look) => receivedCompleteMovement = true; | 149 | sceneBTc.OnReceivedMoveAgentIntoRegion += (ri, pos, look) => agentMovementCompleteReceived++; |
133 | 150 | ||
134 | sceneBTc.CompleteMovement(); | 151 | sceneBTc.CompleteMovement(); |
135 | 152 | ||
136 | Assert.That(receivedCompleteMovement, Is.True); | 153 | Assert.That(agentMovementCompleteReceived, Is.EqualTo(1)); |
137 | Assert.That(spAfterCrossSceneB.IsChildAgent, Is.False); | 154 | Assert.That(spAfterCrossSceneB.IsChildAgent, Is.False); |
138 | } | 155 | } |
139 | } | 156 | } |