diff options
author | Dr Scofield | 2008-05-30 12:29:30 +0000 |
---|---|---|
committer | Dr Scofield | 2008-05-30 12:29:30 +0000 |
commit | 9590e671e6efc5c8da74f22b7038f1ce10501620 (patch) | |
tree | b9a84a11f2c48c9d43dd3de1fc9a9111ff32c5ab /OpenSim/Region/Environment/Scenes/SceneManager.cs | |
parent | * This is Melanie's XEngine script engine. I've not tested this real well, h... (diff) | |
download | opensim-SC_OLD-9590e671e6efc5c8da74f22b7038f1ce10501620.zip opensim-SC_OLD-9590e671e6efc5c8da74f22b7038f1ce10501620.tar.gz opensim-SC_OLD-9590e671e6efc5c8da74f22b7038f1ce10501620.tar.bz2 opensim-SC_OLD-9590e671e6efc5c8da74f22b7038f1ce10501620.tar.xz |
while investigating why IRCBridgeModule.Close() was having no effect, i
noticed that Scene.Close() will only call Close on non-shared region
modules. i've now added code to SceneManager.Close() to collect all
shared region module from each scene before calling Scene.Close()
on it and then, once, all Scenes are closed, go through the list of
collected shared region modules and close them as well. SceneManager.Close()
is only called when we initiate a shutdown --- i've verified that a
Scene restart does not trigger the shutdown of shared modules :-)
also, this adds a couple of bug fixes to the IRCBridgeModule (which
after all didn't take kindly to being closed) as well as a check to
InterregionModule's Close() call.
finally, this fixes the RestPlugin's XmlWriter so that it no longer
includes the "xsd=..." and "xsi=..." junk.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneManager.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneManager.cs | 18 |
1 files changed, 18 insertions, 0 deletions
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; | |||
32 | using libsecondlife; | 32 | using libsecondlife; |
33 | using log4net; | 33 | using log4net; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
35 | using OpenSim.Region.Environment.Interfaces; | ||
35 | 36 | ||
36 | namespace OpenSim.Region.Environment.Scenes | 37 | namespace 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) |