diff options
author | Melanie | 2013-08-17 03:23:45 +0100 |
---|---|---|
committer | Melanie | 2013-08-17 03:23:45 +0100 |
commit | bef03fb30be67dbe671dcc330558daf8a6c4bb22 (patch) | |
tree | 6d221db8af5bdb1a09190527a79aae3dfe3116d9 /OpenSim/Region/CoreModules/Framework | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Remove mono compiler warnings from UserProfilesModule (diff) | |
download | opensim-SC_OLD-bef03fb30be67dbe671dcc330558daf8a6c4bb22.zip opensim-SC_OLD-bef03fb30be67dbe671dcc330558daf8a6c4bb22.tar.gz opensim-SC_OLD-bef03fb30be67dbe671dcc330558daf8a6c4bb22.tar.bz2 opensim-SC_OLD-bef03fb30be67dbe671dcc330558daf8a6c4bb22.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 47 |
1 files changed, 22 insertions, 25 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 711167f..6ff9988 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -317,7 +317,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
317 | "[ENTITY TRANSFER MODULE]: Ignoring teleport request of {0} {1} to {2}@{3} - agent is already in transit.", | 317 | "[ENTITY TRANSFER MODULE]: Ignoring teleport request of {0} {1} to {2}@{3} - agent is already in transit.", |
318 | sp.Name, sp.UUID, position, regionHandle); | 318 | sp.Name, sp.UUID, position, regionHandle); |
319 | 319 | ||
320 | sp.ControllingClient.SendTeleportFailed("Slow down!"); | 320 | sp.ControllingClient.SendTeleportFailed("Previous teleport process incomplete. Please retry shortly."); |
321 | |||
321 | return; | 322 | return; |
322 | } | 323 | } |
323 | 324 | ||
@@ -1034,6 +1035,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1034 | agent.SenderWantsToWaitForRoot = true; | 1035 | agent.SenderWantsToWaitForRoot = true; |
1035 | //SetCallbackURL(agent, sp.Scene.RegionInfo); | 1036 | //SetCallbackURL(agent, sp.Scene.RegionInfo); |
1036 | 1037 | ||
1038 | // Reset the do not close flag. This must be done before the destination opens child connections (here | ||
1039 | // triggered by UpdateAgent) to avoid race conditions. However, we also want to reset it as late as possible | ||
1040 | // to avoid a situation where an unexpectedly early call to Scene.NewUserConnection() wrongly results | ||
1041 | // in no close. | ||
1042 | sp.DoNotCloseAfterTeleport = false; | ||
1043 | |||
1037 | // Send the Update. If this returns true, we know the client has contacted the destination | 1044 | // Send the Update. If this returns true, we know the client has contacted the destination |
1038 | // via CompleteMovementIntoRegion, so we can let go. | 1045 | // via CompleteMovementIntoRegion, so we can let go. |
1039 | // If it returns false, something went wrong, and we need to abort. | 1046 | // If it returns false, something went wrong, and we need to abort. |
@@ -1060,6 +1067,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1060 | 1067 | ||
1061 | m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); | 1068 | m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); |
1062 | 1069 | ||
1070 | // Need to signal neighbours whether child agents may need closing irrespective of whether this | ||
1071 | // one needed closing. We also need to close child agents as quickly as possible to avoid complicated | ||
1072 | // race conditions with rapid agent releporting (e.g. from A1 to a non-neighbour B, back | ||
1073 | // to a neighbour A2 then off to a non-neighbour C). Closing child agents any later requires complex | ||
1074 | // distributed checks to avoid problems in rapid reteleporting scenarios and where child agents are | ||
1075 | // abandoned without proper close by viewer but then re-used by an incoming connection. | ||
1076 | sp.CloseChildAgents(newRegionX, newRegionY); | ||
1077 | |||
1063 | // May need to logout or other cleanup | 1078 | // May need to logout or other cleanup |
1064 | AgentHasMovedAway(sp, logout); | 1079 | AgentHasMovedAway(sp, logout); |
1065 | 1080 | ||
@@ -1069,22 +1084,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1069 | // Now let's make it officially a child agent | 1084 | // Now let's make it officially a child agent |
1070 | sp.MakeChildAgent(); | 1085 | sp.MakeChildAgent(); |
1071 | 1086 | ||
1072 | // May still need to signal neighbours whether child agents may need closing irrespective of whether this | ||
1073 | // one needed closing. Neighbour regions also contain logic to prevent a close if a subsequent move or | ||
1074 | // teleport re-established the child connection. | ||
1075 | // | ||
1076 | // It may be possible to also close child agents after a pause but one needs to be very careful about | ||
1077 | // race conditions between different regions on rapid teleporting (e.g. from A1 to a non-neighbour B, back | ||
1078 | // to a neighbour A2 then off to a non-neighbour C. Also, closing child agents early may be more compatible | ||
1079 | // with complicated scenarios where there a mixture of V1 and V2 teleports, though this is conjecture. It's | ||
1080 | // easier to close immediately and greatly reduce the scope of race conditions if possible. | ||
1081 | sp.CloseChildAgents(newRegionX, newRegionY); | ||
1082 | |||
1083 | // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone | 1087 | // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone |
1084 | if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) | 1088 | if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) |
1085 | { | 1089 | { |
1086 | sp.DoNotCloseAfterTeleport = false; | ||
1087 | |||
1088 | // RED ALERT!!!! | 1090 | // RED ALERT!!!! |
1089 | // PLEASE DO NOT DECREASE THIS WAIT TIME UNDER ANY CIRCUMSTANCES. | 1091 | // PLEASE DO NOT DECREASE THIS WAIT TIME UNDER ANY CIRCUMSTANCES. |
1090 | // THE VIEWERS SEEM TO NEED SOME TIME AFTER RECEIVING MoveAgentIntoRegion | 1092 | // THE VIEWERS SEEM TO NEED SOME TIME AFTER RECEIVING MoveAgentIntoRegion |
@@ -1093,17 +1095,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1093 | // IN THE AVIE BEING PLACED IN INFINITY FOR A COUPLE OF SECONDS. | 1095 | // IN THE AVIE BEING PLACED IN INFINITY FOR A COUPLE OF SECONDS. |
1094 | Thread.Sleep(15000); | 1096 | Thread.Sleep(15000); |
1095 | 1097 | ||
1096 | if (!sp.DoNotCloseAfterTeleport) | 1098 | // OK, it got this agent. Let's close everything |
1097 | { | 1099 | // If we shouldn't close the agent due to some other region renewing the connection |
1098 | // OK, it got this agent. Let's close everything | 1100 | // then this will be handled in IncomingCloseAgent under lock conditions |
1099 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Closing agent {0} in {1}", sp.Name, Scene.Name); | 1101 | m_log.DebugFormat( |
1100 | sp.Scene.IncomingCloseAgent(sp.UUID, false); | 1102 | "[ENTITY TRANSFER MODULE]: Closing agent {0} in {1} after teleport", sp.Name, Scene.Name); |
1101 | } | 1103 | sp.Scene.IncomingCloseAgent(sp.UUID, false); |
1102 | else | ||
1103 | { | ||
1104 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Not closing agent {0}, user is back in {1}", sp.Name, Scene.Name); | ||
1105 | sp.DoNotCloseAfterTeleport = false; | ||
1106 | } | ||
1107 | } | 1104 | } |
1108 | else | 1105 | else |
1109 | { | 1106 | { |