diff options
author | Justin Clark-Casey (justincc) | 2011-10-08 01:53:10 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-10-08 01:53:10 +0100 |
commit | 71d29decc87952790b3f5264ad4a29da171b1689 (patch) | |
tree | 46ef9d0b295c273cf15686ebaed4c6e1982e0a1c /OpenSim | |
parent | Improve explanation of access_ip_addresses in [RemoteAdmin] to say that there... (diff) | |
download | opensim-SC_OLD-71d29decc87952790b3f5264ad4a29da171b1689.zip opensim-SC_OLD-71d29decc87952790b3f5264ad4a29da171b1689.tar.gz opensim-SC_OLD-71d29decc87952790b3f5264ad4a29da171b1689.tar.bz2 opensim-SC_OLD-71d29decc87952790b3f5264ad4a29da171b1689.tar.xz |
replace List used by m_accessIP in RemoteAdminPlugin with the more efficient HashSet
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index d26662f..e897f7c 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -41,7 +41,6 @@ using OpenMetaverse; | |||
41 | using OpenSim; | 41 | using OpenSim; |
42 | using OpenSim.Framework; | 42 | using OpenSim.Framework; |
43 | using OpenSim.Framework.Communications; | 43 | using OpenSim.Framework.Communications; |
44 | |||
45 | using OpenSim.Framework.Console; | 44 | using OpenSim.Framework.Console; |
46 | using OpenSim.Framework.Servers; | 45 | using OpenSim.Framework.Servers; |
47 | using OpenSim.Framework.Servers.HttpServer; | 46 | using OpenSim.Framework.Servers.HttpServer; |
@@ -67,7 +66,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
67 | private IConfig m_config; | 66 | private IConfig m_config; |
68 | private IConfigSource m_configSource; | 67 | private IConfigSource m_configSource; |
69 | private string m_requiredPassword = String.Empty; | 68 | private string m_requiredPassword = String.Empty; |
70 | private List<string> m_accessIP; | 69 | private HashSet<string> m_accessIP; |
71 | 70 | ||
72 | private string m_name = "RemoteAdminPlugin"; | 71 | private string m_name = "RemoteAdminPlugin"; |
73 | private string m_version = "0.0"; | 72 | private string m_version = "0.0"; |
@@ -106,7 +105,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
106 | int port = m_config.GetInt("port", 0); | 105 | int port = m_config.GetInt("port", 0); |
107 | 106 | ||
108 | string accessIP = m_config.GetString("access_ip_addresses", String.Empty); | 107 | string accessIP = m_config.GetString("access_ip_addresses", String.Empty); |
109 | m_accessIP = new List<string>(); | 108 | m_accessIP = new HashSet<string>(); |
110 | if (accessIP != String.Empty) | 109 | if (accessIP != String.Empty) |
111 | { | 110 | { |
112 | string[] ips = accessIP.Split(new char[] { ',' }); | 111 | string[] ips = accessIP.Split(new char[] { ',' }); |
@@ -251,8 +250,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
251 | restartModule.ScheduleRestart(UUID.Zero, "Region will restart in {0}", times.ToArray(), true); | 250 | restartModule.ScheduleRestart(UUID.Zero, "Region will restart in {0}", times.ToArray(), true); |
252 | responseData["success"] = true; | 251 | responseData["success"] = true; |
253 | } | 252 | } |
254 | response.Value = responseData; | ||
255 | 253 | ||
254 | response.Value = responseData; | ||
256 | } | 255 | } |
257 | catch (Exception e) | 256 | catch (Exception e) |
258 | { | 257 | { |
@@ -857,7 +856,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
857 | public XmlRpcResponse XmlRpcDeleteRegionMethod(XmlRpcRequest request, IPEndPoint remoteClient) | 856 | public XmlRpcResponse XmlRpcDeleteRegionMethod(XmlRpcRequest request, IPEndPoint remoteClient) |
858 | { | 857 | { |
859 | m_log.Info("[RADMIN]: DeleteRegion: new request"); | 858 | m_log.Info("[RADMIN]: DeleteRegion: new request"); |
860 | 859 | ||
861 | XmlRpcResponse response = new XmlRpcResponse(); | 860 | XmlRpcResponse response = new XmlRpcResponse(); |
862 | Hashtable responseData = new Hashtable(); | 861 | Hashtable responseData = new Hashtable(); |
863 | 862 | ||