aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins
diff options
context:
space:
mode:
authorteravus2012-11-15 10:05:16 -0500
committerteravus2012-11-15 10:05:16 -0500
commite9153e1d1aae50024d8cd05fe14a9bce34343a0e (patch)
treebc111d34f95a26b99c7e34d9e495dc14d1802cc3 /OpenSim/ApplicationPlugins
parentMerge master into teravuswork (diff)
downloadopensim-SC-e9153e1d1aae50024d8cd05fe14a9bce34343a0e.zip
opensim-SC-e9153e1d1aae50024d8cd05fe14a9bce34343a0e.tar.gz
opensim-SC-e9153e1d1aae50024d8cd05fe14a9bce34343a0e.tar.bz2
opensim-SC-e9153e1d1aae50024d8cd05fe14a9bce34343a0e.tar.xz
Revert "Merge master into teravuswork", it should have been avination, not master.
This reverts commit dfac269032300872c4d0dc507f4f9062d102b0f4, reversing changes made to 619c39e5144f15aca129d6d999bcc5c34133ee64.
Diffstat (limited to '')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs91
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs30
-rw-r--r--OpenSim/ApplicationPlugins/Rest/RestPlugin.cs14
3 files changed, 98 insertions, 37 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 9c933ee..437d150 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -696,7 +696,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
696 696
697 region.ExternalHostName = (string) requestData["external_address"]; 697 region.ExternalHostName = (string) requestData["external_address"];
698 698
699 bool persist = Convert.ToBoolean(requestData["persist"]); 699 bool persist = Convert.ToBoolean((string) requestData["persist"]);
700 if (persist) 700 if (persist)
701 { 701 {
702 // default place for region configuration files is in the 702 // default place for region configuration files is in the
@@ -852,6 +852,7 @@ 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
855 856
856 m_log.Info("[RADMIN]: CreateRegion: request complete"); 857 m_log.Info("[RADMIN]: CreateRegion: request complete");
857 } 858 }
@@ -1105,8 +1106,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1105 string lastName = (string) requestData["user_lastname"]; 1106 string lastName = (string) requestData["user_lastname"];
1106 string password = (string) requestData["user_password"]; 1107 string password = (string) requestData["user_password"];
1107 1108
1108 uint regionXLocation = Convert.ToUInt32(requestData["start_region_x"]); 1109 uint regionXLocation = Convert.ToUInt32((Int32) requestData["start_region_x"]);
1109 uint regionYLocation = Convert.ToUInt32(requestData["start_region_y"]); 1110 uint regionYLocation = Convert.ToUInt32((Int32) requestData["start_region_y"]);
1110 1111
1111 string email = ""; // empty string for email 1112 string email = ""; // empty string for email
1112 if (requestData.Contains("user_email")) 1113 if (requestData.Contains("user_email"))
@@ -1303,9 +1304,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1303 1304
1304 if (requestData.ContainsKey("user_password")) password = (string) requestData["user_password"]; 1305 if (requestData.ContainsKey("user_password")) password = (string) requestData["user_password"];
1305 if (requestData.ContainsKey("start_region_x")) 1306 if (requestData.ContainsKey("start_region_x"))
1306 regionXLocation = Convert.ToUInt32(requestData["start_region_x"]); 1307 regionXLocation = Convert.ToUInt32((Int32) requestData["start_region_x"]);
1307 if (requestData.ContainsKey("start_region_y")) 1308 if (requestData.ContainsKey("start_region_y"))
1308 regionYLocation = Convert.ToUInt32(requestData["start_region_y"]); 1309 regionYLocation = Convert.ToUInt32((Int32) requestData["start_region_y"]);
1309 1310
1310 // if (requestData.ContainsKey("start_lookat_x")) 1311 // if (requestData.ContainsKey("start_lookat_x"))
1311 // ulaX = Convert.ToUInt32((Int32) requestData["start_lookat_x"]); 1312 // ulaX = Convert.ToUInt32((Int32) requestData["start_lookat_x"]);
@@ -1492,8 +1493,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1492 /// <description>profile url</description></item> 1493 /// <description>profile url</description></item>
1493 /// <item><term>noassets</term> 1494 /// <item><term>noassets</term>
1494 /// <description>true if no assets should be saved</description></item> 1495 /// <description>true if no assets should be saved</description></item>
1495 /// <item><term>all</term>
1496 /// <description>true to save all the regions in the simulator</description></item>
1497 /// <item><term>perm</term> 1496 /// <item><term>perm</term>
1498 /// <description>C and/or T</description></item> 1497 /// <description>C and/or T</description></item>
1499 /// </list> 1498 /// </list>
@@ -1550,11 +1549,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1550 options["checkPermissions"] = (string)requestData["perm"]; 1549 options["checkPermissions"] = (string)requestData["perm"];
1551 } 1550 }
1552 1551
1553 if ((string)requestData["all"] == "true")
1554 {
1555 options["all"] = (string)requestData["all"];
1556 }
1557
1558 IRegionArchiverModule archiver = scene.RequestModuleInterface<IRegionArchiverModule>(); 1552 IRegionArchiverModule archiver = scene.RequestModuleInterface<IRegionArchiverModule>();
1559 1553
1560 if (archiver != null) 1554 if (archiver != null)
@@ -2014,6 +2008,29 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2014 { 2008 {
2015 return; 2009 return;
2016 } 2010 }
2011 #region Deprecate July 2012
2012 //region_ID, regionid, region_uuid will be deprecated in July 2012!!!!!!
2013 else if (requestData.ContainsKey("regionid") &&
2014 !String.IsNullOrEmpty((string)requestData["regionid"]))
2015 {
2016 m_log.WarnFormat("[RADMIN]: Use of parameter regionid will be deprecated as of July 2012. Use region_id instead");
2017 }
2018 else if (requestData.ContainsKey("region_ID") &&
2019 !String.IsNullOrEmpty((string)requestData["region_ID"]))
2020 {
2021 m_log.WarnFormat("[RADMIN]: Use of parameter region_ID will be deprecated as of July 2012. Use region_id instead");
2022 }
2023 else if (requestData.ContainsKey("regionID") &&
2024 !String.IsNullOrEmpty((string)requestData["regionID"]))
2025 {
2026 m_log.WarnFormat("[RADMIN]: Use of parameter regionID will be deprecated as of July 2012. Use region_id instead");
2027 }
2028 else if (requestData.ContainsKey("region_uuid") &&
2029 !String.IsNullOrEmpty((string)requestData["region_uuid"]))
2030 {
2031 m_log.WarnFormat("[RADMIN]: Use of parameter region_uuid will be deprecated as of July 2012. Use region_id instead");
2032 }
2033 #endregion
2017 else 2034 else
2018 { 2035 {
2019 responseData["accepted"] = false; 2036 responseData["accepted"] = false;
@@ -2035,6 +2052,56 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2035 throw new Exception(String.Format("Region ID {0} not found", regionID)); 2052 throw new Exception(String.Format("Region ID {0} not found", regionID));
2036 } 2053 }
2037 } 2054 }
2055 #region Deprecate July 2012
2056 else if (requestData.ContainsKey("regionid") &&
2057 !String.IsNullOrEmpty((string)requestData["regionid"]))
2058 {
2059 m_log.WarnFormat("[RADMIN]: Use of parameter regionid will be deprecated as of July 2012. Use region_id instead");
2060
2061 UUID regionID = (UUID)(string)requestData["regionid"];
2062 if (!m_application.SceneManager.TryGetScene(regionID, out scene))
2063 {
2064 responseData["error"] = String.Format("Region ID {0} not found", regionID);
2065 throw new Exception(String.Format("Region ID {0} not found", regionID));
2066 }
2067 }
2068 else if (requestData.ContainsKey("region_ID") &&
2069 !String.IsNullOrEmpty((string)requestData["region_ID"]))
2070 {
2071 m_log.WarnFormat("[RADMIN]: Use of parameter region_ID will be deprecated as of July 2012. Use region_id instead");
2072
2073 UUID regionID = (UUID)(string)requestData["region_ID"];
2074 if (!m_application.SceneManager.TryGetScene(regionID, out scene))
2075 {
2076 responseData["error"] = String.Format("Region ID {0} not found", regionID);
2077 throw new Exception(String.Format("Region ID {0} not found", regionID));
2078 }
2079 }
2080 else if (requestData.ContainsKey("regionID") &&
2081 !String.IsNullOrEmpty((string)requestData["regionID"]))
2082 {
2083 m_log.WarnFormat("[RADMIN]: Use of parameter regionID will be deprecated as of July 2012. Use region_id instead");
2084
2085 UUID regionID = (UUID)(string)requestData["regionID"];
2086 if (!m_application.SceneManager.TryGetScene(regionID, out scene))
2087 {
2088 responseData["error"] = String.Format("Region ID {0} not found", regionID);
2089 throw new Exception(String.Format("Region ID {0} not found", regionID));
2090 }
2091 }
2092 else if (requestData.ContainsKey("region_uuid") &&
2093 !String.IsNullOrEmpty((string)requestData["region_uuid"]))
2094 {
2095 m_log.WarnFormat("[RADMIN]: Use of parameter region_uuid will be deprecated as of July 2012. Use region_id instead");
2096
2097 UUID regionID = (UUID)(string)requestData["region_uuid"];
2098 if (!m_application.SceneManager.TryGetScene(regionID, out scene))
2099 {
2100 responseData["error"] = String.Format("Region ID {0} not found", regionID);
2101 throw new Exception(String.Format("Region ID {0} not found", regionID));
2102 }
2103 }
2104 #endregion
2038 else if (requestData.ContainsKey("region_name") && 2105 else if (requestData.ContainsKey("region_name") &&
2039 !String.IsNullOrEmpty((string)requestData["region_name"])) 2106 !String.IsNullOrEmpty((string)requestData["region_name"]))
2040 { 2107 {
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs
index 072bd6f..cb88695 100644
--- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs
@@ -312,16 +312,14 @@ 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 // FIXME: If this code is ever to be re-enabled (most of it is disabled already) then this will 315 if (!AddAgentHandler(Rest.Name,this))
316 // have to be handled through the AddHttpHandler interface. 316 {
317// if (!AddAgentHandler(Rest.Name,this)) 317 Rest.Log.ErrorFormat("{0} Unable to activate handler interface", MsgId);
318// { 318 foreach (IRest handler in handlers)
319// Rest.Log.ErrorFormat("{0} Unable to activate handler interface", MsgId); 319 {
320// foreach (IRest handler in handlers) 320 handler.Close();
321// { 321 }
322// handler.Close(); 322 }
323// }
324// }
325 323
326 } 324 }
327 catch (Exception e) 325 catch (Exception e)
@@ -344,13 +342,11 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
344 { 342 {
345 Rest.Log.InfoFormat("{0} Plugin is terminating", MsgId); 343 Rest.Log.InfoFormat("{0} Plugin is terminating", MsgId);
346 344
347 // FIXME: If this code is ever to be re-enabled (most of it is disabled already) then this will 345 try
348 // have to be handled through the AddHttpHandler interface. 346 {
349// try 347 RemoveAgentHandler(Rest.Name, this);
350// { 348 }
351// RemoveAgentHandler(Rest.Name, this); 349 catch (KeyNotFoundException){}
352// }
353// catch (KeyNotFoundException){}
354 350
355 foreach (IRest handler in handlers) 351 foreach (IRest handler in handlers)
356 { 352 {
diff --git a/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs b/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs
index a2425b5..eb16750 100644
--- a/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs
+++ b/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs
@@ -297,9 +297,7 @@ 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;
303 } 301 }
304 302
305 /// <summary> 303 /// <summary>
@@ -318,7 +316,7 @@ namespace OpenSim.ApplicationPlugins.Rest
318 if (_agents[agentName] == handler) 316 if (_agents[agentName] == handler)
319 { 317 {
320 _agents.Remove(agentName); 318 _agents.Remove(agentName);
321// return _httpd.RemoveAgentHandler(agentName, handler); 319 return _httpd.RemoveAgentHandler(agentName, handler);
322 } 320 }
323 return false; 321 return false;
324 } 322 }
@@ -360,10 +358,10 @@ namespace OpenSim.ApplicationPlugins.Rest
360 _httpd.RemoveStreamHandler(h.HttpMethod, h.Path); 358 _httpd.RemoveStreamHandler(h.HttpMethod, h.Path);
361 } 359 }
362 _handlers = null; 360 _handlers = null;
363// foreach (KeyValuePair<string, IHttpAgentHandler> h in _agents) 361 foreach (KeyValuePair<string, IHttpAgentHandler> h in _agents)
364// { 362 {
365// _httpd.RemoveAgentHandler(h.Key, h.Value); 363 _httpd.RemoveAgentHandler(h.Key, h.Value);
366// } 364 }
367 _agents = null; 365 _agents = null;
368 } 366 }
369 367