aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-05-14 21:49:29 +0100
committerJustin Clark-Casey (justincc)2014-05-14 21:49:29 +0100
commit2f7539a25b859d3983ad78106d9cac78abda2b4d (patch)
tree097f39d21258c9c47793f8cff0787a698a2a21a1 /OpenSim/Region/Framework/Scenes
parentminor: Clean up and make consistent some log file messages in EstateManagemen... (diff)
downloadopensim-SC_OLD-2f7539a25b859d3983ad78106d9cac78abda2b4d.zip
opensim-SC_OLD-2f7539a25b859d3983ad78106d9cac78abda2b4d.tar.gz
opensim-SC_OLD-2f7539a25b859d3983ad78106d9cac78abda2b4d.tar.bz2
opensim-SC_OLD-2f7539a25b859d3983ad78106d9cac78abda2b4d.tar.xz
Remove a race where the client's SP.CompleteMovement() thread could attempt to restart attachment scripts before the source simulator's SP.UpdateAgent() thread had added them.
This commit changes the order of code so that attachments are re-added before the CompleteMovement() thread is released. Relates to http://opensimulator.org/mantis/view.php?id=7148
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs9
1 files changed, 6 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 8c56975..6020a9e 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3876,9 +3876,6 @@ namespace OpenSim.Region.Framework.Scenes
3876 3876
3877 private void CopyFrom(AgentData cAgent) 3877 private void CopyFrom(AgentData cAgent)
3878 { 3878 {
3879 lock (m_originRegionIDAccessLock)
3880 m_originRegionID = cAgent.RegionID;
3881
3882 m_callbackURI = cAgent.CallbackURI; 3879 m_callbackURI = cAgent.CallbackURI;
3883// m_log.DebugFormat( 3880// m_log.DebugFormat(
3884// "[SCENE PRESENCE]: Set callback for {0} in {1} to {2} in CopyFrom()", 3881// "[SCENE PRESENCE]: Set callback for {0} in {1} to {2} in CopyFrom()",
@@ -3951,6 +3948,12 @@ namespace OpenSim.Region.Framework.Scenes
3951 3948
3952 if (Scene.AttachmentsModule != null) 3949 if (Scene.AttachmentsModule != null)
3953 Scene.AttachmentsModule.CopyAttachments(cAgent, this); 3950 Scene.AttachmentsModule.CopyAttachments(cAgent, this);
3951
3952 // This must occur after attachments are copied, as it releases the CompleteMovement() calling thread
3953 // originating from the client completing a teleport. Otherwise, CompleteMovement() code to restart
3954 // script attachments can outrace this thread.
3955 lock (m_originRegionIDAccessLock)
3956 m_originRegionID = cAgent.RegionID;
3954 } 3957 }
3955 3958
3956 public bool CopyAgent(out IAgentData agent) 3959 public bool CopyAgent(out IAgentData agent)