From 23ec21e44a2d7227ca56c31622e9b9b754e52879 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Fri, 4 Jul 2008 03:11:53 +0000 Subject: Mantis#1647. Thank you very much, Sempuki for a patch that: Updates the previous module loader work. --- OpenSim/Grid/GridServer/GridServerBase.cs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'OpenSim/Grid/GridServer/GridServerBase.cs') 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 AddHttpHandlers(); - LoadGridPlugins(); + LoadPlugins(); m_httpServer.Start(); @@ -116,16 +116,12 @@ namespace OpenSim.Grid.GridServer m_httpServer.AddStreamHandler(new RestStreamHandler("POST", "/regions/", m_gridManager.RestSetRegionMethod)); } - protected void grid_plugin_initialiser_ (IPlugin plugin) + protected void LoadPlugins() { - IGridPlugin p = plugin as IGridPlugin; - p.Initialise (this); - } + PluginLoader loader = + new PluginLoader (new GridPluginInitialiser (this)); - protected void LoadGridPlugins() - { - PluginLoader loader = new PluginLoader ("."); - loader.Load ("/OpenSim/GridServer", grid_plugin_initialiser_); + loader.Load ("/OpenSim/GridServer", "."); m_plugins = loader.Plugins; } @@ -181,7 +177,7 @@ namespace OpenSim.Grid.GridServer public override void Shutdown() { - foreach (IGridPlugin plugin in m_plugins) plugin.Close(); + foreach (IGridPlugin plugin in m_plugins) plugin.Dispose(); base.Shutdown(); } -- cgit v1.1