replace List used by m_accessIP in RemoteAdminPlugin with the more efficient HashSet

0.7.2-post-fixes
Justin Clark-Casey (justincc) 2011-10-08 01:53:10 +01:00
parent 139b0d03b6
commit 0b4774c50c
2 changed files with 5 additions and 5 deletions

View File

@ -41,7 +41,6 @@ using OpenMetaverse;
using OpenSim; using OpenSim;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Communications; using OpenSim.Framework.Communications;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Servers; using OpenSim.Framework.Servers;
using OpenSim.Framework.Servers.HttpServer; using OpenSim.Framework.Servers.HttpServer;
@ -67,7 +66,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
private IConfig m_config; private IConfig m_config;
private IConfigSource m_configSource; private IConfigSource m_configSource;
private string m_requiredPassword = String.Empty; private string m_requiredPassword = String.Empty;
private List<string> m_accessIP; private HashSet<string> m_accessIP;
private string m_name = "RemoteAdminPlugin"; private string m_name = "RemoteAdminPlugin";
private string m_version = "0.0"; private string m_version = "0.0";
@ -106,7 +105,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
int port = m_config.GetInt("port", 0); int port = m_config.GetInt("port", 0);
string accessIP = m_config.GetString("access_ip_addresses", String.Empty); string accessIP = m_config.GetString("access_ip_addresses", String.Empty);
m_accessIP = new List<string>(); m_accessIP = new HashSet<string>();
if (accessIP != String.Empty) if (accessIP != String.Empty)
{ {
string[] ips = accessIP.Split(new char[] { ',' }); 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); restartModule.ScheduleRestart(UUID.Zero, "Region will restart in {0}", times.ToArray(), true);
responseData["success"] = true; responseData["success"] = true;
} }
response.Value = responseData;
response.Value = responseData;
} }
catch (Exception e) catch (Exception e)
{ {

View File

@ -1880,6 +1880,7 @@
<ReferencePath>../../../bin/</ReferencePath> <ReferencePath>../../../bin/</ReferencePath>
<Reference name="Mono.Addins" path="../../../bin/"/> <Reference name="Mono.Addins" path="../../../bin/"/>
<Reference name="System"/> <Reference name="System"/>
<Reference name="System.Core"/>
<Reference name="System.Xml"/> <Reference name="System.Xml"/>
<Reference name="OpenMetaverse" path="../../../bin/"/> <Reference name="OpenMetaverse" path="../../../bin/"/>
<Reference name="OpenMetaverseTypes" path="../../../bin/"/> <Reference name="OpenMetaverseTypes" path="../../../bin/"/>