diff options
author | Justin Clark-Casey (justincc) | 2010-08-26 00:08:53 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-08-26 00:08:53 +0100 |
commit | 8031f8ec09df4f654c86a9c7bc498664f7b9d9dc (patch) | |
tree | d6a6da4d448b9bc11ff8d1078b9be089b9872151 /OpenSim/Region/OptionalModules/ContentManagementSystem/CMEntityCollection.cs | |
parent | minor: remove mono compiler warning (diff) | |
download | opensim-SC_OLD-8031f8ec09df4f654c86a9c7bc498664f7b9d9dc.zip opensim-SC_OLD-8031f8ec09df4f654c86a9c7bc498664f7b9d9dc.tar.gz opensim-SC_OLD-8031f8ec09df4f654c86a9c7bc498664f7b9d9dc.tar.bz2 opensim-SC_OLD-8031f8ec09df4f654c86a9c7bc498664f7b9d9dc.tar.xz |
Improve consistency of locking for SOG.m_parts in order to avoid race conditions in linking and unlinking
Diffstat (limited to 'OpenSim/Region/OptionalModules/ContentManagementSystem/CMEntityCollection.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/ContentManagementSystem/CMEntityCollection.cs | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/OpenSim/Region/OptionalModules/ContentManagementSystem/CMEntityCollection.cs b/OpenSim/Region/OptionalModules/ContentManagementSystem/CMEntityCollection.cs index 56656fc..de1e01c 100644 --- a/OpenSim/Region/OptionalModules/ContentManagementSystem/CMEntityCollection.cs +++ b/OpenSim/Region/OptionalModules/ContentManagementSystem/CMEntityCollection.cs | |||
@@ -121,16 +121,19 @@ namespace OpenSim.Region.OptionalModules.ContentManagement | |||
121 | continue; | 121 | continue; |
122 | temp = (SceneObjectGroup) currObj; | 122 | temp = (SceneObjectGroup) currObj; |
123 | 123 | ||
124 | if (m_CMEntityHash.ContainsKey(temp.UUID)) | 124 | lock (temp.Children) |
125 | { | 125 | { |
126 | foreach (SceneObjectPart part in temp.Children.Values) | 126 | if (m_CMEntityHash.ContainsKey(temp.UUID)) |
127 | if (!((ContentManagementEntity)m_CMEntityHash[temp.UUID]).HasChildPrim(part.UUID)) | 127 | { |
128 | foreach (SceneObjectPart part in temp.Children.Values) | ||
129 | if (!((ContentManagementEntity)m_CMEntityHash[temp.UUID]).HasChildPrim(part.UUID)) | ||
130 | missingList.Add(part); | ||
131 | } | ||
132 | else //Entire group is missing from revision. (and is a new part in region) | ||
133 | { | ||
134 | foreach (SceneObjectPart part in temp.Children.Values) | ||
128 | missingList.Add(part); | 135 | missingList.Add(part); |
129 | } | 136 | } |
130 | else //Entire group is missing from revision. (and is a new part in region) | ||
131 | { | ||
132 | foreach (SceneObjectPart part in temp.Children.Values) | ||
133 | missingList.Add(part); | ||
134 | } | 137 | } |
135 | } | 138 | } |
136 | return missingList; | 139 | return missingList; |