diff options
author | Justin Clark-Casey (justincc) | 2014-12-10 00:25:27 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-12-10 00:25:27 +0000 |
commit | 2b9f0647de513f6a916d9d58d4e7883d30b804d3 (patch) | |
tree | 6a41a0a0c88eb6b6c1ce1d19d64de3837b89c293 /OpenSim/Region/CoreModules | |
parent | Avoid a possible race condition where the XEngine script compile thread could... (diff) | |
download | opensim-SC-2b9f0647de513f6a916d9d58d4e7883d30b804d3.zip opensim-SC-2b9f0647de513f6a916d9d58d4e7883d30b804d3.tar.gz opensim-SC-2b9f0647de513f6a916d9d58d4e7883d30b804d3.tar.bz2 opensim-SC-2b9f0647de513f6a916d9d58d4e7883d30b804d3.tar.xz |
Fix a regression where objects crossing regions in the same simulator (on their own or as attachments) with AppDomainLoading = false would create the new state in the source region area rather than the dest.
This was beause the code was finding the script DLL compiled for the source region as everything is in the same appdomain and using this as the location for the destination script state, etc.
This resolves the regression by passing the proper destination separately from the DLL retrieved.
Probably a regression since commit d7b92604 (11 July 2014).
Added regression test for this case.
At least partly addresses http://opensimulator.org/mantis/view.php?id=7278
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index a3368fb..ff7a062 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -255,6 +255,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
255 | 255 | ||
256 | public void CopyAttachments(AgentData ad, IScenePresence sp) | 256 | public void CopyAttachments(AgentData ad, IScenePresence sp) |
257 | { | 257 | { |
258 | // m_log.DebugFormat("[ATTACHMENTS MODULE]: Copying attachment data into {0} in {1}", sp.Name, m_scene.Name); | ||
259 | |||
258 | if (ad.AttachmentObjects != null && ad.AttachmentObjects.Count > 0) | 260 | if (ad.AttachmentObjects != null && ad.AttachmentObjects.Count > 0) |
259 | { | 261 | { |
260 | lock (sp.AttachmentsSyncLock) | 262 | lock (sp.AttachmentsSyncLock) |
@@ -265,6 +267,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
265 | { | 267 | { |
266 | ((SceneObjectGroup)so).LocalId = 0; | 268 | ((SceneObjectGroup)so).LocalId = 0; |
267 | ((SceneObjectGroup)so).RootPart.ClearUpdateSchedule(); | 269 | ((SceneObjectGroup)so).RootPart.ClearUpdateSchedule(); |
270 | |||
271 | // m_log.DebugFormat( | ||
272 | // "[ATTACHMENTS MODULE]: Copying script state with {0} bytes for object {1} for {2} in {3}", | ||
273 | // ad.AttachmentObjectStates[i].Length, so.Name, sp.Name, m_scene.Name); | ||
274 | |||
268 | so.SetState(ad.AttachmentObjectStates[i++], m_scene); | 275 | so.SetState(ad.AttachmentObjectStates[i++], m_scene); |
269 | m_scene.IncomingCreateObject(Vector3.Zero, so); | 276 | m_scene.IncomingCreateObject(Vector3.Zero, so); |
270 | } | 277 | } |