From 0b4774c50c89af1ba153d7e738322d79679be8f2 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Sat, 8 Oct 2011 01:53:10 +0100 Subject: [PATCH] replace List used by m_accessIP in RemoteAdminPlugin with the more efficient HashSet --- .../RemoteController/RemoteAdminPlugin.cs | 9 ++++----- prebuild.xml | 1 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 3e8112219c..92a36b5e3c 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -41,7 +41,6 @@ using OpenMetaverse; using OpenSim; using OpenSim.Framework; using OpenSim.Framework.Communications; - using OpenSim.Framework.Console; using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; @@ -67,7 +66,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController private IConfig m_config; private IConfigSource m_configSource; private string m_requiredPassword = String.Empty; - private List m_accessIP; + private HashSet m_accessIP; private string m_name = "RemoteAdminPlugin"; private string m_version = "0.0"; @@ -106,7 +105,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController int port = m_config.GetInt("port", 0); string accessIP = m_config.GetString("access_ip_addresses", String.Empty); - m_accessIP = new List(); + m_accessIP = new HashSet(); if (accessIP != String.Empty) { string[] ips = accessIP.Split(new char[] { ',' }); @@ -251,8 +250,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController restartModule.ScheduleRestart(UUID.Zero, "Region will restart in {0}", times.ToArray(), true); responseData["success"] = true; } - response.Value = responseData; + response.Value = responseData; } catch (Exception e) { @@ -857,7 +856,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController public XmlRpcResponse XmlRpcDeleteRegionMethod(XmlRpcRequest request, IPEndPoint remoteClient) { m_log.Info("[RADMIN]: DeleteRegion: new request"); - + XmlRpcResponse response = new XmlRpcResponse(); Hashtable responseData = new Hashtable(); diff --git a/prebuild.xml b/prebuild.xml index 404760f248..62a6d29133 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -1880,6 +1880,7 @@ ../../../bin/ +