aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins
diff options
context:
space:
mode:
authorMelanie2012-09-24 20:14:00 +0100
committerMelanie2012-09-24 20:14:00 +0100
commitbbaf2c5a80441fdbd2f55e02ec9f46c3b66869c6 (patch)
tree2ac67907f6333bbbc9e4d821c6607b53d0e22acb /OpenSim/ApplicationPlugins
parentMerge branch 'master' into careminster (diff)
parentHG Rez object: warn the user if the item or asset cannot be found. (diff)
downloadopensim-SC_OLD-bbaf2c5a80441fdbd2f55e02ec9f46c3b66869c6.zip
opensim-SC_OLD-bbaf2c5a80441fdbd2f55e02ec9f46c3b66869c6.tar.gz
opensim-SC_OLD-bbaf2c5a80441fdbd2f55e02ec9f46c3b66869c6.tar.bz2
opensim-SC_OLD-bbaf2c5a80441fdbd2f55e02ec9f46c3b66869c6.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/Framework/Scenes/Scene.cs
Diffstat (limited to 'OpenSim/ApplicationPlugins')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs74
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs30
-rw-r--r--OpenSim/ApplicationPlugins/Rest/RestPlugin.cs14
3 files changed, 25 insertions, 93 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 202d199..4473ee0 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -852,7 +852,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
852 responseData["success"] = true; 852 responseData["success"] = true;
853 responseData["region_name"] = region.RegionName; 853 responseData["region_name"] = region.RegionName;
854 responseData["region_id"] = region.RegionID.ToString(); 854 responseData["region_id"] = region.RegionID.ToString();
855 responseData["region_uuid"] = region.RegionID.ToString(); //Deprecate July 2012
856 855
857 m_log.Info("[RADMIN]: CreateRegion: request complete"); 856 m_log.Info("[RADMIN]: CreateRegion: request complete");
858 } 857 }
@@ -2015,29 +2014,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2015 { 2014 {
2016 return; 2015 return;
2017 } 2016 }
2018 #region Deprecate July 2012
2019 //region_ID, regionid, region_uuid will be deprecated in July 2012!!!!!!
2020 else if (requestData.ContainsKey("regionid") &&
2021 !String.IsNullOrEmpty((string)requestData["regionid"]))
2022 {
2023 m_log.WarnFormat("[RADMIN]: Use of parameter regionid will be deprecated as of July 2012. Use region_id instead");
2024 }
2025 else if (requestData.ContainsKey("region_ID") &&
2026 !String.IsNullOrEmpty((string)requestData["region_ID"]))
2027 {
2028 m_log.WarnFormat("[RADMIN]: Use of parameter region_ID will be deprecated as of July 2012. Use region_id instead");
2029 }
2030 else if (requestData.ContainsKey("regionID") &&
2031 !String.IsNullOrEmpty((string)requestData["regionID"]))
2032 {
2033 m_log.WarnFormat("[RADMIN]: Use of parameter regionID will be deprecated as of July 2012. Use region_id instead");
2034 }
2035 else if (requestData.ContainsKey("region_uuid") &&
2036 !String.IsNullOrEmpty((string)requestData["region_uuid"]))
2037 {
2038 m_log.WarnFormat("[RADMIN]: Use of parameter region_uuid will be deprecated as of July 2012. Use region_id instead");
2039 }
2040 #endregion
2041 else 2017 else
2042 { 2018 {
2043 responseData["accepted"] = false; 2019 responseData["accepted"] = false;
@@ -2059,56 +2035,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2059 throw new Exception(String.Format("Region ID {0} not found", regionID)); 2035 throw new Exception(String.Format("Region ID {0} not found", regionID));
2060 } 2036 }
2061 } 2037 }
2062 #region Deprecate July 2012
2063 else if (requestData.ContainsKey("regionid") &&
2064 !String.IsNullOrEmpty((string)requestData["regionid"]))
2065 {
2066 m_log.WarnFormat("[RADMIN]: Use of parameter regionid will be deprecated as of July 2012. Use region_id instead");
2067
2068 UUID regionID = (UUID)(string)requestData["regionid"];
2069 if (!m_application.SceneManager.TryGetScene(regionID, out scene))
2070 {
2071 responseData["error"] = String.Format("Region ID {0} not found", regionID);
2072 throw new Exception(String.Format("Region ID {0} not found", regionID));
2073 }
2074 }
2075 else if (requestData.ContainsKey("region_ID") &&
2076 !String.IsNullOrEmpty((string)requestData["region_ID"]))
2077 {
2078 m_log.WarnFormat("[RADMIN]: Use of parameter region_ID will be deprecated as of July 2012. Use region_id instead");
2079
2080 UUID regionID = (UUID)(string)requestData["region_ID"];
2081 if (!m_application.SceneManager.TryGetScene(regionID, out scene))
2082 {
2083 responseData["error"] = String.Format("Region ID {0} not found", regionID);
2084 throw new Exception(String.Format("Region ID {0} not found", regionID));
2085 }
2086 }
2087 else if (requestData.ContainsKey("regionID") &&
2088 !String.IsNullOrEmpty((string)requestData["regionID"]))
2089 {
2090 m_log.WarnFormat("[RADMIN]: Use of parameter regionID will be deprecated as of July 2012. Use region_id instead");
2091
2092 UUID regionID = (UUID)(string)requestData["regionID"];
2093 if (!m_application.SceneManager.TryGetScene(regionID, out scene))
2094 {
2095 responseData["error"] = String.Format("Region ID {0} not found", regionID);
2096 throw new Exception(String.Format("Region ID {0} not found", regionID));
2097 }
2098 }
2099 else if (requestData.ContainsKey("region_uuid") &&
2100 !String.IsNullOrEmpty((string)requestData["region_uuid"]))
2101 {
2102 m_log.WarnFormat("[RADMIN]: Use of parameter region_uuid will be deprecated as of July 2012. Use region_id instead");
2103
2104 UUID regionID = (UUID)(string)requestData["region_uuid"];
2105 if (!m_application.SceneManager.TryGetScene(regionID, out scene))
2106 {
2107 responseData["error"] = String.Format("Region ID {0} not found", regionID);
2108 throw new Exception(String.Format("Region ID {0} not found", regionID));
2109 }
2110 }
2111 #endregion
2112 else if (requestData.ContainsKey("region_name") && 2038 else if (requestData.ContainsKey("region_name") &&
2113 !String.IsNullOrEmpty((string)requestData["region_name"])) 2039 !String.IsNullOrEmpty((string)requestData["region_name"]))
2114 { 2040 {
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
312 // Now that everything is setup we can proceed to 312 // Now that everything is setup we can proceed to
313 // add THIS agent to the HTTP server's handler list 313 // add THIS agent to the HTTP server's handler list
314 314
315 if (!AddAgentHandler(Rest.Name,this)) 315 // FIXME: If this code is ever to be re-enabled (most of it is disabled already) then this will
316 { 316 // have to be handled through the AddHttpHandler interface.
317 Rest.Log.ErrorFormat("{0} Unable to activate handler interface", MsgId); 317// if (!AddAgentHandler(Rest.Name,this))
318 foreach (IRest handler in handlers) 318// {
319 { 319// Rest.Log.ErrorFormat("{0} Unable to activate handler interface", MsgId);
320 handler.Close(); 320// foreach (IRest handler in handlers)
321 } 321// {
322 } 322// handler.Close();
323// }
324// }
323 325
324 } 326 }
325 catch (Exception e) 327 catch (Exception e)
@@ -342,11 +344,13 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
342 { 344 {
343 Rest.Log.InfoFormat("{0} Plugin is terminating", MsgId); 345 Rest.Log.InfoFormat("{0} Plugin is terminating", MsgId);
344 346
345 try 347 // FIXME: If this code is ever to be re-enabled (most of it is disabled already) then this will
346 { 348 // have to be handled through the AddHttpHandler interface.
347 RemoveAgentHandler(Rest.Name, this); 349// try
348 } 350// {
349 catch (KeyNotFoundException){} 351// RemoveAgentHandler(Rest.Name, this);
352// }
353// catch (KeyNotFoundException){}
350 354
351 foreach (IRest handler in handlers) 355 foreach (IRest handler in handlers)
352 { 356 {
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
297 { 297 {
298 if (!IsEnabled) return false; 298 if (!IsEnabled) return false;
299 _agents.Add(agentName, handler); 299 _agents.Add(agentName, handler);
300 return _httpd.AddAgentHandler(agentName, handler); 300// return _httpd.AddAgentHandler(agentName, handler);
301
302 return false;
301 } 303 }
302 304
303 /// <summary> 305 /// <summary>
@@ -316,7 +318,7 @@ namespace OpenSim.ApplicationPlugins.Rest
316 if (_agents[agentName] == handler) 318 if (_agents[agentName] == handler)
317 { 319 {
318 _agents.Remove(agentName); 320 _agents.Remove(agentName);
319 return _httpd.RemoveAgentHandler(agentName, handler); 321// return _httpd.RemoveAgentHandler(agentName, handler);
320 } 322 }
321 return false; 323 return false;
322 } 324 }
@@ -358,10 +360,10 @@ namespace OpenSim.ApplicationPlugins.Rest
358 _httpd.RemoveStreamHandler(h.HttpMethod, h.Path); 360 _httpd.RemoveStreamHandler(h.HttpMethod, h.Path);
359 } 361 }
360 _handlers = null; 362 _handlers = null;
361 foreach (KeyValuePair<string, IHttpAgentHandler> h in _agents) 363// foreach (KeyValuePair<string, IHttpAgentHandler> h in _agents)
362 { 364// {
363 _httpd.RemoveAgentHandler(h.Key, h.Value); 365// _httpd.RemoveAgentHandler(h.Key, h.Value);
364 } 366// }
365 _agents = null; 367 _agents = null;
366 } 368 }
367 369