Assorted bug fixes related to hyperlinking

slimupdates
Diva Canto 2010-01-31 22:35:23 -08:00
parent 35de8e91ec
commit 35a245b67a
6 changed files with 19 additions and 12 deletions

View File

@ -133,12 +133,12 @@ namespace OpenSim.Data.Null
public List<RegionData> GetDefaultRegions(UUID scopeID) public List<RegionData> GetDefaultRegions(UUID scopeID)
{ {
return null; return new List<RegionData>();
} }
public List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y) public List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y)
{ {
return null; return new List<RegionData>();
} }
} }
} }

View File

@ -188,7 +188,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
return rinfo; return rinfo;
} }
// Let's not override GetRegionsByName -- let's get them all from the grid server public override List<GridRegion> GetRegionsByName(UUID scopeID, string name, int maxNumber)
{
List<GridRegion> rinfo = m_LocalGridService.GetRegionsByName(scopeID, name, maxNumber);
List<GridRegion> 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 // Let's not override GetRegionRange -- let's get them all from the grid server
#endregion #endregion

View File

@ -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); GridRegion r = m_HypergridLinker.LinkRegion(scopeID, name);
if (r != null) if (r != null)
@ -412,6 +412,7 @@ namespace OpenSim.Services.GridService
ret.Add(RegionData2RegionInfo(r)); ret.Add(RegionData2RegionInfo(r));
} }
m_log.DebugFormat("[GRID SERVICE]: Fallback returned {0} regions", ret.Count);
return ret; return ret;
} }

View File

@ -470,7 +470,8 @@ namespace OpenSim.Services.GridService
string reason = string.Empty; string reason = string.Empty;
if (TryLinkRegionToCoords(UUID.Zero, mapName, xloc, yloc, out reason) == null) if (TryLinkRegionToCoords(UUID.Zero, mapName, xloc, yloc, out reason) == null)
MainConsole.Instance.Output("Failed to link region: " + reason); MainConsole.Instance.Output("Failed to link region: " + reason);
MainConsole.Instance.Output("Hyperlink established"); else
MainConsole.Instance.Output("Hyperlink established");
} }
else else
{ {

View File

@ -120,7 +120,7 @@ namespace OpenSim.Services.HypergridService
reason = string.Empty; reason = string.Empty;
m_log.DebugFormat("[GATEKEEPER SERVICE]: Request to link to {0}", regionName); m_log.DebugFormat("[GATEKEEPER SERVICE]: Request to link to {0}", regionName);
if (!m_AllowTeleportsToAnyRegion) if (!m_AllowTeleportsToAnyRegion || regionName == string.Empty)
{ {
List<GridRegion> defs = m_GridService.GetDefaultRegions(m_ScopeID); List<GridRegion> defs = m_GridService.GetDefaultRegions(m_ScopeID);
if (defs != null && defs.Count > 0) if (defs != null && defs.Count > 0)
@ -133,12 +133,7 @@ namespace OpenSim.Services.HypergridService
} }
catch catch
{ {
reason = "Grid setup problem"; reason = "Grid setup problem. Try specifying a particular region here.";
return false;
}
if (regionName != string.Empty)
{
reason = "Direct links to regions not allowed";
return false; return false;
} }

View File

@ -20,6 +20,7 @@
; change this to your grid-wide grid server ; change this to your grid-wide grid server
; ;
GridServerURI = "http://mygridserver.com:8003" GridServerURI = "http://mygridserver.com:8003"
;AllowHypergridMapSearch = true
[AvatarService] [AvatarService]
; ;