diff options
author | Oren Hurvitz | 2014-07-10 16:00:06 +0300 |
---|---|---|
committer | Justin Clark-Casey | 2014-08-02 00:56:54 +0100 |
commit | 5229a3c51ce8f87c7833b3ae49a6f65ddb377ce9 (patch) | |
tree | 601dca91c569147f75e3d93573b34b9196b2c157 /OpenSim | |
parent | Minor: changed "existant" to "existent" (diff) | |
download | opensim-SC_OLD-5229a3c51ce8f87c7833b3ae49a6f65ddb377ce9.zip opensim-SC_OLD-5229a3c51ce8f87c7833b3ae49a6f65ddb377ce9.tar.gz opensim-SC_OLD-5229a3c51ce8f87c7833b3ae49a6f65ddb377ce9.tar.bz2 opensim-SC_OLD-5229a3c51ce8f87c7833b3ae49a6f65ddb377ce9.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) |