diff options
author | Jonathan Freedman | 2010-10-11 16:53:00 -0400 |
---|---|---|
committer | Teravus Ovares (Dan Olivares) | 2010-10-20 22:21:45 -0400 |
commit | 58f75fa19d9aea18283ecdbd44559efb81781c9d (patch) | |
tree | e8bfce52ff388d7e6f02fd48b406280d139bbf29 /OpenSim/Region | |
parent | * additional serveruri cleanup (diff) | |
download | opensim-SC-58f75fa19d9aea18283ecdbd44559efb81781c9d.zip opensim-SC-58f75fa19d9aea18283ecdbd44559efb81781c9d.tar.gz opensim-SC-58f75fa19d9aea18283ecdbd44559efb81781c9d.tar.bz2 opensim-SC-58f75fa19d9aea18283ecdbd44559efb81781c9d.tar.xz |
* more url / hg cleanup
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 34 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs | 4 |
2 files changed, 12 insertions, 26 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 3791e1d..54cc80f 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -327,34 +327,21 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
327 | 327 | ||
328 | // OK, it got this agent. Let's close some child agents | 328 | // OK, it got this agent. Let's close some child agents |
329 | sp.CloseChildAgents(newRegionX, newRegionY); | 329 | sp.CloseChildAgents(newRegionX, newRegionY); |
330 | 330 | IClientIPEndpoint ipepClient; | |
331 | if (NeedsNewAgent(oldRegionX, newRegionX, oldRegionY, newRegionY)) | 331 | if (NeedsNewAgent(oldRegionX, newRegionX, oldRegionY, newRegionY)) |
332 | { | 332 | { |
333 | //sp.ControllingClient.SendTeleportProgress(teleportFlags, "Creating agent..."); | 333 | //sp.ControllingClient.SendTeleportProgress(teleportFlags, "Creating agent..."); |
334 | |||
335 | #region IP Translation for NAT | 334 | #region IP Translation for NAT |
336 | IClientIPEndpoint ipepClient; | 335 | // Uses ipepClient above |
337 | if (sp.ClientView.TryGet(out ipepClient)) | 336 | if (sp.ClientView.TryGet(out ipepClient)) |
338 | { | 337 | { |
339 | capsPath | 338 | endPoint.Address = NetworkUtil.GetIPFor(ipepClient.EndPoint, endPoint.Address); |
340 | = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); | ||
341 | } | ||
342 | else | ||
343 | { | ||
344 | capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); | ||
345 | } | 339 | } |
346 | #endregion | 340 | #endregion |
341 | capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); | ||
347 | 342 | ||
348 | if (eq != null) | 343 | if (eq != null) |
349 | { | 344 | { |
350 | #region IP Translation for NAT | ||
351 | // Uses ipepClient above | ||
352 | if (sp.ClientView.TryGet(out ipepClient)) | ||
353 | { | ||
354 | endPoint.Address = NetworkUtil.GetIPFor(ipepClient.EndPoint, endPoint.Address); | ||
355 | } | ||
356 | #endregion | ||
357 | |||
358 | eq.EnableSimulator(destinationHandle, endPoint, sp.UUID); | 345 | eq.EnableSimulator(destinationHandle, endPoint, sp.UUID); |
359 | 346 | ||
360 | // ES makes the client send a UseCircuitCode message to the destination, | 347 | // ES makes the client send a UseCircuitCode message to the destination, |
@@ -373,7 +360,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
373 | else | 360 | else |
374 | { | 361 | { |
375 | agentCircuit.CapsPath = sp.Scene.CapsModule.GetChildSeed(sp.UUID, reg.RegionHandle); | 362 | agentCircuit.CapsPath = sp.Scene.CapsModule.GetChildSeed(sp.UUID, reg.RegionHandle); |
376 | capsPath = finalDestination.ServerURI + "/CAPS/" + agentCircuit.CapsPath + "0000/"; | 363 | capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); |
377 | } | 364 | } |
378 | 365 | ||
379 | // Expect avatar crossing is a heavy-duty function at the destination. | 366 | // Expect avatar crossing is a heavy-duty function at the destination. |
@@ -506,7 +493,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
506 | 493 | ||
507 | protected virtual void SetCallbackURL(AgentData agent, RegionInfo region) | 494 | protected virtual void SetCallbackURL(AgentData agent, RegionInfo region) |
508 | { | 495 | { |
509 | agent.CallbackURI = region.ServerURI + "/agent/" + agent.AgentID.ToString() + "/" + region.RegionID.ToString() + "/release/"; | 496 | agent.CallbackURI = region.ServerURI + "agent/" + agent.AgentID.ToString() + "/" + region.RegionID.ToString() + "/release/"; |
497 | m_log.Debug("Set callback URL to " + agent.CallbackURI); | ||
510 | 498 | ||
511 | } | 499 | } |
512 | 500 | ||
@@ -832,7 +820,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
832 | if (isFlying) | 820 | if (isFlying) |
833 | cAgent.ControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY; | 821 | cAgent.ControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY; |
834 | cAgent.CallbackURI = m_scene.RegionInfo.ServerURI + | 822 | cAgent.CallbackURI = m_scene.RegionInfo.ServerURI + |
835 | "/agent/" + agent.UUID.ToString() + "/" + m_scene.RegionInfo.RegionID.ToString() + "/release/"; | 823 | "agent/" + agent.UUID.ToString() + "/" + m_scene.RegionInfo.RegionID.ToString() + "/release/"; |
836 | 824 | ||
837 | if (!m_scene.SimulationService.UpdateAgent(neighbourRegion, cAgent)) | 825 | if (!m_scene.SimulationService.UpdateAgent(neighbourRegion, cAgent)) |
838 | { | 826 | { |
@@ -857,9 +845,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
857 | neighbourRegion.RegionHandle); | 845 | neighbourRegion.RegionHandle); |
858 | return agent; | 846 | return agent; |
859 | } | 847 | } |
860 | // TODO Should construct this behind a method | 848 | string capsPath = neighbourRegion.ServerURI + CapsUtil.GetCapsSeedPath(agentcaps); |
861 | string capsPath = | ||
862 | neighbourRegion.ServerURI + "/CAPS/" + agentcaps /*circuitdata.CapsPath*/ + "0000/"; | ||
863 | 849 | ||
864 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} to client {1}", capsPath, agent.UUID); | 850 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} to client {1}", capsPath, agent.UUID); |
865 | 851 | ||
@@ -1178,7 +1164,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1178 | y = y / Constants.RegionSize; | 1164 | y = y / Constants.RegionSize; |
1179 | m_log.Info("[ENTITY TRANSFER MODULE]: Starting to inform client about neighbour " + x + ", " + y + "(" + endPoint.ToString() + ")"); | 1165 | m_log.Info("[ENTITY TRANSFER MODULE]: Starting to inform client about neighbour " + x + ", " + y + "(" + endPoint.ToString() + ")"); |
1180 | 1166 | ||
1181 | string capsPath = reg.ServerURI + "/CAPS/" + a.CapsPath + "0000/"; | 1167 | string capsPath = reg.ServerURI + CapsUtil.GetCapsSeedPath(a.CapsPath); |
1182 | 1168 | ||
1183 | string reason = String.Empty; | 1169 | string reason = String.Empty; |
1184 | 1170 | ||
diff --git a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs index fd0e879..2dd7767 100644 --- a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs +++ b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs | |||
@@ -595,12 +595,12 @@ namespace OpenSim.Region.CoreModules.InterGrid | |||
595 | // DEPRECATED | 595 | // DEPRECATED |
596 | responseMap["seed_capability"] | 596 | responseMap["seed_capability"] |
597 | = OSD.FromString( | 597 | = OSD.FromString( |
598 | regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + CapsUtil.GetCapsSeedPath(userCap.CapsObjectPath)); | 598 | regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/" + CapsUtil.GetCapsSeedPath(userCap.CapsObjectPath)); |
599 | 599 | ||
600 | // REPLACEMENT | 600 | // REPLACEMENT |
601 | responseMap["region_seed_capability"] | 601 | responseMap["region_seed_capability"] |
602 | = OSD.FromString( | 602 | = OSD.FromString( |
603 | regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + CapsUtil.GetCapsSeedPath(userCap.CapsObjectPath)); | 603 | regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/" + CapsUtil.GetCapsSeedPath(userCap.CapsObjectPath)); |
604 | 604 | ||
605 | responseMap["rez_avatar"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath); | 605 | responseMap["rez_avatar"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath); |
606 | responseMap["rez_avatar/rez"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath); | 606 | responseMap["rez_avatar/rez"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath); |