From 76106e39d9cd48f136caf061ef9d19641bbdfd31 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 15 Mar 2010 19:34:14 -0700 Subject: Restoring LoadPlugin as it was before. Justin's last change made it throw. --- OpenSim/Server/Base/ServerUtils.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'OpenSim/Server') diff --git a/OpenSim/Server/Base/ServerUtils.cs b/OpenSim/Server/Base/ServerUtils.cs index a399672..e7a8294 100644 --- a/OpenSim/Server/Base/ServerUtils.cs +++ b/OpenSim/Server/Base/ServerUtils.cs @@ -101,10 +101,23 @@ namespace OpenSim.Server.Base continue; Type typeInterface = pluginType.GetInterface(interfaceName, true); - + if (typeInterface != null) { - return (T)Activator.CreateInstance(pluginType, args); + T plug = null; + try + { + plug = (T)Activator.CreateInstance(pluginType, + args); + } + catch (Exception e) + { + if (!(e is System.MissingMethodException)) + m_log.ErrorFormat("Error loading plugin from {0}, exception {1}", dllName, e.InnerException); + return null; + } + + return plug; } } } -- cgit v1.1 From 45ef3e9987def8385174c332fc56c90b0ba3fef8 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 15 Mar 2010 20:32:36 -0700 Subject: Get the local inner simulation service object to the handler so that there is no possibility of cascading requests when failures happen. --- OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Server') diff --git a/OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs b/OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs index 55a575c..50d6fb2 100644 --- a/OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs +++ b/OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs @@ -55,6 +55,7 @@ namespace OpenSim.Server.Handlers.Simulation //Object[] args = new Object[] { config }; m_LocalSimulationService = scene.RequestModuleInterface(); + m_LocalSimulationService = m_LocalSimulationService.GetInnerService(); //ServerUtils.LoadPlugin(simService, args); //System.Console.WriteLine("XXXXXXXXXXXXXXXXXXX m_AssetSetvice == null? " + ((m_AssetService == null) ? "yes" : "no")); -- cgit v1.1