From 6d2893be67fd725090b69f5f31c0985c3d211135 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Thu, 3 Apr 2014 12:47:20 +0300 Subject: When teleporting using Hypergrid, show more informative error messages in case of error --- OpenSim/Services/HypergridService/GatekeeperService.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services/HypergridService/GatekeeperService.cs') diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index 7a0228b..e9d41c7 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs @@ -204,15 +204,26 @@ namespace OpenSim.Services.HypergridService return true; } - public GridRegion GetHyperlinkRegion(UUID regionID) + public GridRegion GetHyperlinkRegion(UUID regionID, out string message) { m_log.DebugFormat("[GATEKEEPER SERVICE]: Request to get hyperlink region {0}", regionID); + message = null; if (!m_AllowTeleportsToAnyRegion) + { // Don't even check the given regionID + message = "Teleporting to the default region."; return m_DefaultGatewayRegion; + } GridRegion region = m_GridService.GetRegionByUUID(m_ScopeID, regionID); + + if (region == null) + { + message = "The teleport destination could not be found."; + return null; + } + return region; } -- cgit v1.1