From 7d5f03220384092ed2cb8a86d489e0151774f496 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Tue, 4 Dec 2007 05:47:51 +0000 Subject: * Added SSL Support to HttpListener * Added SSL Option to User Server to allow logins to be done via SSL. * Added sane handling for when Remote Admin Plugin configuration is not found * Added some performance boosts to an area of libTerrain which was highlighted in profiling. --- .../RemoteController/RemoteAdminPlugin.cs | 35 ++++++++++++---------- 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs') diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index c37fcba..b9559c0 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -28,22 +28,25 @@ namespace OpenSim.ApplicationPlugins.LoadRegions public void Initialise(OpenSimMain openSim) { - IConfig remoteConfig = openSim.ConfigSource.Configs["RemoteAdmin"]; - if (remoteConfig != null) - { - if (remoteConfig.GetBoolean("enabled", false)) - { - System.Console.WriteLine("RADMIN", "Remote Admin Plugin Enabled"); - - m_app = openSim; - m_httpd = openSim.HttpServer; - - m_httpd.AddXmlRPCHandler("admin_create_region", XmlRpcCreateRegionMethod); - m_httpd.AddXmlRPCHandler("admin_shutdown", XmlRpcShutdownMethod); - m_httpd.AddXmlRPCHandler("admin_broadcast", XmlRpcAlertMethod); - m_httpd.AddXmlRPCHandler("admin_restart", XmlRpcRestartMethod); - } - } + try + { + if (openSim.ConfigSource.Configs["RemoteAdmin"].GetBoolean("enabled", false)) + { + OpenSim.Framework.Console.MainLog.Instance.Verbose("RADMIN", "Remote Admin Plugin Enabled"); + + m_app = openSim; + m_httpd = openSim.HttpServer; + + m_httpd.AddXmlRPCHandler("admin_create_region", XmlRpcCreateRegionMethod); + m_httpd.AddXmlRPCHandler("admin_shutdown", XmlRpcShutdownMethod); + m_httpd.AddXmlRPCHandler("admin_broadcast", XmlRpcAlertMethod); + m_httpd.AddXmlRPCHandler("admin_restart", XmlRpcRestartMethod); + } + } + catch (NullReferenceException) + { + // Ignore. + } } public XmlRpcResponse XmlRpcRestartMethod(XmlRpcRequest request) -- cgit v1.1