aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-10-22 23:35:01 +0100
committerJustin Clark-Casey (justincc)2010-10-22 23:35:01 +0100
commit8f34e46d7449be1c29419a232a8f7f1e5918f03c (patch)
treee1af6e01bd9be556fe652a32e4ec93c31c80a283 /OpenSim/Region
parentRevert "* additional serveruri cleanup" (diff)
downloadopensim-SC_OLD-8f34e46d7449be1c29419a232a8f7f1e5918f03c.zip
opensim-SC_OLD-8f34e46d7449be1c29419a232a8f7f1e5918f03c.tar.gz
opensim-SC_OLD-8f34e46d7449be1c29419a232a8f7f1e5918f03c.tar.bz2
opensim-SC_OLD-8f34e46d7449be1c29419a232a8f7f1e5918f03c.tar.xz
Revert "* refactor refactor refactor ServerURI 4 lyfe"
This reverts commit 55974df14b6d64c1e1f9e386a3eacce3ba86dc98.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs2
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs27
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs2
3 files changed, 22 insertions, 9 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index f30a850..74ad168 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -327,8 +327,8 @@ namespace OpenSim
327 //regionInfo.originRegionID = regionInfo.RegionID; 327 //regionInfo.originRegionID = regionInfo.RegionID;
328 328
329 // set initial ServerURI 329 // set initial ServerURI
330 regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.InternalEndPoint.Port;
330 regionInfo.HttpPort = m_httpServerPort; 331 regionInfo.HttpPort = m_httpServerPort;
331 regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort.ToString();
332 332
333 regionInfo.osSecret = m_osSecret; 333 regionInfo.osSecret = m_osSecret;
334 334
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 3791e1d..38fff1c 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -337,11 +337,20 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
337 if (sp.ClientView.TryGet(out ipepClient)) 337 if (sp.ClientView.TryGet(out ipepClient))
338 { 338 {
339 capsPath 339 capsPath
340 = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); 340 = "http://"
341 + NetworkUtil.GetHostFor(ipepClient.EndPoint, finalDestination.ExternalHostName)
342 + ":"
343 + finalDestination.HttpPort
344 + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);
341 } 345 }
342 else 346 else
343 { 347 {
344 capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); 348 capsPath
349 = "http://"
350 + finalDestination.ExternalHostName
351 + ":"
352 + finalDestination.HttpPort
353 + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);
345 } 354 }
346 #endregion 355 #endregion
347 356
@@ -373,7 +382,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
373 else 382 else
374 { 383 {
375 agentCircuit.CapsPath = sp.Scene.CapsModule.GetChildSeed(sp.UUID, reg.RegionHandle); 384 agentCircuit.CapsPath = sp.Scene.CapsModule.GetChildSeed(sp.UUID, reg.RegionHandle);
376 capsPath = finalDestination.ServerURI + "/CAPS/" + agentCircuit.CapsPath + "0000/"; 385 capsPath = "http://" + finalDestination.ExternalHostName + ":" + finalDestination.HttpPort
386 + "/CAPS/" + agentCircuit.CapsPath + "0000/";
377 } 387 }
378 388
379 // Expect avatar crossing is a heavy-duty function at the destination. 389 // Expect avatar crossing is a heavy-duty function at the destination.
@@ -506,7 +516,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
506 516
507 protected virtual void SetCallbackURL(AgentData agent, RegionInfo region) 517 protected virtual void SetCallbackURL(AgentData agent, RegionInfo region)
508 { 518 {
509 agent.CallbackURI = region.ServerURI + "/agent/" + agent.AgentID.ToString() + "/" + region.RegionID.ToString() + "/release/"; 519 agent.CallbackURI = "http://" + region.ExternalHostName + ":" + region.HttpPort +
520 "/agent/" + agent.AgentID.ToString() + "/" + region.RegionID.ToString() + "/release/";
510 521
511 } 522 }
512 523
@@ -831,7 +842,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
831 cAgent.Position = pos; 842 cAgent.Position = pos;
832 if (isFlying) 843 if (isFlying)
833 cAgent.ControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY; 844 cAgent.ControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY;
834 cAgent.CallbackURI = m_scene.RegionInfo.ServerURI + 845 cAgent.CallbackURI = "http://" + m_scene.RegionInfo.ExternalHostName + ":" + m_scene.RegionInfo.HttpPort +
835 "/agent/" + agent.UUID.ToString() + "/" + m_scene.RegionInfo.RegionID.ToString() + "/release/"; 846 "/agent/" + agent.UUID.ToString() + "/" + m_scene.RegionInfo.RegionID.ToString() + "/release/";
836 847
837 if (!m_scene.SimulationService.UpdateAgent(neighbourRegion, cAgent)) 848 if (!m_scene.SimulationService.UpdateAgent(neighbourRegion, cAgent))
@@ -859,7 +870,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
859 } 870 }
860 // TODO Should construct this behind a method 871 // TODO Should construct this behind a method
861 string capsPath = 872 string capsPath =
862 neighbourRegion.ServerURI + "/CAPS/" + agentcaps /*circuitdata.CapsPath*/ + "0000/"; 873 "http://" + neighbourRegion.ExternalHostName + ":" + neighbourRegion.HttpPort
874 + "/CAPS/" + agentcaps /*circuitdata.CapsPath*/ + "0000/";
863 875
864 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} to client {1}", capsPath, agent.UUID); 876 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} to client {1}", capsPath, agent.UUID);
865 877
@@ -1178,7 +1190,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1178 y = y / Constants.RegionSize; 1190 y = y / Constants.RegionSize;
1179 m_log.Info("[ENTITY TRANSFER MODULE]: Starting to inform client about neighbour " + x + ", " + y + "(" + endPoint.ToString() + ")"); 1191 m_log.Info("[ENTITY TRANSFER MODULE]: Starting to inform client about neighbour " + x + ", " + y + "(" + endPoint.ToString() + ")");
1180 1192
1181 string capsPath = reg.ServerURI + "/CAPS/" + a.CapsPath + "0000/"; 1193 string capsPath = "http://" + reg.ExternalHostName + ":" + reg.HttpPort
1194 + "/CAPS/" + a.CapsPath + "0000/";
1182 1195
1183 string reason = String.Empty; 1196 string reason = String.Empty;
1184 1197
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index 3ce964a..a182eea 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -147,7 +147,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
147 147
148 string regionimage = "regionImage" + m_scene.RegionInfo.RegionID.ToString(); 148 string regionimage = "regionImage" + m_scene.RegionInfo.RegionID.ToString();
149 regionimage = regionimage.Replace("-", ""); 149 regionimage = regionimage.Replace("-", "");
150 m_log.Info("[WORLD MAP]: JPEG Map location: " + m_scene.RegionInfo.ServerURI + "/index.php?method=" + regionimage); 150 m_log.Info("[WORLD MAP]: JPEG Map location: http://" + m_scene.RegionInfo.ExternalEndPoint.Address.ToString() + ":" + m_scene.RegionInfo.HttpPort.ToString() + "/index.php?method=" + regionimage);
151 151
152 MainServer.Instance.AddHTTPHandler(regionimage, OnHTTPGetMapImage); 152 MainServer.Instance.AddHTTPHandler(regionimage, OnHTTPGetMapImage);
153 MainServer.Instance.AddLLSDHandler( 153 MainServer.Instance.AddLLSDHandler(