aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Interfaces/IScenePresence.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-08-31 16:29:51 +0100
committerJustin Clark-Casey (justincc)2011-08-31 16:29:51 +0100
commit32444d98cb13423fdf8c874e4fbb7ea17670d7c5 (patch)
tree4c384f277afc6138a050706eaaf839caeed22d1d /OpenSim/Region/Framework/Interfaces/IScenePresence.cs
parentremove pointless ToArray() call in AttachmentsModule.SaveChangedAttachments() (diff)
downloadopensim-SC_OLD-32444d98cb13423fdf8c874e4fbb7ea17670d7c5.zip
opensim-SC_OLD-32444d98cb13423fdf8c874e4fbb7ea17670d7c5.tar.gz
opensim-SC_OLD-32444d98cb13423fdf8c874e4fbb7ea17670d7c5.tar.bz2
opensim-SC_OLD-32444d98cb13423fdf8c874e4fbb7ea17670d7c5.tar.xz
Make SP.Attachments available as sp.GetAttachments() instead.
The approach here, as in other parts of OpenSim, is to return a copy of the list rather than the attachments list itself This prevents callers from forgetting to lock the list when they read it, as was happening in various parts of the codebase. It also improves liveness. This might improve attachment anomolies when performing region crossings.
Diffstat (limited to 'OpenSim/Region/Framework/Interfaces/IScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Interfaces/IScenePresence.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IScenePresence.cs b/OpenSim/Region/Framework/Interfaces/IScenePresence.cs
index b07c821..788b36f 100644
--- a/OpenSim/Region/Framework/Interfaces/IScenePresence.cs
+++ b/OpenSim/Region/Framework/Interfaces/IScenePresence.cs
@@ -58,10 +58,13 @@ namespace OpenSim.Region.Framework.Interfaces
58 /// <summary> 58 /// <summary>
59 /// The scene objects attached to this avatar. 59 /// The scene objects attached to this avatar.
60 /// </summary> 60 /// </summary>
61 /// <returns>
62 /// A copy of the list.
63 /// </returns>
61 /// <remarks> 64 /// <remarks>
62 /// Do not change this list directly - use methods such as 65 /// Do not change this list directly - use methods such as
63 /// AddAttachment() and RemoveAttachment(). Lock this list when performing any read operations upon it. 66 /// AddAttachment() and RemoveAttachment().
64 /// </remarks> 67 /// </remarks>
65 List<SceneObjectGroup> Attachments { get; } 68 List<SceneObjectGroup> GetAttachments();
66 } 69 }
67} \ No newline at end of file 70} \ No newline at end of file