aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/Connectors')
-rw-r--r--OpenSim/Services/Connectors/Grid/GridServiceConnector.cs50
-rw-r--r--OpenSim/Services/Connectors/Land/LandServiceConnector.cs5
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs6
3 files changed, 60 insertions, 1 deletions
diff --git a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
index 1831533..80f0d2d 100644
--- a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
@@ -556,6 +556,56 @@ namespace OpenSim.Services.Connectors
556 return rinfos; 556 return rinfos;
557 } 557 }
558 558
559 public List<GridRegion> GetHyperlinks(UUID scopeID)
560 {
561 Dictionary<string, object> sendData = new Dictionary<string, object>();
562
563 sendData["SCOPEID"] = scopeID.ToString();
564
565 sendData["METHOD"] = "get_hyperlinks";
566
567 List<GridRegion> rinfos = new List<GridRegion>();
568 string reply = string.Empty;
569 try
570 {
571 reply = SynchronousRestFormsRequester.MakeRequest("POST",
572 m_ServerURI + "/grid",
573 ServerUtils.BuildQueryString(sendData));
574
575 //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply);
576 }
577 catch (Exception e)
578 {
579 m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server: {0}", e.Message);
580 return rinfos;
581 }
582
583 if (reply != string.Empty)
584 {
585 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
586
587 if (replyData != null)
588 {
589 Dictionary<string, object>.ValueCollection rinfosList = replyData.Values;
590 foreach (object r in rinfosList)
591 {
592 if (r is Dictionary<string, object>)
593 {
594 GridRegion rinfo = new GridRegion((Dictionary<string, object>)r);
595 rinfos.Add(rinfo);
596 }
597 }
598 }
599 else
600 m_log.DebugFormat("[GRID CONNECTOR]: GetHyperlinks {0} received null response",
601 scopeID);
602 }
603 else
604 m_log.DebugFormat("[GRID CONNECTOR]: GetHyperlinks received null reply");
605
606 return rinfos;
607 }
608
559 public virtual int GetRegionFlags(UUID scopeID, UUID regionID) 609 public virtual int GetRegionFlags(UUID scopeID, UUID regionID)
560 { 610 {
561 Dictionary<string, object> sendData = new Dictionary<string, object>(); 611 Dictionary<string, object> sendData = new Dictionary<string, object>();
diff --git a/OpenSim/Services/Connectors/Land/LandServiceConnector.cs b/OpenSim/Services/Connectors/Land/LandServiceConnector.cs
index 0223a77..c439dc5 100644
--- a/OpenSim/Services/Connectors/Land/LandServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Land/LandServiceConnector.cs
@@ -64,7 +64,7 @@ namespace OpenSim.Services.Connectors
64 m_GridService = gridServices; 64 m_GridService = gridServices;
65 } 65 }
66 66
67 public virtual LandData GetLandData(ulong regionHandle, uint x, uint y) 67 public virtual LandData GetLandData(ulong regionHandle, uint x, uint y, out byte regionAccess)
68 { 68 {
69 LandData landData = null; 69 LandData landData = null;
70 Hashtable hash = new Hashtable(); 70 Hashtable hash = new Hashtable();
@@ -74,6 +74,7 @@ namespace OpenSim.Services.Connectors
74 74
75 IList paramList = new ArrayList(); 75 IList paramList = new ArrayList();
76 paramList.Add(hash); 76 paramList.Add(hash);
77 regionAccess = 42; // Default to adult. Better safe...
77 78
78 try 79 try
79 { 80 {
@@ -109,6 +110,8 @@ namespace OpenSim.Services.Connectors
109 landData.SalePrice = Convert.ToInt32(hash["SalePrice"]); 110 landData.SalePrice = Convert.ToInt32(hash["SalePrice"]);
110 landData.SnapshotID = new UUID((string)hash["SnapshotID"]); 111 landData.SnapshotID = new UUID((string)hash["SnapshotID"]);
111 landData.UserLocation = Vector3.Parse((string)hash["UserLocation"]); 112 landData.UserLocation = Vector3.Parse((string)hash["UserLocation"]);
113 if (hash["RegionAccess"] != null)
114 regionAccess = (byte)Convert.ToInt32((string)hash["RegionAccess"]);
112 m_log.DebugFormat("[OGS1 GRID SERVICES] Got land data for parcel {0}", landData.Name); 115 m_log.DebugFormat("[OGS1 GRID SERVICES] Got land data for parcel {0}", landData.Name);
113 } 116 }
114 catch (Exception e) 117 catch (Exception e)
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
index 496eb2c..1ddcc75 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
@@ -359,6 +359,12 @@ namespace OpenSim.Services.Connectors.SimianGrid
359 return new List<GridRegion>(0); 359 return new List<GridRegion>(0);
360 } 360 }
361 361
362 public List<GridRegion> GetHyperlinks(UUID scopeID)
363 {
364 // Hypergrid/linked regions are not supported
365 return new List<GridRegion>();
366 }
367
362 public int GetRegionFlags(UUID scopeID, UUID regionID) 368 public int GetRegionFlags(UUID scopeID, UUID regionID)
363 { 369 {
364 const int REGION_ONLINE = 4; 370 const int REGION_ONLINE = 4;