From 35a245b67a44eaa62dbf7951646ad9818caa8b02 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 31 Jan 2010 22:35:23 -0800 Subject: Assorted bug fixes related to hyperlinking --- OpenSim/Data/Null/NullRegionData.cs | 4 ++-- .../ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs | 11 ++++++++++- OpenSim/Services/GridService/GridService.cs | 3 ++- OpenSim/Services/GridService/HypergridLinker.cs | 3 ++- OpenSim/Services/HypergridService/GatekeeperService.cs | 9 ++------- 5 files changed, 18 insertions(+), 12 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Data/Null/NullRegionData.cs b/OpenSim/Data/Null/NullRegionData.cs index 92db87a..dc68edb 100644 --- a/OpenSim/Data/Null/NullRegionData.cs +++ b/OpenSim/Data/Null/NullRegionData.cs @@ -133,12 +133,12 @@ namespace OpenSim.Data.Null public List GetDefaultRegions(UUID scopeID) { - return null; + return new List(); } public List GetFallbackRegions(UUID scopeID, int x, int y) { - return null; + return new List(); } } } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs index 391e7c8..61a8fff 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs @@ -188,7 +188,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid return rinfo; } - // Let's not override GetRegionsByName -- let's get them all from the grid server + public override List GetRegionsByName(UUID scopeID, string name, int maxNumber) + { + List rinfo = m_LocalGridService.GetRegionsByName(scopeID, name, maxNumber); + List grinfo = base.GetRegionsByName(scopeID, name, maxNumber); + + if (grinfo != null) + rinfo.AddRange(grinfo); + return rinfo; + } + // Let's not override GetRegionRange -- let's get them all from the grid server #endregion diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index 515d620..4dee7a4 100644 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs @@ -329,7 +329,7 @@ namespace OpenSim.Services.GridService } } - if (m_AllowHypergridMapSearch && rdatas.Count == 0 && name.Contains(".")) + if (m_AllowHypergridMapSearch && rdatas == null || (rdatas != null && rdatas.Count == 0) && name.Contains(".")) { GridRegion r = m_HypergridLinker.LinkRegion(scopeID, name); if (r != null) @@ -412,6 +412,7 @@ namespace OpenSim.Services.GridService ret.Add(RegionData2RegionInfo(r)); } + m_log.DebugFormat("[GRID SERVICE]: Fallback returned {0} regions", ret.Count); return ret; } diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index c0b635c..18d0586 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs @@ -470,7 +470,8 @@ namespace OpenSim.Services.GridService string reason = string.Empty; if (TryLinkRegionToCoords(UUID.Zero, mapName, xloc, yloc, out reason) == null) MainConsole.Instance.Output("Failed to link region: " + reason); - MainConsole.Instance.Output("Hyperlink established"); + else + MainConsole.Instance.Output("Hyperlink established"); } else { diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index 3bf0836..763e523 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs @@ -120,7 +120,7 @@ namespace OpenSim.Services.HypergridService reason = string.Empty; m_log.DebugFormat("[GATEKEEPER SERVICE]: Request to link to {0}", regionName); - if (!m_AllowTeleportsToAnyRegion) + if (!m_AllowTeleportsToAnyRegion || regionName == string.Empty) { List defs = m_GridService.GetDefaultRegions(m_ScopeID); if (defs != null && defs.Count > 0) @@ -133,12 +133,7 @@ namespace OpenSim.Services.HypergridService } catch { - reason = "Grid setup problem"; - return false; - } - if (regionName != string.Empty) - { - reason = "Direct links to regions not allowed"; + reason = "Grid setup problem. Try specifying a particular region here."; return false; } -- cgit v1.1