aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Tests
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-06-25 21:08:19 +0100
committerJustin Clark-Casey (justincc)2012-06-25 21:08:19 +0100
commit5301648cff6b451fef4cca0baf8cda1bdb1455a6 (patch)
tree2877e517397265037c0342570a75757dc9462be0 /OpenSim/Region/Framework/Scenes/Tests
parentFix script "Running" behavior (diff)
downloadopensim-SC_OLD-5301648cff6b451fef4cca0baf8cda1bdb1455a6.zip
opensim-SC_OLD-5301648cff6b451fef4cca0baf8cda1bdb1455a6.tar.gz
opensim-SC_OLD-5301648cff6b451fef4cca0baf8cda1bdb1455a6.tar.bz2
opensim-SC_OLD-5301648cff6b451fef4cca0baf8cda1bdb1455a6.tar.xz
In AttachmentsModule.DetachSingleAttachmentToInvInternal(), remove attachment before changing properties for correct inventory serialization.
Serialization of attachments requires IsAttachment = false so that correct positions are serialized instead of avatar position. However, doing this when a hud is still attached allows race conditions with update threads, resulting in hud artifacts on other viewers. This change sets SOG.IsDeleted before serialization changes take place (IsDeleted itself is not a serialized property). LLClientView then screens out any deleted SOGs before sending updates to viewers.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Tests')
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
index 453e077..81add43 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
@@ -187,8 +187,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests
187 187
188 TestScene scene = new SceneHelpers().SetupScene(); 188 TestScene scene = new SceneHelpers().SetupScene();
189 SceneObjectPart part = SceneHelpers.AddSceneObject(scene); 189 SceneObjectPart part = SceneHelpers.AddSceneObject(scene);
190
191 Assert.That(part.ParentGroup.IsDeleted, Is.False);
192
190 scene.DeleteSceneObject(part.ParentGroup, false); 193 scene.DeleteSceneObject(part.ParentGroup, false);
191 194
195 Assert.That(part.ParentGroup.IsDeleted, Is.True);
196
192 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); 197 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
193 Assert.That(retrievedPart, Is.Null); 198 Assert.That(retrievedPart, Is.Null);
194 } 199 }
@@ -219,8 +224,12 @@ namespace OpenSim.Region.Framework.Scenes.Tests
219 224
220 Assert.That(retrievedPart, Is.Not.Null); 225 Assert.That(retrievedPart, Is.Not.Null);
221 226
227 Assert.That(part.ParentGroup.IsDeleted, Is.False);
228
222 sogd.InventoryDeQueueAndDelete(); 229 sogd.InventoryDeQueueAndDelete();
223 230
231 Assert.That(part.ParentGroup.IsDeleted, Is.True);
232
224 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(part.LocalId); 233 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(part.LocalId);
225 Assert.That(retrievedPart2, Is.Null); 234 Assert.That(retrievedPart2, Is.Null);
226 } 235 }