diff --git a/OpenSim/Data/Null/NullRegionData.cs b/OpenSim/Data/Null/NullRegionData.cs index 92db87a333..dc68edb715 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 391e7c84f5..61a8fffd79 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 515d62040e..4dee7a4e8f 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 c0b635cc4a..18d0586f4d 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 3bf0836fe3..763e523d7b 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; } diff --git a/bin/config-include/GridCommon.ini.example b/bin/config-include/GridCommon.ini.example index 4d94ccdda9..a62868e73a 100644 --- a/bin/config-include/GridCommon.ini.example +++ b/bin/config-include/GridCommon.ini.example @@ -20,6 +20,7 @@ ; change this to your grid-wide grid server ; GridServerURI = "http://mygridserver.com:8003" + ;AllowHypergridMapSearch = true [AvatarService] ;