From 7e47ab746ef588648b8edbbc7cfb48c4d90c5e34 Mon Sep 17 00:00:00 2001 From: Marck Date: Fri, 6 Aug 2010 07:46:19 +0200 Subject: Allow creation of link regions if there is an existing region within a 4096 range. Also add GetHyperlinks() to the grid service. --- .../Connectors/Grid/GridServiceConnector.cs | 50 ++++++++++++++++++++++ .../SimianGrid/SimianGridServiceConnector.cs | 6 +++ 2 files changed, 56 insertions(+) (limited to 'OpenSim/Services/Connectors') diff --git a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs index 1831533..202bad7 100644 --- a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs +++ b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs @@ -556,6 +556,56 @@ namespace OpenSim.Services.Connectors return rinfos; } + public List GetHyperlinks(UUID scopeID) + { + Dictionary sendData = new Dictionary(); + + sendData["SCOPEID"] = scopeID.ToString(); + + sendData["METHOD"] = "get_hyperlinks"; + + List rinfos = new List(); + string reply = string.Empty; + try + { + reply = SynchronousRestFormsRequester.MakeRequest("POST", + m_ServerURI + "/grid", + ServerUtils.BuildQueryString(sendData)); + + //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply); + } + catch (Exception e) + { + m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server: {0}", e.Message); + return rinfos; + } + + if (reply != string.Empty) + { + Dictionary replyData = ServerUtils.ParseXmlResponse(reply); + + if (replyData != null) + { + Dictionary.ValueCollection rinfosList = replyData.Values; + foreach (object r in rinfosList) + { + if (r is Dictionary) + { + GridRegion rinfo = new GridRegion((Dictionary)r); + rinfos.Add(rinfo); + } + } + } + else + m_log.DebugFormat("[GRID CONNECTOR]: GetHyperlinks {0} received null response", + scopeID); + } + else + m_log.DebugFormat("[GRID CONNECTOR]: GetHyperlinks received null reply"); + + return rinfos; + } + public virtual int GetRegionFlags(UUID scopeID, UUID regionID) { Dictionary sendData = new Dictionary(); diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs index bea8172..7bc85c6 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs @@ -357,6 +357,12 @@ namespace OpenSim.Services.Connectors.SimianGrid return new List(0); } + public List GetHyperlinks(UUID scopeID) + { + // Hypergrid/linked regions are not supported + return new List(); + } + public int GetRegionFlags(UUID scopeID, UUID regionID) { const int REGION_ONLINE = 4; -- cgit v1.1 From 009053479302e7581a85c7574a6cc8eaa23745d8 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 6 Aug 2010 17:43:09 -0700 Subject: Added Check4096 config var under [GridService], at the request of many. Changed the iteration that Marck had on the Hyperlinker. ATTENTION! CONFIGURATION CHANGE AFFECTING Robust.HG.ini.example and StandaloneCommon.ini.example. --- .../Connectors/Grid/GridServiceConnector.cs | 98 +++++++++++----------- .../SimianGrid/SimianGridServiceConnector.cs | 10 +-- 2 files changed, 54 insertions(+), 54 deletions(-) (limited to 'OpenSim/Services/Connectors') diff --git a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs index 202bad7..80f0d2d 100644 --- a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs +++ b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs @@ -556,55 +556,55 @@ namespace OpenSim.Services.Connectors return rinfos; } - public List GetHyperlinks(UUID scopeID) - { - Dictionary sendData = new Dictionary(); - - sendData["SCOPEID"] = scopeID.ToString(); - - sendData["METHOD"] = "get_hyperlinks"; - - List rinfos = new List(); - string reply = string.Empty; - try - { - reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/grid", - ServerUtils.BuildQueryString(sendData)); - - //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply); - } - catch (Exception e) - { - m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server: {0}", e.Message); - return rinfos; - } - - if (reply != string.Empty) - { - Dictionary replyData = ServerUtils.ParseXmlResponse(reply); - - if (replyData != null) - { - Dictionary.ValueCollection rinfosList = replyData.Values; - foreach (object r in rinfosList) - { - if (r is Dictionary) - { - GridRegion rinfo = new GridRegion((Dictionary)r); - rinfos.Add(rinfo); - } - } - } - else - m_log.DebugFormat("[GRID CONNECTOR]: GetHyperlinks {0} received null response", - scopeID); - } - else - m_log.DebugFormat("[GRID CONNECTOR]: GetHyperlinks received null reply"); - - return rinfos; - } + public List GetHyperlinks(UUID scopeID) + { + Dictionary sendData = new Dictionary(); + + sendData["SCOPEID"] = scopeID.ToString(); + + sendData["METHOD"] = "get_hyperlinks"; + + List rinfos = new List(); + string reply = string.Empty; + try + { + reply = SynchronousRestFormsRequester.MakeRequest("POST", + m_ServerURI + "/grid", + ServerUtils.BuildQueryString(sendData)); + + //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply); + } + catch (Exception e) + { + m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server: {0}", e.Message); + return rinfos; + } + + if (reply != string.Empty) + { + Dictionary replyData = ServerUtils.ParseXmlResponse(reply); + + if (replyData != null) + { + Dictionary.ValueCollection rinfosList = replyData.Values; + foreach (object r in rinfosList) + { + if (r is Dictionary) + { + GridRegion rinfo = new GridRegion((Dictionary)r); + rinfos.Add(rinfo); + } + } + } + else + m_log.DebugFormat("[GRID CONNECTOR]: GetHyperlinks {0} received null response", + scopeID); + } + else + m_log.DebugFormat("[GRID CONNECTOR]: GetHyperlinks received null reply"); + + return rinfos; + } public virtual int GetRegionFlags(UUID scopeID, UUID regionID) { diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs index 7bc85c6..fefdad6 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs @@ -357,11 +357,11 @@ namespace OpenSim.Services.Connectors.SimianGrid return new List(0); } - public List GetHyperlinks(UUID scopeID) - { - // Hypergrid/linked regions are not supported - return new List(); - } + public List GetHyperlinks(UUID scopeID) + { + // Hypergrid/linked regions are not supported + return new List(); + } public int GetRegionFlags(UUID scopeID, UUID regionID) { -- cgit v1.1