diff options
author | Diva Canto | 2009-10-06 15:39:53 -0700 |
---|---|---|
committer | Diva Canto | 2009-10-06 15:39:53 -0700 |
commit | e992ca025571a891333a57012c2cd4419b6581e5 (patch) | |
tree | a6fd7e9f2e46999c72780bf60d2890e8a9c74fe4 /OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |
parent | * Change some more default ports to the robust default of 8003 (diff) | |
download | opensim-SC_OLD-e992ca025571a891333a57012c2cd4419b6581e5.zip opensim-SC_OLD-e992ca025571a891333a57012c2cd4419b6581e5.tar.gz opensim-SC_OLD-e992ca025571a891333a57012c2cd4419b6581e5.tar.bz2 opensim-SC_OLD-e992ca025571a891333a57012c2cd4419b6581e5.tar.xz |
Rewrote parts of the code that were double-locking different objects. This is about half of the code base reviewed.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index d2b5cb1..0fed1bd 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -187,14 +187,16 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
187 | LandData newData = data.Copy(); | 187 | LandData newData = data.Copy(); |
188 | newData.LocalID = local_id; | 188 | newData.LocalID = local_id; |
189 | 189 | ||
190 | ILandObject land = null; | ||
190 | lock (m_landList) | 191 | lock (m_landList) |
191 | { | 192 | { |
192 | if (m_landList.ContainsKey(local_id)) | 193 | if (m_landList.ContainsKey(local_id)) |
193 | { | 194 | { |
194 | m_landList[local_id].LandData = newData; | 195 | m_landList[local_id].LandData = newData; |
195 | m_scene.EventManager.TriggerLandObjectUpdated((uint)local_id, m_landList[local_id]); | 196 | land = m_landList[local_id]; |
196 | } | 197 | } |
197 | } | 198 | } |
199 | m_scene.EventManager.TriggerLandObjectUpdated((uint)local_id, land); | ||
198 | } | 200 | } |
199 | 201 | ||
200 | public bool AllowedForcefulBans | 202 | public bool AllowedForcefulBans |
@@ -504,6 +506,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
504 | /// <param name="local_id">Land.localID of the peice of land to remove.</param> | 506 | /// <param name="local_id">Land.localID of the peice of land to remove.</param> |
505 | public void removeLandObject(int local_id) | 507 | public void removeLandObject(int local_id) |
506 | { | 508 | { |
509 | UUID id = UUID.Zero; | ||
507 | lock (m_landList) | 510 | lock (m_landList) |
508 | { | 511 | { |
509 | for (int x = 0; x < 64; x++) | 512 | for (int x = 0; x < 64; x++) |
@@ -520,9 +523,10 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
520 | } | 523 | } |
521 | } | 524 | } |
522 | 525 | ||
523 | m_scene.EventManager.TriggerLandObjectRemoved(m_landList[local_id].LandData.GlobalID); | 526 | id = m_landList[local_id].LandData.GlobalID; |
524 | m_landList.Remove(local_id); | 527 | m_landList.Remove(local_id); |
525 | } | 528 | } |
529 | m_scene.EventManager.TriggerLandObjectRemoved(id); | ||
526 | } | 530 | } |
527 | 531 | ||
528 | private void performFinalLandJoin(ILandObject master, ILandObject slave) | 532 | private void performFinalLandJoin(ILandObject master, ILandObject slave) |