diff options
author | Oren Hurvitz | 2014-07-10 16:00:06 +0300 |
---|---|---|
committer | Oren Hurvitz | 2014-07-21 09:19:05 +0100 |
commit | b481711fa65f6dadcff7ec10fcb83634079d8ab8 (patch) | |
tree | 18e9174c39a6bcdc3d01730190a8ce20c1e70655 /OpenSim | |
parent | Eliminated common but un-useful log messages (diff) | |
download | opensim-SC-b481711fa65f6dadcff7ec10fcb83634079d8ab8.zip opensim-SC-b481711fa65f6dadcff7ec10fcb83634079d8ab8.tar.gz opensim-SC-b481711fa65f6dadcff7ec10fcb83634079d8ab8.tar.bz2 opensim-SC-b481711fa65f6dadcff7ec10fcb83634079d8ab8.tar.xz |
Added locking in AccessModule to prevent possible errors when shutting down a simulator that has >1 region
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Access/AccessModule.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/World/Access/AccessModule.cs b/OpenSim/Region/CoreModules/World/Access/AccessModule.cs index 1599f15..f567cab 100644 --- a/OpenSim/Region/CoreModules/World/Access/AccessModule.cs +++ b/OpenSim/Region/CoreModules/World/Access/AccessModule.cs | |||
@@ -91,13 +91,17 @@ namespace OpenSim.Region.CoreModules.World | |||
91 | 91 | ||
92 | public void AddRegion(Scene scene) | 92 | public void AddRegion(Scene scene) |
93 | { | 93 | { |
94 | if (!m_SceneList.Contains(scene)) | 94 | lock (m_SceneList) |
95 | m_SceneList.Add(scene); | 95 | { |
96 | if (!m_SceneList.Contains(scene)) | ||
97 | m_SceneList.Add(scene); | ||
98 | } | ||
96 | } | 99 | } |
97 | 100 | ||
98 | public void RemoveRegion(Scene scene) | 101 | public void RemoveRegion(Scene scene) |
99 | { | 102 | { |
100 | m_SceneList.Remove(scene); | 103 | lock (m_SceneList) |
104 | m_SceneList.Remove(scene); | ||
101 | } | 105 | } |
102 | 106 | ||
103 | public void RegionLoaded(Scene scene) | 107 | public void RegionLoaded(Scene scene) |