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/Data/SQLite | |
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 '')
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteRegionData.cs | 9 | ||||
-rw-r--r-- | OpenSim/Data/SQLiteLegacy/SQLiteRegionData.cs | 9 |
2 files changed, 12 insertions, 6 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs index 4208050..bfd8279 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs | |||
@@ -360,10 +360,13 @@ namespace OpenSim.Data.SQLite | |||
360 | 360 | ||
361 | lock (ds) | 361 | lock (ds) |
362 | { | 362 | { |
363 | foreach (SceneObjectPart prim in obj.Children.Values) | 363 | lock (obj.Children) |
364 | { | 364 | { |
365 | // m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID); | 365 | foreach (SceneObjectPart prim in obj.Children.Values) |
366 | addPrim(prim, obj.UUID, regionUUID); | 366 | { |
367 | // m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID); | ||
368 | addPrim(prim, obj.UUID, regionUUID); | ||
369 | } | ||
367 | } | 370 | } |
368 | } | 371 | } |
369 | 372 | ||
diff --git a/OpenSim/Data/SQLiteLegacy/SQLiteRegionData.cs b/OpenSim/Data/SQLiteLegacy/SQLiteRegionData.cs index 289fd94..779b2ed 100644 --- a/OpenSim/Data/SQLiteLegacy/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLiteLegacy/SQLiteRegionData.cs | |||
@@ -327,10 +327,13 @@ namespace OpenSim.Data.SQLiteLegacy | |||
327 | 327 | ||
328 | lock (ds) | 328 | lock (ds) |
329 | { | 329 | { |
330 | foreach (SceneObjectPart prim in obj.Children.Values) | 330 | lock (obj.Children) |
331 | { | 331 | { |
332 | // m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID); | 332 | foreach (SceneObjectPart prim in obj.Children.Values) |
333 | addPrim(prim, obj.UUID, regionUUID); | 333 | { |
334 | // m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID); | ||
335 | addPrim(prim, obj.UUID, regionUUID); | ||
336 | } | ||
334 | } | 337 | } |
335 | } | 338 | } |
336 | 339 | ||