mirror of
https://github.com/opensim/opensim.git
synced 2026-05-14 18:55:39 +08:00
do not do chained hg teleports
This commit is contained in:
@@ -337,6 +337,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||
return rinfo;
|
||||
}
|
||||
|
||||
public GridRegion GetLocalRegionByName(UUID scopeID, string name)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public GridRegion GetLocalRegionByURI(UUID scopeID, RegionURI uri)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<GridRegion> GetRegionsByName(UUID scopeID, string name, int maxNumber)
|
||||
{
|
||||
var ruri = new RegionURI(name, m_ThisGridInfo);
|
||||
|
||||
@@ -65,16 +65,9 @@ namespace OpenSim.Server.Handlers.Hypergrid
|
||||
if (name == null)
|
||||
name = string.Empty;
|
||||
|
||||
UUID regionID = UUID.Zero;
|
||||
string externalName = string.Empty;
|
||||
string imageURL = string.Empty;
|
||||
ulong regionHandle = 0;
|
||||
string reason = string.Empty;
|
||||
int sizeX = 256;
|
||||
int sizeY = 256;
|
||||
|
||||
m_log.DebugFormat("[HG Handler]: XMLRequest to link to {0} from {1}", (name.Length == 0) ? "default region" : name, remoteClient.Address.ToString());
|
||||
bool success = m_GatekeeperService.LinkRegion(name, out regionID, out regionHandle, out externalName, out imageURL, out reason, out sizeX, out sizeY);
|
||||
bool success = m_GatekeeperService.LinkLocalRegion(name, out UUID regionID, out ulong regionHandle, out string externalName,
|
||||
out string imageURL, out string reason, out int sizeX, out int sizeY);
|
||||
|
||||
Hashtable hash = new Hashtable();
|
||||
hash["result"] = success.ToString();
|
||||
|
||||
@@ -369,11 +369,20 @@ namespace OpenSim.Services.Connectors
|
||||
return rinfo;
|
||||
}
|
||||
|
||||
public GridRegion GetLocalRegionByName(UUID scopeID, string regionName)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
public GridRegion GetRegionByURI(UUID scopeID, RegionURI uri)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public GridRegion GetLocalRegionByURI(UUID scopeID, RegionURI uri)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<GridRegion> GetRegionsByName(UUID scopeID, string name, int maxNumber)
|
||||
{
|
||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||
|
||||
@@ -546,7 +546,7 @@ namespace OpenSim.Services.GridService
|
||||
|
||||
if (localGrid)
|
||||
{
|
||||
if(uri.HasRegionName)
|
||||
if (uri.HasRegionName)
|
||||
{
|
||||
RegionData rdata = m_Database.GetSpecific(uri.RegionName, scopeID);
|
||||
if (rdata != null)
|
||||
@@ -583,6 +583,40 @@ namespace OpenSim.Services.GridService
|
||||
return r;
|
||||
}
|
||||
|
||||
public GridRegion GetLocalRegionByName(UUID scopeID, string name)
|
||||
{
|
||||
var nameURI = new RegionURI(name);
|
||||
return GetLocalRegionByURI(scopeID, nameURI);
|
||||
}
|
||||
|
||||
public GridRegion GetLocalRegionByURI(UUID scopeID, RegionURI uri)
|
||||
{
|
||||
if (!uri.IsValid)
|
||||
return null;
|
||||
|
||||
if (uri.HasHost)
|
||||
{
|
||||
if (!uri.ResolveDNS())
|
||||
return null;
|
||||
if(!m_HypergridLinker.IsLocalGrid(uri.HostUrl))
|
||||
return null;
|
||||
}
|
||||
|
||||
if (uri.HasRegionName)
|
||||
{
|
||||
RegionData rdata = m_Database.GetSpecific(uri.RegionName, scopeID);
|
||||
if (rdata != null)
|
||||
return RegionData2RegionInfo(rdata);
|
||||
}
|
||||
else
|
||||
{
|
||||
List<GridRegion> defregs = GetDefaultRegions(scopeID);
|
||||
if (defregs != null)
|
||||
return defregs[0];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<GridRegion> GetRegionsByName(UUID scopeID, string name, int maxNumber)
|
||||
{
|
||||
// m_log.DebugFormat("[GRID SERVICE]: GetRegionsByName {0}", name);
|
||||
|
||||
@@ -222,7 +222,7 @@ namespace OpenSim.Services.HypergridService
|
||||
}
|
||||
}
|
||||
|
||||
public bool LinkRegion(string regionName, out UUID regionID, out ulong regionHandle, out string externalName, out string imageURL, out string reason, out int sizeX, out int sizeY)
|
||||
public bool LinkLocalRegion(string regionName, out UUID regionID, out ulong regionHandle, out string externalName, out string imageURL, out string reason, out int sizeX, out int sizeY)
|
||||
{
|
||||
regionID = UUID.Zero;
|
||||
regionHandle = 0;
|
||||
@@ -251,7 +251,7 @@ namespace OpenSim.Services.HypergridService
|
||||
}
|
||||
else
|
||||
{
|
||||
region = m_GridService.GetRegionByName(m_ScopeID, regionName);
|
||||
region = m_GridService.GetLocalRegionByName(m_ScopeID, regionName);
|
||||
if (region is null)
|
||||
{
|
||||
reason = "Region not found";
|
||||
|
||||
@@ -85,6 +85,9 @@ namespace OpenSim.Services.Interfaces
|
||||
GridRegion GetRegionByName(UUID scopeID, string regionName);
|
||||
GridRegion GetRegionByURI(UUID scopeID, RegionURI uri);
|
||||
|
||||
GridRegion GetLocalRegionByName(UUID scopeID, string regionName);
|
||||
GridRegion GetLocalRegionByURI(UUID scopeID, RegionURI uri);
|
||||
|
||||
/// <summary>
|
||||
/// Get information about regions starting with the provided name.
|
||||
/// </summary>
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace OpenSim.Services.Interfaces
|
||||
{
|
||||
public interface IGatekeeperService
|
||||
{
|
||||
bool LinkRegion(string regionDescriptor, out UUID regionID, out ulong regionHandle, out string externalName, out string imageURL, out string reason, out int sizeX, out int sizeY);
|
||||
bool LinkLocalRegion(string regionDescriptor, out UUID regionID, out ulong regionHandle, out string externalName, out string imageURL, out string reason, out int sizeX, out int sizeY);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the region a Hypergrid visitor should enter.
|
||||
|
||||
Reference in New Issue
Block a user