aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-12-17 00:21:58 +0000
committerJustin Clark-Casey (justincc)2014-12-17 00:25:24 +0000
commite901253b49668f1e1d8f135f2d05aaec7baad40a (patch)
tree8a3459be6a167c3c406a0cff9886814622a0db73 /OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
parentAdd command to reset region's user cache (diff)
downloadopensim-SC_OLD-e901253b49668f1e1d8f135f2d05aaec7baad40a.zip
opensim-SC_OLD-e901253b49668f1e1d8f135f2d05aaec7baad40a.tar.gz
opensim-SC_OLD-e901253b49668f1e1d8f135f2d05aaec7baad40a.tar.bz2
opensim-SC_OLD-e901253b49668f1e1d8f135f2d05aaec7baad40a.tar.xz
Fix recent regression where a race condition meant SP.MakeRootAgent() would sometimes look to start attachment scripts before ETM.HandleIncomingSceneObject() had added them.
Probably a regression since ghosts branch merge on Nov 26 2014
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs16
1 files changed, 11 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index ff7a062..4af4ddb 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -341,11 +341,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
341 if (!Enabled) 341 if (!Enabled)
342 return; 342 return;
343 343
344 if (DebugLevel > 0)
345 m_log.DebugFormat("[ATTACHMENTS MODULE]: Saving changed attachments for {0}", sp.Name);
346
347 List<SceneObjectGroup> attachments = sp.GetAttachments(); 344 List<SceneObjectGroup> attachments = sp.GetAttachments();
348 345
346 if (DebugLevel > 0)
347 m_log.DebugFormat(
348 "[ATTACHMENTS MODULE]: Saving for {0} attachments for {1} in {2}",
349 attachments.Count, sp.Name, m_scene.Name);
350
349 if (attachments.Count <= 0) 351 if (attachments.Count <= 0)
350 return; 352 return;
351 353
@@ -359,6 +361,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
359 // This must be done outside the sp.AttachmentSyncLock so that there is no risk of a deadlock from 361 // This must be done outside the sp.AttachmentSyncLock so that there is no risk of a deadlock from
360 // scripts performing attachment operations at the same time. Getting object states stops the scripts. 362 // scripts performing attachment operations at the same time. Getting object states stops the scripts.
361 scriptStates[so] = PrepareScriptInstanceForSave(so, false); 363 scriptStates[so] = PrepareScriptInstanceForSave(so, false);
364
365// m_log.DebugFormat(
366// "[ATTACHMENTS MODULE]: For object {0} for {1} in {2} got saved state {3}",
367// so.Name, sp.Name, m_scene.Name, scriptStates[so]);
362 } 368 }
363 369
364 lock (sp.AttachmentsSyncLock) 370 lock (sp.AttachmentsSyncLock)
@@ -826,8 +832,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
826 { 832 {
827 if (DebugLevel > 0) 833 if (DebugLevel > 0)
828 m_log.DebugFormat( 834 m_log.DebugFormat(
829 "[ATTACHMENTS MODULE]: Adding attachment {0} to avatar {1} in pt {2} pos {3} {4}", 835 "[ATTACHMENTS MODULE]: Adding attachment {0} to avatar {1} at pt {2} pos {3} {4} in {5}",
830 so.Name, sp.Name, attachmentpoint, attachOffset, so.RootPart.AttachedPos); 836 so.Name, sp.Name, attachmentpoint, attachOffset, so.RootPart.AttachedPos, m_scene.Name);
831 837
832 // Remove from database and parcel prim count 838 // Remove from database and parcel prim count
833 m_scene.DeleteFromStorage(so.UUID); 839 m_scene.DeleteFromStorage(so.UUID);