From 1b0abf8f0cd417e2a37cffc96379274ad98183f2 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 21 Sep 2012 00:29:13 +0100 Subject: Comment out the long unused afaik HTTP agent handlers. As far as I know, this was only used by the IBM Rest modules, much of which has been commented out for a very long time now. Other similar code uses HTTP or stream handlers instead. So commenting this out to reduce code complexity and the need to make this facility consistent with the others where it may not be used anyway. If this facility is actually being used then please notify me or uncomment it if you are core. --- .../Rest/Inventory/RestHandler.cs | 30 ++++++++++++---------- OpenSim/ApplicationPlugins/Rest/RestPlugin.cs | 14 +++++----- 2 files changed, 25 insertions(+), 19 deletions(-) (limited to 'OpenSim/ApplicationPlugins') diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs index cb88695..072bd6f 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs @@ -312,14 +312,16 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory // Now that everything is setup we can proceed to // add THIS agent to the HTTP server's handler list - if (!AddAgentHandler(Rest.Name,this)) - { - Rest.Log.ErrorFormat("{0} Unable to activate handler interface", MsgId); - foreach (IRest handler in handlers) - { - handler.Close(); - } - } + // FIXME: If this code is ever to be re-enabled (most of it is disabled already) then this will + // have to be handled through the AddHttpHandler interface. +// if (!AddAgentHandler(Rest.Name,this)) +// { +// Rest.Log.ErrorFormat("{0} Unable to activate handler interface", MsgId); +// foreach (IRest handler in handlers) +// { +// handler.Close(); +// } +// } } catch (Exception e) @@ -342,11 +344,13 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory { Rest.Log.InfoFormat("{0} Plugin is terminating", MsgId); - try - { - RemoveAgentHandler(Rest.Name, this); - } - catch (KeyNotFoundException){} + // FIXME: If this code is ever to be re-enabled (most of it is disabled already) then this will + // have to be handled through the AddHttpHandler interface. +// try +// { +// RemoveAgentHandler(Rest.Name, this); +// } +// catch (KeyNotFoundException){} foreach (IRest handler in handlers) { diff --git a/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs b/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs index eb16750..a2425b5 100644 --- a/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs +++ b/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs @@ -297,7 +297,9 @@ namespace OpenSim.ApplicationPlugins.Rest { if (!IsEnabled) return false; _agents.Add(agentName, handler); - return _httpd.AddAgentHandler(agentName, handler); +// return _httpd.AddAgentHandler(agentName, handler); + + return false; } /// @@ -316,7 +318,7 @@ namespace OpenSim.ApplicationPlugins.Rest if (_agents[agentName] == handler) { _agents.Remove(agentName); - return _httpd.RemoveAgentHandler(agentName, handler); +// return _httpd.RemoveAgentHandler(agentName, handler); } return false; } @@ -358,10 +360,10 @@ namespace OpenSim.ApplicationPlugins.Rest _httpd.RemoveStreamHandler(h.HttpMethod, h.Path); } _handlers = null; - foreach (KeyValuePair h in _agents) - { - _httpd.RemoveAgentHandler(h.Key, h.Value); - } +// foreach (KeyValuePair h in _agents) +// { +// _httpd.RemoveAgentHandler(h.Key, h.Value); +// } _agents = null; } -- cgit v1.1 From a6f73282165b6e216c87da59e57f7e5eba71c6ef Mon Sep 17 00:00:00 2001 From: Michelle Argus Date: Fri, 3 Aug 2012 20:01:10 +0200 Subject: Remove deprecated parameters for region_id. Remove deprecated parameters for region_id as anounced in january 2012. --- .../RemoteController/RemoteAdminPlugin.cs | 74 ---------------------- 1 file changed, 74 deletions(-) (limited to 'OpenSim/ApplicationPlugins') diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index a5e56f9..5d80ba9 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -728,7 +728,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController responseData["success"] = true; responseData["region_name"] = region.RegionName; responseData["region_id"] = region.RegionID.ToString(); - responseData["region_uuid"] = region.RegionID.ToString(); //Deprecate July 2012 m_log.Info("[RADMIN]: CreateRegion: request complete"); } @@ -1881,29 +1880,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController { return; } - #region Deprecate July 2012 - //region_ID, regionid, region_uuid will be deprecated in July 2012!!!!!! - else if (requestData.ContainsKey("regionid") && - !String.IsNullOrEmpty((string)requestData["regionid"])) - { - m_log.WarnFormat("[RADMIN]: Use of parameter regionid will be deprecated as of July 2012. Use region_id instead"); - } - else if (requestData.ContainsKey("region_ID") && - !String.IsNullOrEmpty((string)requestData["region_ID"])) - { - m_log.WarnFormat("[RADMIN]: Use of parameter region_ID will be deprecated as of July 2012. Use region_id instead"); - } - else if (requestData.ContainsKey("regionID") && - !String.IsNullOrEmpty((string)requestData["regionID"])) - { - m_log.WarnFormat("[RADMIN]: Use of parameter regionID will be deprecated as of July 2012. Use region_id instead"); - } - else if (requestData.ContainsKey("region_uuid") && - !String.IsNullOrEmpty((string)requestData["region_uuid"])) - { - m_log.WarnFormat("[RADMIN]: Use of parameter region_uuid will be deprecated as of July 2012. Use region_id instead"); - } - #endregion else { responseData["accepted"] = false; @@ -1925,56 +1901,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController throw new Exception(String.Format("Region ID {0} not found", regionID)); } } - #region Deprecate July 2012 - else if (requestData.ContainsKey("regionid") && - !String.IsNullOrEmpty((string)requestData["regionid"])) - { - m_log.WarnFormat("[RADMIN]: Use of parameter regionid will be deprecated as of July 2012. Use region_id instead"); - - UUID regionID = (UUID)(string)requestData["regionid"]; - if (!m_application.SceneManager.TryGetScene(regionID, out scene)) - { - responseData["error"] = String.Format("Region ID {0} not found", regionID); - throw new Exception(String.Format("Region ID {0} not found", regionID)); - } - } - else if (requestData.ContainsKey("region_ID") && - !String.IsNullOrEmpty((string)requestData["region_ID"])) - { - m_log.WarnFormat("[RADMIN]: Use of parameter region_ID will be deprecated as of July 2012. Use region_id instead"); - - UUID regionID = (UUID)(string)requestData["region_ID"]; - if (!m_application.SceneManager.TryGetScene(regionID, out scene)) - { - responseData["error"] = String.Format("Region ID {0} not found", regionID); - throw new Exception(String.Format("Region ID {0} not found", regionID)); - } - } - else if (requestData.ContainsKey("regionID") && - !String.IsNullOrEmpty((string)requestData["regionID"])) - { - m_log.WarnFormat("[RADMIN]: Use of parameter regionID will be deprecated as of July 2012. Use region_id instead"); - - UUID regionID = (UUID)(string)requestData["regionID"]; - if (!m_application.SceneManager.TryGetScene(regionID, out scene)) - { - responseData["error"] = String.Format("Region ID {0} not found", regionID); - throw new Exception(String.Format("Region ID {0} not found", regionID)); - } - } - else if (requestData.ContainsKey("region_uuid") && - !String.IsNullOrEmpty((string)requestData["region_uuid"])) - { - m_log.WarnFormat("[RADMIN]: Use of parameter region_uuid will be deprecated as of July 2012. Use region_id instead"); - - UUID regionID = (UUID)(string)requestData["region_uuid"]; - if (!m_application.SceneManager.TryGetScene(regionID, out scene)) - { - responseData["error"] = String.Format("Region ID {0} not found", regionID); - throw new Exception(String.Format("Region ID {0} not found", regionID)); - } - } - #endregion else if (requestData.ContainsKey("region_name") && !String.IsNullOrEmpty((string)requestData["region_name"])) { -- cgit v1.1