From 57ff76850d1d50d31efe7c20998c57a162ac819d Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Thu, 15 Nov 2007 15:32:28 +0000 Subject: * Added MySQLDataStore (adapted from MonoSqlite * Made startup a little bit more forgiving on dll load * Minor renamings and musings --- OpenSim/Region/Application/OpenSimMain.cs | 6 +++--- OpenSim/Region/Environment/ModuleLoader.cs | 17 ++++++++++++----- 2 files changed, 15 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 501f14e..8677b7e 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -64,7 +64,7 @@ namespace OpenSim protected LocalLoginService m_loginService; - protected string m_storageDLL = "OpenSim.DataStore.NullStorage.dll"; + protected string m_storageDll = "OpenSim.DataStore.NullStorage.dll"; protected string m_startupCommandsFile = ""; protected string m_shutdownCommandsFile = ""; @@ -218,7 +218,7 @@ namespace OpenSim m_physicalPrim = startupConfig.GetBoolean("physical_prim", true); m_permissions = startupConfig.GetBoolean("serverside_object_permissions", false); - m_storageDLL = startupConfig.GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll"); + m_storageDll = startupConfig.GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll"); m_startupCommandsFile = startupConfig.GetString("startup_console_commands_file", ""); m_shutdownCommandsFile = startupConfig.GetString("shutdown_console_commands_file", ""); @@ -359,7 +359,7 @@ namespace OpenSim protected override StorageManager CreateStorageManager(RegionInfo regionInfo) { - return new StorageManager(m_storageDLL, regionInfo.DataStore, regionInfo.RegionName); + return new StorageManager(m_storageDll, regionInfo.DataStore, regionInfo.RegionName); } protected override Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager, diff --git a/OpenSim/Region/Environment/ModuleLoader.cs b/OpenSim/Region/Environment/ModuleLoader.cs index cb72638..c64795b 100644 --- a/OpenSim/Region/Environment/ModuleLoader.cs +++ b/OpenSim/Region/Environment/ModuleLoader.cs @@ -194,19 +194,26 @@ namespace OpenSim.Region.Environment if (pluginAssembly != null) { - foreach (Type pluginType in pluginAssembly.GetTypes()) + try { - if (pluginType.IsPublic) + foreach (Type pluginType in pluginAssembly.GetTypes()) { - if (!pluginType.IsAbstract) + if (pluginType.IsPublic) { - if (pluginType.GetInterface("IRegionModule") != null) + if (!pluginType.IsAbstract) { - modules.Add((IRegionModule) Activator.CreateInstance(pluginType)); + if (pluginType.GetInterface("IRegionModule") != null) + { + modules.Add((IRegionModule)Activator.CreateInstance(pluginType)); + } } } } } + catch( ReflectionTypeLoadException ) + { + m_log.Verbose("MODULES", "Could not load types for [{0}].", pluginAssembly.FullName ); + } } return modules.ToArray(); -- cgit v1.1