aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs6
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneManager.cs18
2 files changed, 23 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 2b667c9..c1e8602 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -103,7 +103,11 @@ namespace OpenSim.Region.Environment.Scenes
103 103
104 protected BaseHttpServer m_httpListener; 104 protected BaseHttpServer m_httpListener;
105 105
106 protected Dictionary<string, IRegionModule> Modules = new Dictionary<string, IRegionModule>(); 106 protected Dictionary<string, IRegionModule> m_modules = new Dictionary<string, IRegionModule>();
107 public Dictionary<string, IRegionModule> Modules
108 {
109 get { return m_modules; }
110 }
107 protected Dictionary<Type, object> ModuleInterfaces = new Dictionary<Type, object>(); 111 protected Dictionary<Type, object> ModuleInterfaces = new Dictionary<Type, object>();
108 protected Dictionary<string, object> ModuleAPIMethods = new Dictionary<string, object>(); 112 protected Dictionary<string, object> ModuleAPIMethods = new Dictionary<string, object>();
109 protected Dictionary<string, ICommander> m_moduleCommanders = new Dictionary<string, ICommander>(); 113 protected Dictionary<string, ICommander> m_moduleCommanders = new Dictionary<string, ICommander>();
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs
index c596f6e..dc9ac37 100644
--- a/OpenSim/Region/Environment/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs
@@ -32,6 +32,7 @@ using System.Reflection;
32using libsecondlife; 32using libsecondlife;
33using log4net; 33using log4net;
34using OpenSim.Framework; 34using OpenSim.Framework;
35using OpenSim.Region.Environment.Interfaces;
35 36
36namespace OpenSim.Region.Environment.Scenes 37namespace OpenSim.Region.Environment.Scenes
37{ 38{
@@ -78,10 +79,27 @@ namespace OpenSim.Region.Environment.Scenes
78 79
79 public void Close() 80 public void Close()
80 { 81 {
82 // collect known shared modules in sharedModules
83 Dictionary<string, IRegionModule> sharedModules = new Dictionary<string, IRegionModule>();
81 for (int i = 0; i < m_localScenes.Count; i++) 84 for (int i = 0; i < m_localScenes.Count; i++)
82 { 85 {
86 // extract known shared modules from scene
87 foreach(string k in m_localScenes[i].Modules.Keys)
88 {
89 if (m_localScenes[i].Modules[k].IsSharedModule &&
90 !sharedModules.ContainsKey(k))
91 sharedModules[k] = m_localScenes[i].Modules[k];
92 }
93 // close scene/region
83 m_localScenes[i].Close(); 94 m_localScenes[i].Close();
84 } 95 }
96
97 // all regions/scenes are now closed, we can now safely
98 // close all shared modules
99 foreach(IRegionModule mod in sharedModules.Values)
100 {
101 mod.Close();
102 }
85 } 103 }
86 104
87 public void Close(Scene cscene) 105 public void Close(Scene cscene)