mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
* refactor refactor refactor ServerURI 4 lyfe
This commit is contained in:
committed by
Teravus Ovares (Dan Olivares)
parent
a7acb650d4
commit
55974df14b
@@ -337,20 +337,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
if (sp.ClientView.TryGet(out ipepClient))
|
||||
{
|
||||
capsPath
|
||||
= "http://"
|
||||
+ NetworkUtil.GetHostFor(ipepClient.EndPoint, finalDestination.ExternalHostName)
|
||||
+ ":"
|
||||
+ finalDestination.HttpPort
|
||||
+ CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);
|
||||
= finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
capsPath
|
||||
= "http://"
|
||||
+ finalDestination.ExternalHostName
|
||||
+ ":"
|
||||
+ finalDestination.HttpPort
|
||||
+ CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);
|
||||
capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -382,8 +373,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
else
|
||||
{
|
||||
agentCircuit.CapsPath = sp.Scene.CapsModule.GetChildSeed(sp.UUID, reg.RegionHandle);
|
||||
capsPath = "http://" + finalDestination.ExternalHostName + ":" + finalDestination.HttpPort
|
||||
+ "/CAPS/" + agentCircuit.CapsPath + "0000/";
|
||||
capsPath = finalDestination.ServerURI + "/CAPS/" + agentCircuit.CapsPath + "0000/";
|
||||
}
|
||||
|
||||
// Expect avatar crossing is a heavy-duty function at the destination.
|
||||
@@ -516,8 +506,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
|
||||
protected virtual void SetCallbackURL(AgentData agent, RegionInfo region)
|
||||
{
|
||||
agent.CallbackURI = "http://" + region.ExternalHostName + ":" + region.HttpPort +
|
||||
"/agent/" + agent.AgentID.ToString() + "/" + region.RegionID.ToString() + "/release/";
|
||||
agent.CallbackURI = region.ServerURI + "/agent/" + agent.AgentID.ToString() + "/" + region.RegionID.ToString() + "/release/";
|
||||
|
||||
}
|
||||
|
||||
@@ -842,7 +831,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
cAgent.Position = pos;
|
||||
if (isFlying)
|
||||
cAgent.ControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY;
|
||||
cAgent.CallbackURI = "http://" + m_scene.RegionInfo.ExternalHostName + ":" + m_scene.RegionInfo.HttpPort +
|
||||
cAgent.CallbackURI = m_scene.RegionInfo.ServerURI +
|
||||
"/agent/" + agent.UUID.ToString() + "/" + m_scene.RegionInfo.RegionID.ToString() + "/release/";
|
||||
|
||||
if (!m_scene.SimulationService.UpdateAgent(neighbourRegion, cAgent))
|
||||
@@ -870,8 +859,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
}
|
||||
// TODO Should construct this behind a method
|
||||
string capsPath =
|
||||
"http://" + neighbourRegion.ExternalHostName + ":" + neighbourRegion.HttpPort
|
||||
+ "/CAPS/" + agentcaps /*circuitdata.CapsPath*/ + "0000/";
|
||||
neighbourRegion.ServerURI + "/CAPS/" + agentcaps /*circuitdata.CapsPath*/ + "0000/";
|
||||
|
||||
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} to client {1}", capsPath, agent.UUID);
|
||||
|
||||
@@ -1190,8 +1178,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
y = y / Constants.RegionSize;
|
||||
m_log.Info("[ENTITY TRANSFER MODULE]: Starting to inform client about neighbour " + x + ", " + y + "(" + endPoint.ToString() + ")");
|
||||
|
||||
string capsPath = "http://" + reg.ExternalHostName + ":" + reg.HttpPort
|
||||
+ "/CAPS/" + a.CapsPath + "0000/";
|
||||
string capsPath = reg.ServerURI + "/CAPS/" + a.CapsPath + "0000/";
|
||||
|
||||
string reason = String.Empty;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user