aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs')
-rw-r--r--OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs
index 89cba8a..c63b409 100644
--- a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs
@@ -106,6 +106,9 @@ namespace OpenSim.Server.Handlers.Grid
106 case "get_default_regions": 106 case "get_default_regions":
107 return GetDefaultRegions(request); 107 return GetDefaultRegions(request);
108 108
109 case "get_default_hypergrid_regions":
110 return GetDefaultHypergridRegions(request);
111
109 case "get_fallback_regions": 112 case "get_fallback_regions":
110 return GetFallbackRegions(request); 113 return GetFallbackRegions(request);
111 114
@@ -444,6 +447,36 @@ namespace OpenSim.Server.Handlers.Grid
444 return Util.UTF8NoBomEncoding.GetBytes(xmlString); 447 return Util.UTF8NoBomEncoding.GetBytes(xmlString);
445 } 448 }
446 449
450 byte[] GetDefaultHypergridRegions(Dictionary<string, object> request)
451 {
452 //m_log.DebugFormat("[GRID HANDLER]: GetDefaultRegions");
453 UUID scopeID = UUID.Zero;
454 if (request.ContainsKey("SCOPEID"))
455 UUID.TryParse(request["SCOPEID"].ToString(), out scopeID);
456 else
457 m_log.WarnFormat("[GRID HANDLER]: no scopeID in request to get region range");
458
459 List<GridRegion> rinfos = m_GridService.GetDefaultHypergridRegions(scopeID);
460
461 Dictionary<string, object> result = new Dictionary<string, object>();
462 if ((rinfos == null) || ((rinfos != null) && (rinfos.Count == 0)))
463 result["result"] = "null";
464 else
465 {
466 int i = 0;
467 foreach (GridRegion rinfo in rinfos)
468 {
469 Dictionary<string, object> rinfoDict = rinfo.ToKeyValuePairs();
470 result["region" + i] = rinfoDict;
471 i++;
472 }
473 }
474 string xmlString = ServerUtils.BuildXmlResponse(result);
475
476 //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString);
477 return Util.UTF8NoBomEncoding.GetBytes(xmlString);
478 }
479
447 byte[] GetFallbackRegions(Dictionary<string, object> request) 480 byte[] GetFallbackRegions(Dictionary<string, object> request)
448 { 481 {
449 //m_log.DebugFormat("[GRID HANDLER]: GetRegionRange"); 482 //m_log.DebugFormat("[GRID HANDLER]: GetRegionRange");