aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins
diff options
context:
space:
mode:
authorteravus2012-11-15 09:46:41 -0500
committerteravus2012-11-15 09:46:41 -0500
commitdfac269032300872c4d0dc507f4f9062d102b0f4 (patch)
treed60fca83f54417c349c33b46de6ac65748ff762f /OpenSim/ApplicationPlugins
parent* Fixes mesh loading issues in last commit. (diff)
parentMerge branch 'master' into careminster (diff)
downloadopensim-SC-dfac269032300872c4d0dc507f4f9062d102b0f4.zip
opensim-SC-dfac269032300872c4d0dc507f4f9062d102b0f4.tar.gz
opensim-SC-dfac269032300872c4d0dc507f4f9062d102b0f4.tar.bz2
opensim-SC-dfac269032300872c4d0dc507f4f9062d102b0f4.tar.xz
Merge master into teravuswork
Diffstat (limited to 'OpenSim/ApplicationPlugins')
-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, 37 insertions, 98 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 437d150..9c933ee 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((string) requestData["persist"]); 699 bool persist = Convert.ToBoolean(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,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 }
@@ -1106,8 +1105,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1106 string lastName = (string) requestData["user_lastname"]; 1105 string lastName = (string) requestData["user_lastname"];
1107 string password = (string) requestData["user_password"]; 1106 string password = (string) requestData["user_password"];
1108 1107
1109 uint regionXLocation = Convert.ToUInt32((Int32) requestData["start_region_x"]); 1108 uint regionXLocation = Convert.ToUInt32(requestData["start_region_x"]);
1110 uint regionYLocation = Convert.ToUInt32((Int32) requestData["start_region_y"]); 1109 uint regionYLocation = Convert.ToUInt32(requestData["start_region_y"]);
1111 1110
1112 string email = ""; // empty string for email 1111 string email = ""; // empty string for email
1113 if (requestData.Contains("user_email")) 1112 if (requestData.Contains("user_email"))
@@ -1304,9 +1303,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1304 1303
1305 if (requestData.ContainsKey("user_password")) password = (string) requestData["user_password"]; 1304 if (requestData.ContainsKey("user_password")) password = (string) requestData["user_password"];
1306 if (requestData.ContainsKey("start_region_x")) 1305 if (requestData.ContainsKey("start_region_x"))
1307 regionXLocation = Convert.ToUInt32((Int32) requestData["start_region_x"]); 1306 regionXLocation = Convert.ToUInt32(requestData["start_region_x"]);
1308 if (requestData.ContainsKey("start_region_y")) 1307 if (requestData.ContainsKey("start_region_y"))
1309 regionYLocation = Convert.ToUInt32((Int32) requestData["start_region_y"]); 1308 regionYLocation = Convert.ToUInt32(requestData["start_region_y"]);
1310 1309
1311 // if (requestData.ContainsKey("start_lookat_x")) 1310 // if (requestData.ContainsKey("start_lookat_x"))
1312 // ulaX = Convert.ToUInt32((Int32) requestData["start_lookat_x"]); 1311 // ulaX = Convert.ToUInt32((Int32) requestData["start_lookat_x"]);
@@ -1493,6 +1492,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1493 /// <description>profile url</description></item> 1492 /// <description>profile url</description></item>
1494 /// <item><term>noassets</term> 1493 /// <item><term>noassets</term>
1495 /// <description>true if no assets should be saved</description></item> 1494 /// <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>
1496 /// <item><term>perm</term> 1497 /// <item><term>perm</term>
1497 /// <description>C and/or T</description></item> 1498 /// <description>C and/or T</description></item>
1498 /// </list> 1499 /// </list>
@@ -1549,6 +1550,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1549 options["checkPermissions"] = (string)requestData["perm"]; 1550 options["checkPermissions"] = (string)requestData["perm"];
1550 } 1551 }
1551 1552
1553 if ((string)requestData["all"] == "true")
1554 {
1555 options["all"] = (string)requestData["all"];
1556 }
1557
1552 IRegionArchiverModule archiver = scene.RequestModuleInterface<IRegionArchiverModule>(); 1558 IRegionArchiverModule archiver = scene.RequestModuleInterface<IRegionArchiverModule>();
1553 1559
1554 if (archiver != null) 1560 if (archiver != null)
@@ -2008,29 +2014,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2008 { 2014 {
2009 return; 2015 return;
2010 } 2016 }
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
2034 else 2017 else
2035 { 2018 {
2036 responseData["accepted"] = false; 2019 responseData["accepted"] = false;
@@ -2052,56 +2035,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2052 throw new Exception(String.Format("Region ID {0} not found", regionID)); 2035 throw new Exception(String.Format("Region ID {0} not found", regionID));
2053 } 2036 }
2054 } 2037 }
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
2105 else if (requestData.ContainsKey("region_name") && 2038 else if (requestData.ContainsKey("region_name") &&
2106 !String.IsNullOrEmpty((string)requestData["region_name"])) 2039 !String.IsNullOrEmpty((string)requestData["region_name"]))
2107 { 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