From b498693cff9b044e8ab3c7a88a18e9d67f16461b Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Tue, 27 Oct 2009 01:46:14 -0700 Subject: * Tweak to region module loading to check for a matching constructor first instead of throwing and catching exceptions * Commenting out the MySQL startup sequence that cleans out dropped attachments under the advice that it is no longer relevant. If anything, it could be brought back as a database cleanup console command * Updated to the latest libomv 0.8.0-pre. UUID.TryParse() will no longer throw and catch exceptions for most failed UUID parses --- .../RegionModulesControllerPlugin.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'OpenSim/ApplicationPlugins/RegionModulesController') diff --git a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs index ddc37ed..6c0c74d 100644 --- a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs +++ b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs @@ -341,14 +341,15 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController // Actually load it INonSharedRegionModule module = null; - try - { + + Type[] ctorParamTypes = new Type[ctorArgs.Length]; + for (int i = 0; i < ctorParamTypes.Length; i++) + ctorParamTypes[i] = ctorArgs[i].GetType(); + + if (node.Type.GetConstructor(ctorParamTypes) != null) module = (INonSharedRegionModule)Activator.CreateInstance(node.Type, ctorArgs); - } - catch - { + else module = (INonSharedRegionModule)Activator.CreateInstance(node.Type); - } // Check for replaceable interfaces Type replaceableInterface = module.ReplaceableInterface; -- cgit v1.1