From a7d610ffcca8d707c7f9e9fdd7ad1477981ec2a9 Mon Sep 17 00:00:00 2001 From: diva Date: Wed, 18 Mar 2009 16:37:26 +0000 Subject: Adds support for unlink-region command in hypergrid. --- .../Communications/Hypergrid/HGGridServices.cs | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'OpenSim/Region/Communications/Hypergrid') diff --git a/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs b/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs index 4493591..5b3343a 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs @@ -258,6 +258,47 @@ namespace OpenSim.Region.Communications.Hypergrid return null; } + public virtual RegionInfo RequestNeighbourInfo(string name) + { + foreach (RegionInfo info in m_hyperlinkRegions) + { + //m_log.Debug(" .. " + info.RegionHandle); + if (info.RegionName == name) return info; + } + + foreach (RegionInfo info in m_knownRegions.Values) + { + if (info.RegionName == name) + { + //m_log.Debug("XXX------ known region " + info.RegionHandle); + return info; + } + } + + return null; + } + + public virtual RegionInfo RequestNeighbourInfo(string hostName, uint port) + { + foreach (RegionInfo info in m_hyperlinkRegions) + { + //m_log.Debug(" .. " + info.RegionHandle); + if ((info.ExternalHostName == hostName) && (info.HttpPort == port)) + return info; + } + + foreach (RegionInfo info in m_knownRegions.Values) + { + if ((info.ExternalHostName == hostName) && (info.HttpPort == port)) + { + //m_log.Debug("XXX------ known region " + info.RegionHandle); + return info; + } + } + + return null; + } + public virtual RegionInfo RequestClosestRegion(string regionName) { foreach (RegionInfo info in m_hyperlinkRegions) -- cgit v1.1