diff options
author | Charles Krinke | 2008-07-04 03:11:53 +0000 |
---|---|---|
committer | Charles Krinke | 2008-07-04 03:11:53 +0000 |
commit | 23ec21e44a2d7227ca56c31622e9b9b754e52879 (patch) | |
tree | 43c85dc02b176f03539ed8617e05d566a4d5db1d /OpenSim/Grid/GridServer/GridServerBase.cs | |
parent | Mantis#1659. Thank you, Melanie for a patch that: (diff) | |
download | opensim-SC-23ec21e44a2d7227ca56c31622e9b9b754e52879.zip opensim-SC-23ec21e44a2d7227ca56c31622e9b9b754e52879.tar.gz opensim-SC-23ec21e44a2d7227ca56c31622e9b9b754e52879.tar.bz2 opensim-SC-23ec21e44a2d7227ca56c31622e9b9b754e52879.tar.xz |
Mantis#1647. Thank you very much, Sempuki for a patch that:
Updates the previous module loader work.
Diffstat (limited to 'OpenSim/Grid/GridServer/GridServerBase.cs')
-rw-r--r-- | OpenSim/Grid/GridServer/GridServerBase.cs | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/OpenSim/Grid/GridServer/GridServerBase.cs b/OpenSim/Grid/GridServer/GridServerBase.cs index 010c250..3cd7489 100644 --- a/OpenSim/Grid/GridServer/GridServerBase.cs +++ b/OpenSim/Grid/GridServer/GridServerBase.cs | |||
@@ -87,7 +87,7 @@ namespace OpenSim.Grid.GridServer | |||
87 | 87 | ||
88 | AddHttpHandlers(); | 88 | AddHttpHandlers(); |
89 | 89 | ||
90 | LoadGridPlugins(); | 90 | LoadPlugins(); |
91 | 91 | ||
92 | m_httpServer.Start(); | 92 | m_httpServer.Start(); |
93 | 93 | ||
@@ -116,16 +116,12 @@ namespace OpenSim.Grid.GridServer | |||
116 | m_httpServer.AddStreamHandler(new RestStreamHandler("POST", "/regions/", m_gridManager.RestSetRegionMethod)); | 116 | m_httpServer.AddStreamHandler(new RestStreamHandler("POST", "/regions/", m_gridManager.RestSetRegionMethod)); |
117 | } | 117 | } |
118 | 118 | ||
119 | protected void grid_plugin_initialiser_ (IPlugin plugin) | 119 | protected void LoadPlugins() |
120 | { | 120 | { |
121 | IGridPlugin p = plugin as IGridPlugin; | 121 | PluginLoader<IGridPlugin> loader = |
122 | p.Initialise (this); | 122 | new PluginLoader<IGridPlugin> (new GridPluginInitialiser (this)); |
123 | } | ||
124 | 123 | ||
125 | protected void LoadGridPlugins() | 124 | loader.Load ("/OpenSim/GridServer", "."); |
126 | { | ||
127 | PluginLoader<IGridPlugin> loader = new PluginLoader<IGridPlugin> ("."); | ||
128 | loader.Load ("/OpenSim/GridServer", grid_plugin_initialiser_); | ||
129 | m_plugins = loader.Plugins; | 125 | m_plugins = loader.Plugins; |
130 | } | 126 | } |
131 | 127 | ||
@@ -181,7 +177,7 @@ namespace OpenSim.Grid.GridServer | |||
181 | 177 | ||
182 | public override void Shutdown() | 178 | public override void Shutdown() |
183 | { | 179 | { |
184 | foreach (IGridPlugin plugin in m_plugins) plugin.Close(); | 180 | foreach (IGridPlugin plugin in m_plugins) plugin.Dispose(); |
185 | 181 | ||
186 | base.Shutdown(); | 182 | base.Shutdown(); |
187 | } | 183 | } |