aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-05-25 02:02:53 +0100
committerJustin Clark-Casey (justincc)2012-05-25 02:02:53 +0100
commit40c78b06246d1131e07982dc6a9366666d9ea031 (patch)
tree094bc14aabd790bb97127a6406c17d80a469ceb0 /OpenSim/Region/Framework
parentIn remote QueryAccess, also receive the actual status (true|false) instead of... (diff)
downloadopensim-SC-40c78b06246d1131e07982dc6a9366666d9ea031.zip
opensim-SC-40c78b06246d1131e07982dc6a9366666d9ea031.tar.gz
opensim-SC-40c78b06246d1131e07982dc6a9366666d9ea031.tar.bz2
opensim-SC-40c78b06246d1131e07982dc6a9366666d9ea031.tar.xz
Stop it being possible for an agent to teleport back to its source region before the source region has finished cleaning up old agent data and structures.
If this is allowed, then the client usually gets forcibly logged out and data structures might be put into bad states. To prevent this, the binary state machine of EMT.m_agentsInTransit is replaced with a 4 state machine (Preparing, Transferring, ReceivedAtDestination, CleaningUp). This is necessary because the source region needs to know when the destination region has received the user but a teleport back cannot happen until the source region has cleaned up. Tested on standalone, grid and with v1 and v3 clients.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs6
2 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs b/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
index 75c44d5..69be83e 100644
--- a/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
@@ -77,8 +77,8 @@ namespace OpenSim.Region.Framework.Interfaces
77 /// <summary> 77 /// <summary>
78 /// Show whether the given agent is being teleported. 78 /// Show whether the given agent is being teleported.
79 /// </summary> 79 /// </summary>
80 /// <returns>true if the agent is in the process of being teleported, false otherwise.</returns>
81 /// <param name='id'>The agent ID</para></param> 80 /// <param name='id'>The agent ID</para></param>
81 /// <returns>true if the agent is in the process of being teleported, false otherwise.</returns>
82 bool IsInTransit(UUID id); 82 bool IsInTransit(UUID id);
83 83
84 bool Cross(ScenePresence agent, bool isFlying); 84 bool Cross(ScenePresence agent, bool isFlying);
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 755b1e6..98a75e4 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -5212,10 +5212,10 @@ namespace OpenSim.Region.Framework.Scenes
5212 { 5212 {
5213 if (EntityTransferModule.IsInTransit(agentID)) 5213 if (EntityTransferModule.IsInTransit(agentID))
5214 { 5214 {
5215 reason = "Agent is already in transit on this region"; 5215 reason = "Agent is still in transit from this region";
5216 5216
5217 m_log.DebugFormat( 5217 m_log.WarnFormat(
5218 "[SCENE]: Denying agent {0} entry into {1} since region already has them registered as in transit", 5218 "[SCENE]: Denying agent {0} entry into {1} since region still has them registered as in transit",
5219 agentID, RegionInfo.RegionName); 5219 agentID, RegionInfo.RegionName);
5220 5220
5221 return false; 5221 return false;