Merge branch 'master' of /var/git/opensim/
commit
cc411bf5f3
|
@ -631,7 +631,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
IClientAPI client;
|
IClientAPI client;
|
||||||
if (!m_scene.TryGetClient(address, out client) || !(client is LLClientView))
|
if (!m_scene.TryGetClient(address, out client) || !(client is LLClientView))
|
||||||
{
|
{
|
||||||
//m_log.Debug("[LLUDPSERVER]: Received a " + packet.Type + " packet from an unrecognized source: " + address + " in " + m_scene.RegionInfo.RegionName);
|
m_log.Debug("[LLUDPSERVER]: Received a " + packet.Type + " packet from an unrecognized source: " + address + " in " + m_scene.RegionInfo.RegionName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -197,8 +197,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
sp.ControllingClient.SendTeleportFailed("Problem at destination");
|
sp.ControllingClient.SendTeleportFailed("Problem at destination");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Final destination is x={0} y={1} uuid={2}",
|
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Final destination is x={0} y={1} {2}@{3}",
|
||||||
finalDestination.RegionLocX / Constants.RegionSize, finalDestination.RegionLocY / Constants.RegionSize, finalDestination.RegionID);
|
finalDestination.RegionLocX / Constants.RegionSize, finalDestination.RegionLocY / Constants.RegionSize, finalDestination.RegionID, finalDestination.ServerURI);
|
||||||
|
|
||||||
// Check that these are not the same coordinates
|
// Check that these are not the same coordinates
|
||||||
if (finalDestination.RegionLocX == sp.Scene.RegionInfo.RegionLocX &&
|
if (finalDestination.RegionLocX == sp.Scene.RegionInfo.RegionLocX &&
|
||||||
|
@ -254,8 +254,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
}
|
}
|
||||||
|
|
||||||
m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
"[ENTITY TRANSFER MODULE]: Request Teleport to {0}:{1}:{2}/{3}",
|
"[ENTITY TRANSFER MODULE]: Request Teleport to {0} ({1}) {2}/{3}",
|
||||||
reg.ExternalHostName, reg.HttpPort, finalDestination.RegionName, position);
|
reg.ServerURI, finalDestination.ServerURI, finalDestination.RegionName, position);
|
||||||
|
|
||||||
uint newRegionX = (uint)(reg.RegionHandle >> 40);
|
uint newRegionX = (uint)(reg.RegionHandle >> 40);
|
||||||
uint newRegionY = (((uint)(reg.RegionHandle)) >> 8);
|
uint newRegionY = (((uint)(reg.RegionHandle)) >> 8);
|
||||||
|
|
|
@ -123,7 +123,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
if ((flags & (int)OpenSim.Data.RegionFlags.Hyperlink) != 0)
|
if ((flags & (int)OpenSim.Data.RegionFlags.Hyperlink) != 0)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Destination region {0} is hyperlink", region.RegionID);
|
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Destination region {0} is hyperlink", region.RegionID);
|
||||||
return m_GatekeeperConnector.GetHyperlinkRegion(region, region.RegionID);
|
GridRegion real_destination = m_GatekeeperConnector.GetHyperlinkRegion(region, region.RegionID);
|
||||||
|
m_log.Debug("GetfinalDestination serveruri -> " + real_destination.ServerURI);
|
||||||
|
return real_destination;
|
||||||
}
|
}
|
||||||
return region;
|
return region;
|
||||||
}
|
}
|
||||||
|
@ -149,6 +151,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
|
|
||||||
protected override bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason, out bool logout)
|
protected override bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason, out bool logout)
|
||||||
{
|
{
|
||||||
|
m_log.Debug("CreateAgent " + reg.ServerURI + " " + finalDestination.ServerURI);
|
||||||
reason = string.Empty;
|
reason = string.Empty;
|
||||||
logout = false;
|
logout = false;
|
||||||
int flags = m_aScene.GridService.GetRegionFlags(m_aScene.RegionInfo.ScopeID, reg.RegionID);
|
int flags = m_aScene.GridService.GetRegionFlags(m_aScene.RegionInfo.ScopeID, reg.RegionID);
|
||||||
|
|
|
@ -3738,9 +3738,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
// We have to wait until the viewer contacts this region after receiving EAC.
|
// We have to wait until the viewer contacts this region after receiving EAC.
|
||||||
// That calls AddNewClient, which finally creates the ScenePresence
|
// That calls AddNewClient, which finally creates the ScenePresence
|
||||||
|
m_log.Debug("ICADU -> pre wait");
|
||||||
ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID);
|
ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID);
|
||||||
|
m_log.Debug("ICADU -> post wait");
|
||||||
if (childAgentUpdate != null)
|
if (childAgentUpdate != null)
|
||||||
{
|
{
|
||||||
|
m_log.Debug("ICADU -> not child agent!");
|
||||||
childAgentUpdate.ChildAgentDataUpdate(cAgentData);
|
childAgentUpdate.ChildAgentDataUpdate(cAgentData);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -3756,7 +3759,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// <returns>true if we handled it.</returns>
|
/// <returns>true if we handled it.</returns>
|
||||||
public virtual bool IncomingChildAgentDataUpdate(AgentPosition cAgentData)
|
public virtual bool IncomingChildAgentDataUpdate(AgentPosition cAgentData)
|
||||||
{
|
{
|
||||||
//m_log.Debug(" XXX Scene IncomingChildAgentDataUpdate POSITION in " + RegionInfo.RegionName);
|
m_log.Debug(" XXX Scene IncomingChildAgentDataUpdate POSITION in " + RegionInfo.RegionName);
|
||||||
ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID);
|
ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID);
|
||||||
if (childAgentUpdate != null)
|
if (childAgentUpdate != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2925,7 +2925,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public void ChildAgentDataUpdate(AgentData cAgentData)
|
public void ChildAgentDataUpdate(AgentData cAgentData)
|
||||||
{
|
{
|
||||||
//m_log.Debug(" >>> ChildAgentDataUpdate <<< " + Scene.RegionInfo.RegionName);
|
m_log.Debug(" >>> ChildAgentDataUpdate <<< " + Scene.RegionInfo.RegionName);
|
||||||
if (!IsChildAgent)
|
if (!IsChildAgent)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,8 @@ namespace OpenSim.Server.Handlers.Hypergrid
|
||||||
UUID uuid = UUID.Zero;
|
UUID uuid = UUID.Zero;
|
||||||
string regionname = string.Empty;
|
string regionname = string.Empty;
|
||||||
string gatekeeper_host = string.Empty;
|
string gatekeeper_host = string.Empty;
|
||||||
string server_uri = string.Empty;
|
string gatekeeper_serveruri = string.Empty;
|
||||||
|
string destination_serveruri = string.Empty;
|
||||||
int gatekeeper_port = 0;
|
int gatekeeper_port = 0;
|
||||||
IPEndPoint client_ipaddress = null;
|
IPEndPoint client_ipaddress = null;
|
||||||
|
|
||||||
|
@ -132,8 +133,13 @@ namespace OpenSim.Server.Handlers.Hypergrid
|
||||||
gatekeeper_host = args["gatekeeper_host"].AsString();
|
gatekeeper_host = args["gatekeeper_host"].AsString();
|
||||||
if (args.ContainsKey("gatekeeper_port") && args["gatekeeper_port"] != null)
|
if (args.ContainsKey("gatekeeper_port") && args["gatekeeper_port"] != null)
|
||||||
Int32.TryParse(args["gatekeeper_port"].AsString(), out gatekeeper_port);
|
Int32.TryParse(args["gatekeeper_port"].AsString(), out gatekeeper_port);
|
||||||
|
if (args.ContainsKey("gatekeeper_serveruri") && args["gatekeeper_serveruri"] !=null)
|
||||||
|
gatekeeper_serveruri = args["gatekeeper_serveruri"];
|
||||||
|
if (args.ContainsKey("destination_serveruri") && args["destination_serveruri"] !=null)
|
||||||
|
destination_serveruri = args["destination_serveruri"];
|
||||||
|
|
||||||
GridRegion gatekeeper = new GridRegion();
|
GridRegion gatekeeper = new GridRegion();
|
||||||
|
gatekeeper.ServerURI = gatekeeper_serveruri;
|
||||||
gatekeeper.ExternalHostName = gatekeeper_host;
|
gatekeeper.ExternalHostName = gatekeeper_host;
|
||||||
gatekeeper.HttpPort = (uint)gatekeeper_port;
|
gatekeeper.HttpPort = (uint)gatekeeper_port;
|
||||||
gatekeeper.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0);
|
gatekeeper.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0);
|
||||||
|
@ -174,7 +180,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
|
||||||
destination.RegionLocX = x;
|
destination.RegionLocX = x;
|
||||||
destination.RegionLocY = y;
|
destination.RegionLocY = y;
|
||||||
destination.RegionName = regionname;
|
destination.RegionName = regionname;
|
||||||
|
destination.ServerURI = destination_serveruri;
|
||||||
|
|
||||||
AgentCircuitData aCircuit = new AgentCircuitData();
|
AgentCircuitData aCircuit = new AgentCircuitData();
|
||||||
try
|
try
|
||||||
|
|
|
@ -116,19 +116,19 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
UUID.TryParse((string)hash["uuid"], out regionID);
|
UUID.TryParse((string)hash["uuid"], out regionID);
|
||||||
//m_log.Debug(">> HERE, uuid: " + regionID);
|
m_log.Debug(">> HERE, uuid: " + regionID);
|
||||||
if ((string)hash["handle"] != null)
|
if ((string)hash["handle"] != null)
|
||||||
{
|
{
|
||||||
realHandle = Convert.ToUInt64((string)hash["handle"]);
|
realHandle = Convert.ToUInt64((string)hash["handle"]);
|
||||||
//m_log.Debug(">> HERE, realHandle: " + realHandle);
|
m_log.Debug(">> HERE, realHandle: " + realHandle);
|
||||||
}
|
}
|
||||||
if (hash["region_image"] != null) {
|
if (hash["region_image"] != null) {
|
||||||
imageURL = (string)hash["region_image"];
|
imageURL = (string)hash["region_image"];
|
||||||
//m_log.Debug(">> HERE, imageURL: " + imageURL);
|
m_log.Debug(">> HERE, imageURL: " + imageURL);
|
||||||
}
|
}
|
||||||
if (hash["external_name"] != null) {
|
if (hash["external_name"] != null) {
|
||||||
externalName = (string)hash["external_name"];
|
externalName = (string)hash["external_name"];
|
||||||
//m_log.Debug(">> HERE, externalName: " + externalName);
|
m_log.Debug(">> HERE, externalName: " + externalName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
paramList.Add(hash);
|
paramList.Add(hash);
|
||||||
|
|
||||||
XmlRpcRequest request = new XmlRpcRequest("get_region", paramList);
|
XmlRpcRequest request = new XmlRpcRequest("get_region", paramList);
|
||||||
//m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: contacting " + gatekeeper.ServerURI);
|
m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: contacting " + gatekeeper.ServerURI);
|
||||||
XmlRpcResponse response = null;
|
XmlRpcResponse response = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -199,7 +199,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
//m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Exception " + e.Message);
|
m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Exception " + e.Message);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,41 +221,48 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
GridRegion region = new GridRegion();
|
GridRegion region = new GridRegion();
|
||||||
|
|
||||||
UUID.TryParse((string)hash["uuid"], out region.RegionID);
|
UUID.TryParse((string)hash["uuid"], out region.RegionID);
|
||||||
//m_log.Debug(">> HERE, uuid: " + region.RegionID);
|
m_log.Debug(">> HERE, uuid: " + region.RegionID);
|
||||||
int n = 0;
|
int n = 0;
|
||||||
if (hash["x"] != null)
|
if (hash["x"] != null)
|
||||||
{
|
{
|
||||||
Int32.TryParse((string)hash["x"], out n);
|
Int32.TryParse((string)hash["x"], out n);
|
||||||
region.RegionLocX = n;
|
region.RegionLocX = n;
|
||||||
//m_log.Debug(">> HERE, x: " + region.RegionLocX);
|
m_log.Debug(">> HERE, x: " + region.RegionLocX);
|
||||||
}
|
}
|
||||||
if (hash["y"] != null)
|
if (hash["y"] != null)
|
||||||
{
|
{
|
||||||
Int32.TryParse((string)hash["y"], out n);
|
Int32.TryParse((string)hash["y"], out n);
|
||||||
region.RegionLocY = n;
|
region.RegionLocY = n;
|
||||||
//m_log.Debug(">> HERE, y: " + region.RegionLocY);
|
m_log.Debug(">> HERE, y: " + region.RegionLocY);
|
||||||
}
|
}
|
||||||
if (hash["region_name"] != null)
|
if (hash["region_name"] != null)
|
||||||
{
|
{
|
||||||
region.RegionName = (string)hash["region_name"];
|
region.RegionName = (string)hash["region_name"];
|
||||||
//m_log.Debug(">> HERE, region_name: " + region.RegionName);
|
m_log.Debug(">> HERE, region_name: " + region.RegionName);
|
||||||
}
|
}
|
||||||
if (hash["hostname"] != null)
|
if (hash["hostname"] != null) {
|
||||||
region.ExternalHostName = (string)hash["hostname"];
|
region.ExternalHostName = (string)hash["hostname"];
|
||||||
//m_log.Debug(">> HERE, hostname: " + region.ExternalHostName);
|
m_log.Debug(">> HERE, hostname: " + region.ExternalHostName);
|
||||||
|
}
|
||||||
if (hash["http_port"] != null)
|
if (hash["http_port"] != null)
|
||||||
{
|
{
|
||||||
uint p = 0;
|
uint p = 0;
|
||||||
UInt32.TryParse((string)hash["http_port"], out p);
|
UInt32.TryParse((string)hash["http_port"], out p);
|
||||||
region.HttpPort = p;
|
region.HttpPort = p;
|
||||||
//m_log.Debug(">> HERE, http_port: " + region.HttpPort);
|
m_log.Debug(">> HERE, http_port: " + region.HttpPort);
|
||||||
}
|
}
|
||||||
if (hash["internal_port"] != null)
|
if (hash["internal_port"] != null)
|
||||||
{
|
{
|
||||||
int p = 0;
|
int p = 0;
|
||||||
Int32.TryParse((string)hash["internal_port"], out p);
|
Int32.TryParse((string)hash["internal_port"], out p);
|
||||||
region.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), p);
|
region.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), p);
|
||||||
//m_log.Debug(">> HERE, internal_port: " + region.InternalEndPoint);
|
m_log.Debug(">> HERE, internal_port: " + region.InternalEndPoint);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hash["server_uri"] != null)
|
||||||
|
{
|
||||||
|
region.ServerURI = (string) hash["server_uri"];
|
||||||
|
m_log.Debug(">> HERE, server_uri: " + region.ServerURI);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Successful return
|
// Successful return
|
||||||
|
|
|
@ -232,12 +232,14 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
m_log.Debug("[USER AGENT CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message);
|
m_log.Debug("[USER AGENT CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message);
|
||||||
}
|
}
|
||||||
// Add the input arguments
|
// Add the input arguments
|
||||||
|
args["gatekeeper_serveruri"] = OSD.FromString(gatekeeper.ServerURI);
|
||||||
args["gatekeeper_host"] = OSD.FromString(gatekeeper.ExternalHostName);
|
args["gatekeeper_host"] = OSD.FromString(gatekeeper.ExternalHostName);
|
||||||
args["gatekeeper_port"] = OSD.FromString(gatekeeper.HttpPort.ToString());
|
args["gatekeeper_port"] = OSD.FromString(gatekeeper.HttpPort.ToString());
|
||||||
args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString());
|
args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString());
|
||||||
args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString());
|
args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString());
|
||||||
args["destination_name"] = OSD.FromString(destination.RegionName);
|
args["destination_name"] = OSD.FromString(destination.RegionName);
|
||||||
args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
|
args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
|
||||||
|
args["destination_serveruri"] = OSD.FromString(destination.ServerURI);
|
||||||
|
|
||||||
// 10/3/2010
|
// 10/3/2010
|
||||||
// I added the client_ip up to the regular AgentCircuitData, so this doesn't need to be here.
|
// I added the client_ip up to the regular AgentCircuitData, so this doesn't need to be here.
|
||||||
|
|
|
@ -126,11 +126,12 @@ namespace OpenSim.Services.GridService
|
||||||
|
|
||||||
if (MainConsole.Instance != null)
|
if (MainConsole.Instance != null)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region",
|
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", "link-region <Xloc> <Yloc> <ServerURI> [<RemoteRegionName>]", "Link a HyperGrid Region", RunCommand);
|
||||||
"link-region <Xloc> <Yloc> <RegionIP> <RegionPort> [<RegionServerURI] [<RemoteRegionName>] <cr>",
|
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "legacy-link-region",
|
||||||
"Link a hypergrid region", RunCommand);
|
"legacy-link-region <Xloc> <Yloc> <RegionIP> <RegionPort> [<RemoteRegionName>]",
|
||||||
|
"Link a hypergrid region (deprecated)", RunCommand);
|
||||||
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "unlink-region",
|
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "unlink-region",
|
||||||
"unlink-region <local name> or <HostName>:<HttpPort> <cr>",
|
"unlink-region <local name>",
|
||||||
"Unlink a hypergrid region", RunCommand);
|
"Unlink a hypergrid region", RunCommand);
|
||||||
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [<x> <y>] <cr>",
|
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [<x> <y>] <cr>",
|
||||||
"Set local coordinate to map HG regions to", RunCommand);
|
"Set local coordinate to map HG regions to", RunCommand);
|
||||||
|
@ -198,27 +199,33 @@ namespace OpenSim.Services.GridService
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TryCreateLink(UUID scopeID, int xloc, int yloc, string externalRegionName, uint externalPort, string externalHostName, out GridRegion regInfo, out string reason)
|
public bool TryCreateLink(UUID scopeID, int xloc, int yloc, string externalRegionName, uint externalPort, string externalHostName, out GridRegion regInfo, out string reason)
|
||||||
|
{
|
||||||
|
return TryCreateLink(scopeID, xloc, yloc, externalRegionName, externalPort, externalHostName, null, out regInfo, out reason);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool TryCreateLink(UUID scopeID, int xloc, int yloc, string externalRegionName, uint externalPort, string externalHostName, string serverURI, out GridRegion regInfo, out string reason)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[HYPERGRID LINKER]: Link to {0}:{1}:{2}, in {3}-{4}", externalHostName, externalPort, externalRegionName, xloc, yloc);
|
m_log.DebugFormat("[HYPERGRID LINKER]: Link to {0}:{1}:{2}, in {3}-{4}", externalHostName, externalPort, externalRegionName, xloc, yloc);
|
||||||
|
|
||||||
reason = string.Empty;
|
reason = string.Empty;
|
||||||
regInfo = new GridRegion();
|
regInfo = new GridRegion();
|
||||||
regInfo.RegionName = externalRegionName;
|
if ( externalPort > 0)
|
||||||
regInfo.HttpPort = externalPort;
|
regInfo.HttpPort = externalPort;
|
||||||
|
else
|
||||||
|
regInfo.HttpPort = 0;
|
||||||
|
if ( externalHostName != null)
|
||||||
regInfo.ExternalHostName = externalHostName;
|
regInfo.ExternalHostName = externalHostName;
|
||||||
|
else
|
||||||
|
regInfo.ExternalHostName = "0.0.0.0";
|
||||||
|
if ( serverURI != null)
|
||||||
|
regInfo.ServerURI = serverURI;
|
||||||
|
|
||||||
regInfo.RegionLocX = xloc;
|
regInfo.RegionLocX = xloc;
|
||||||
regInfo.RegionLocY = yloc;
|
regInfo.RegionLocY = yloc;
|
||||||
regInfo.ScopeID = scopeID;
|
regInfo.ScopeID = scopeID;
|
||||||
|
|
||||||
// Big HACK for Simian Grid !!!
|
|
||||||
// We need to clean up all URLs used in OpenSim !!!
|
|
||||||
if (externalHostName.Contains("/")) {
|
|
||||||
regInfo.ServerURI = externalHostName;
|
|
||||||
} else {
|
|
||||||
regInfo.ServerURI = "http://" + externalHostName + ":" + externalPort.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
regInfo.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int)0);
|
regInfo.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int)0);
|
||||||
|
@ -249,8 +256,13 @@ namespace OpenSim.Services.GridService
|
||||||
}
|
}
|
||||||
|
|
||||||
regInfo.RegionID = regionID;
|
regInfo.RegionID = regionID;
|
||||||
if (regInfo.RegionName == string.Empty)
|
|
||||||
regInfo.RegionName = regInfo.ExternalHostName;
|
if ( externalName == string.Empty )
|
||||||
|
regInfo.RegionName = regInfo.ServerURI;
|
||||||
|
else
|
||||||
|
regInfo.RegionName = externalName;
|
||||||
|
|
||||||
|
m_log.Debug("naming linked region " + regInfo.RegionName);
|
||||||
|
|
||||||
// Try get the map image
|
// Try get the map image
|
||||||
//regInfo.TerrainImage = m_GatekeeperConnector.GetMapImage(regionID, imageURL);
|
//regInfo.TerrainImage = m_GatekeeperConnector.GetMapImage(regionID, imageURL);
|
||||||
|
@ -434,6 +446,21 @@ namespace OpenSim.Services.GridService
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void RunLinkRegionCommand(string[] cmdparams)
|
||||||
|
{
|
||||||
|
int xloc, yloc;
|
||||||
|
string serverURI;
|
||||||
|
string remoteName = null;
|
||||||
|
xloc = Convert.ToInt32(cmdparams[0]) * (int)Constants.RegionSize;
|
||||||
|
yloc = Convert.ToInt32(cmdparams[1]) * (int)Constants.RegionSize;
|
||||||
|
serverURI = cmdparams[2];
|
||||||
|
if (cmdparams.Length == 4)
|
||||||
|
remoteName = cmdparams[3];
|
||||||
|
string reason = string.Empty;
|
||||||
|
GridRegion regInfo;
|
||||||
|
TryCreateLink(UUID.Zero, xloc, yloc, remoteName, 0, null, serverURI, out regInfo, out reason);
|
||||||
|
}
|
||||||
|
|
||||||
private void RunHGCommand(string command, string[] cmdparams)
|
private void RunHGCommand(string command, string[] cmdparams)
|
||||||
{
|
{
|
||||||
if (command.Equals("link-mapping"))
|
if (command.Equals("link-mapping"))
|
||||||
|
@ -455,6 +482,18 @@ namespace OpenSim.Services.GridService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (command.Equals("link-region"))
|
else if (command.Equals("link-region"))
|
||||||
|
{
|
||||||
|
if (cmdparams.Length > 0 && cmdparams.Length < 5)
|
||||||
|
{
|
||||||
|
RunLinkRegionCommand(cmdparams);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LinkRegionCmdUsage();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if (command.Equals("legacy-link-region"))
|
||||||
{
|
{
|
||||||
if (cmdparams.Length < 3)
|
if (cmdparams.Length < 3)
|
||||||
{
|
{
|
||||||
|
|
|
@ -134,12 +134,14 @@ namespace OpenSim.Services.HypergridService
|
||||||
public bool LoginAgentToGrid(AgentCircuitData agentCircuit, GridRegion gatekeeper, GridRegion finalDestination, IPEndPoint clientIP, out string reason)
|
public bool LoginAgentToGrid(AgentCircuitData agentCircuit, GridRegion gatekeeper, GridRegion finalDestination, IPEndPoint clientIP, out string reason)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[USER AGENT SERVICE]: Request to login user {0} {1} (@{2}) to grid {3}",
|
m_log.DebugFormat("[USER AGENT SERVICE]: Request to login user {0} {1} (@{2}) to grid {3}",
|
||||||
agentCircuit.firstname, agentCircuit.lastname, ((clientIP == null) ? "stored IP" : clientIP.Address.ToString()),
|
agentCircuit.firstname, agentCircuit.lastname, ((clientIP == null) ? "stored IP" : clientIP.Address.ToString()), gatekeeper.ServerURI);
|
||||||
gatekeeper.ExternalHostName +":"+ gatekeeper.HttpPort);
|
|
||||||
m_log.Debug("gatekeeper serveruri -> " + gatekeeper.ServerURI );
|
|
||||||
|
|
||||||
|
m_log.Debug("LATG final server uri -> " + finalDestination.ServerURI );
|
||||||
// Take the IP address + port of the gatekeeper (reg) plus the info of finalDestination
|
// Take the IP address + port of the gatekeeper (reg) plus the info of finalDestination
|
||||||
GridRegion region = new GridRegion(gatekeeper);
|
GridRegion region = new GridRegion(gatekeeper);
|
||||||
|
region.ServerURI = gatekeeper.ServerURI;
|
||||||
|
region.ExternalHostName = finalDestination.ExternalHostName;
|
||||||
|
region.InternalEndPoint = finalDestination.InternalEndPoint;
|
||||||
region.RegionName = finalDestination.RegionName;
|
region.RegionName = finalDestination.RegionName;
|
||||||
region.RegionID = finalDestination.RegionID;
|
region.RegionID = finalDestination.RegionID;
|
||||||
region.RegionLocX = finalDestination.RegionLocX;
|
region.RegionLocX = finalDestination.RegionLocX;
|
||||||
|
@ -149,6 +151,8 @@ namespace OpenSim.Services.HypergridService
|
||||||
agentCircuit.ServiceSessionID = region.ServerURI + ";" + UUID.Random();
|
agentCircuit.ServiceSessionID = region.ServerURI + ";" + UUID.Random();
|
||||||
TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region);
|
TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region);
|
||||||
|
|
||||||
|
m_log.Debug("region ServerURI -> " + region.ServerURI);
|
||||||
|
|
||||||
bool success = false;
|
bool success = false;
|
||||||
string myExternalIP = string.Empty;
|
string myExternalIP = string.Empty;
|
||||||
string gridName = gatekeeper.ServerURI;
|
string gridName = gatekeeper.ServerURI;
|
||||||
|
|
Loading…
Reference in New Issue