aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/Connectors/Grid/GridServicesConnector.cs')
-rw-r--r--OpenSim/Services/Connectors/Grid/GridServicesConnector.cs51
1 files changed, 51 insertions, 0 deletions
diff --git a/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs b/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs
index 34ed0d7..0f5a613 100644
--- a/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs
@@ -515,6 +515,57 @@ namespace OpenSim.Services.Connectors
515 return rinfos; 515 return rinfos;
516 } 516 }
517 517
518 public List<GridRegion> GetDefaultHypergridRegions(UUID scopeID)
519 {
520 Dictionary<string, object> sendData = new Dictionary<string, object>();
521
522 sendData["SCOPEID"] = scopeID.ToString();
523
524 sendData["METHOD"] = "get_default_hypergrid_regions";
525
526 List<GridRegion> rinfos = new List<GridRegion>();
527 string reply = string.Empty;
528 string uri = m_ServerURI + "/grid";
529 try
530 {
531 reply = SynchronousRestFormsRequester.MakeRequest("POST",
532 uri,
533 ServerUtils.BuildQueryString(sendData));
534
535 //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply);
536 }
537 catch (Exception e)
538 {
539 m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server at {0}: {1}", uri, e.Message);
540 return rinfos;
541 }
542
543 if (reply != string.Empty)
544 {
545 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
546
547 if (replyData != null)
548 {
549 Dictionary<string, object>.ValueCollection rinfosList = replyData.Values;
550 foreach (object r in rinfosList)
551 {
552 if (r is Dictionary<string, object>)
553 {
554 GridRegion rinfo = new GridRegion((Dictionary<string, object>)r);
555 rinfos.Add(rinfo);
556 }
557 }
558 }
559 else
560 m_log.DebugFormat("[GRID CONNECTOR]: GetDefaultHypergridRegions {0} received null response",
561 scopeID);
562 }
563 else
564 m_log.DebugFormat("[GRID CONNECTOR]: GetDefaultHypergridRegions received null reply");
565
566 return rinfos;
567 }
568
518 public List<GridRegion> GetFallbackRegions(UUID scopeID, int x, int y) 569 public List<GridRegion> GetFallbackRegions(UUID scopeID, int x, int y)
519 { 570 {
520 Dictionary<string, object> sendData = new Dictionary<string, object>(); 571 Dictionary<string, object> sendData = new Dictionary<string, object>();