diff options
Diffstat (limited to '')
8 files changed, 32 insertions, 54 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 6a7272d..05fa331 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -336,8 +336,8 @@ namespace OpenSim | |||
336 | //regionInfo.originRegionID = regionInfo.RegionID; | 336 | //regionInfo.originRegionID = regionInfo.RegionID; |
337 | 337 | ||
338 | // set initial ServerURI | 338 | // set initial ServerURI |
339 | regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.InternalEndPoint.Port; | ||
340 | regionInfo.HttpPort = m_httpServerPort; | 339 | regionInfo.HttpPort = m_httpServerPort; |
340 | regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort.ToString() + "/"; | ||
341 | 341 | ||
342 | regionInfo.osSecret = m_osSecret; | 342 | regionInfo.osSecret = m_osSecret; |
343 | 343 | ||
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 6985449..7396c2d 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -648,7 +648,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
648 | IClientAPI client; | 648 | IClientAPI client; |
649 | if (!m_scene.TryGetClient(address, out client) || !(client is LLClientView)) | 649 | if (!m_scene.TryGetClient(address, out client) || !(client is LLClientView)) |
650 | { | 650 | { |
651 | //m_log.Debug("[LLUDPSERVER]: Received a " + packet.Type + " packet from an unrecognized source: " + address + " in " + m_scene.RegionInfo.RegionName); | 651 | m_log.Debug("[LLUDPSERVER]: Received a " + packet.Type + " packet from an unrecognized source: " + address + " in " + m_scene.RegionInfo.RegionName); |
652 | return; | 652 | return; |
653 | } | 653 | } |
654 | 654 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs index d8e0f96..80adc46 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs | |||
@@ -598,7 +598,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
598 | try | 598 | try |
599 | { | 599 | { |
600 | 600 | ||
601 | XmlRpcResponse GridResp = GridReq.Send("http://" + reginfo.ExternalHostName + ":" + reginfo.HttpPort, 3000); | 601 | XmlRpcResponse GridResp = GridReq.Send(reginfo.ServerURI, 3000); |
602 | 602 | ||
603 | Hashtable responseData = (Hashtable)GridResp.Value; | 603 | Hashtable responseData = (Hashtable)GridResp.Value; |
604 | 604 | ||
@@ -620,8 +620,8 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
620 | } | 620 | } |
621 | catch (WebException e) | 621 | catch (WebException e) |
622 | { | 622 | { |
623 | m_log.ErrorFormat("[GRID INSTANT MESSAGE]: Error sending message to http://{0}:{1} the host didn't respond ({2})", | 623 | m_log.ErrorFormat("[GRID INSTANT MESSAGE]: Error sending message to {0}} the host didn't respond ({2})", |
624 | reginfo.ExternalHostName, reginfo.HttpPort, e.Message); | 624 | reginfo.ServerURI, e.Message); |
625 | } | 625 | } |
626 | 626 | ||
627 | return false; | 627 | return false; |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index aa7a1cd..b5da625 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -197,9 +197,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
197 | sp.ControllingClient.SendTeleportFailed("Problem at destination"); | 197 | sp.ControllingClient.SendTeleportFailed("Problem at destination"); |
198 | return; | 198 | return; |
199 | } | 199 | } |
200 | 200 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Final destination is x={0} y={1} {2}@{3}", | |
201 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Final destination is x={0} y={1} uuid={2}", | 201 | finalDestination.RegionLocX / Constants.RegionSize, finalDestination.RegionLocY / Constants.RegionSize, finalDestination.RegionID, finalDestination.ServerURI); |
202 | finalDestination.RegionLocX / Constants.RegionSize, finalDestination.RegionLocY / Constants.RegionSize, finalDestination.RegionID); | ||
203 | 202 | ||
204 | // Check that these are not the same coordinates | 203 | // Check that these are not the same coordinates |
205 | if (finalDestination.RegionLocX == sp.Scene.RegionInfo.RegionLocX && | 204 | if (finalDestination.RegionLocX == sp.Scene.RegionInfo.RegionLocX && |
@@ -255,8 +254,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
255 | } | 254 | } |
256 | 255 | ||
257 | m_log.DebugFormat( | 256 | m_log.DebugFormat( |
258 | "[ENTITY TRANSFER MODULE]: Request Teleport to {0}:{1}:{2}/{3}", | 257 | "[ENTITY TRANSFER MODULE]: Request Teleport to {0} ({1}) {2}/{3}", |
259 | reg.ExternalHostName, reg.HttpPort, finalDestination.RegionName, position); | 258 | reg.ServerURI, finalDestination.ServerURI, finalDestination.RegionName, position); |
260 | 259 | ||
261 | uint newRegionX = (uint)(reg.RegionHandle >> 40); | 260 | uint newRegionX = (uint)(reg.RegionHandle >> 40); |
262 | uint newRegionY = (((uint)(reg.RegionHandle)) >> 8); | 261 | uint newRegionY = (((uint)(reg.RegionHandle)) >> 8); |
@@ -328,43 +327,21 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
328 | 327 | ||
329 | // OK, it got this agent. Let's close some child agents | 328 | // OK, it got this agent. Let's close some child agents |
330 | sp.CloseChildAgents(newRegionX, newRegionY); | 329 | sp.CloseChildAgents(newRegionX, newRegionY); |
331 | 330 | IClientIPEndpoint ipepClient; | |
332 | if (NeedsNewAgent(oldRegionX, newRegionX, oldRegionY, newRegionY)) | 331 | if (NeedsNewAgent(oldRegionX, newRegionX, oldRegionY, newRegionY)) |
333 | { | 332 | { |
334 | //sp.ControllingClient.SendTeleportProgress(teleportFlags, "Creating agent..."); | 333 | //sp.ControllingClient.SendTeleportProgress(teleportFlags, "Creating agent..."); |
335 | |||
336 | #region IP Translation for NAT | 334 | #region IP Translation for NAT |
337 | IClientIPEndpoint ipepClient; | 335 | // Uses ipepClient above |
338 | if (sp.ClientView.TryGet(out ipepClient)) | 336 | if (sp.ClientView.TryGet(out ipepClient)) |
339 | { | 337 | { |
340 | capsPath | 338 | endPoint.Address = NetworkUtil.GetIPFor(ipepClient.EndPoint, endPoint.Address); |
341 | = "http://" | ||
342 | + NetworkUtil.GetHostFor(ipepClient.EndPoint, finalDestination.ExternalHostName) | ||
343 | + ":" | ||
344 | + finalDestination.HttpPort | ||
345 | + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); | ||
346 | } | ||
347 | else | ||
348 | { | ||
349 | capsPath | ||
350 | = "http://" | ||
351 | + finalDestination.ExternalHostName | ||
352 | + ":" | ||
353 | + finalDestination.HttpPort | ||
354 | + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); | ||
355 | } | 339 | } |
356 | #endregion | 340 | #endregion |
341 | capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); | ||
357 | 342 | ||
358 | if (eq != null) | 343 | if (eq != null) |
359 | { | 344 | { |
360 | #region IP Translation for NAT | ||
361 | // Uses ipepClient above | ||
362 | if (sp.ClientView.TryGet(out ipepClient)) | ||
363 | { | ||
364 | endPoint.Address = NetworkUtil.GetIPFor(ipepClient.EndPoint, endPoint.Address); | ||
365 | } | ||
366 | #endregion | ||
367 | |||
368 | eq.EnableSimulator(destinationHandle, endPoint, sp.UUID); | 345 | eq.EnableSimulator(destinationHandle, endPoint, sp.UUID); |
369 | 346 | ||
370 | // ES makes the client send a UseCircuitCode message to the destination, | 347 | // ES makes the client send a UseCircuitCode message to the destination, |
@@ -383,8 +360,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
383 | else | 360 | else |
384 | { | 361 | { |
385 | agentCircuit.CapsPath = sp.Scene.CapsModule.GetChildSeed(sp.UUID, reg.RegionHandle); | 362 | agentCircuit.CapsPath = sp.Scene.CapsModule.GetChildSeed(sp.UUID, reg.RegionHandle); |
386 | capsPath = "http://" + finalDestination.ExternalHostName + ":" + finalDestination.HttpPort | 363 | capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); |
387 | + "/CAPS/" + agentCircuit.CapsPath + "0000/"; | ||
388 | } | 364 | } |
389 | 365 | ||
390 | // Expect avatar crossing is a heavy-duty function at the destination. | 366 | // Expect avatar crossing is a heavy-duty function at the destination. |
@@ -518,8 +494,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
518 | 494 | ||
519 | protected virtual void SetCallbackURL(AgentData agent, RegionInfo region) | 495 | protected virtual void SetCallbackURL(AgentData agent, RegionInfo region) |
520 | { | 496 | { |
521 | agent.CallbackURI = "http://" + region.ExternalHostName + ":" + region.HttpPort + | 497 | agent.CallbackURI = region.ServerURI + "agent/" + agent.AgentID.ToString() + "/" + region.RegionID.ToString() + "/release/"; |
522 | "/agent/" + agent.AgentID.ToString() + "/" + region.RegionID.ToString() + "/release/"; | 498 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Set callback URL to {0}", agent.CallbackURI); |
523 | 499 | ||
524 | } | 500 | } |
525 | 501 | ||
@@ -863,8 +839,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
863 | cAgent.Position = pos; | 839 | cAgent.Position = pos; |
864 | if (isFlying) | 840 | if (isFlying) |
865 | cAgent.ControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY; | 841 | cAgent.ControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY; |
866 | cAgent.CallbackURI = "http://" + m_scene.RegionInfo.ExternalHostName + ":" + m_scene.RegionInfo.HttpPort + | 842 | cAgent.CallbackURI = m_scene.RegionInfo.ServerURI + |
867 | "/agent/" + agent.UUID.ToString() + "/" + m_scene.RegionInfo.RegionID.ToString() + "/release/"; | 843 | "agent/" + agent.UUID.ToString() + "/" + m_scene.RegionInfo.RegionID.ToString() + "/release/"; |
868 | 844 | ||
869 | if (!m_scene.SimulationService.UpdateAgent(neighbourRegion, cAgent)) | 845 | if (!m_scene.SimulationService.UpdateAgent(neighbourRegion, cAgent)) |
870 | { | 846 | { |
@@ -889,10 +865,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
889 | neighbourRegion.RegionHandle); | 865 | neighbourRegion.RegionHandle); |
890 | return agent; | 866 | return agent; |
891 | } | 867 | } |
892 | // TODO Should construct this behind a method | 868 | string capsPath = neighbourRegion.ServerURI + CapsUtil.GetCapsSeedPath(agentcaps); |
893 | string capsPath = | ||
894 | "http://" + neighbourRegion.ExternalHostName + ":" + neighbourRegion.HttpPort | ||
895 | + "/CAPS/" + agentcaps /*circuitdata.CapsPath*/ + "0000/"; | ||
896 | 869 | ||
897 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} to client {1}", capsPath, agent.UUID); | 870 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} to client {1}", capsPath, agent.UUID); |
898 | 871 | ||
@@ -1222,8 +1195,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1222 | y = y / Constants.RegionSize; | 1195 | y = y / Constants.RegionSize; |
1223 | m_log.Debug("[ENTITY TRANSFER MODULE]: Starting to inform client about neighbour " + x + ", " + y + "(" + endPoint.ToString() + ")"); | 1196 | m_log.Debug("[ENTITY TRANSFER MODULE]: Starting to inform client about neighbour " + x + ", " + y + "(" + endPoint.ToString() + ")"); |
1224 | 1197 | ||
1225 | string capsPath = "http://" + reg.ExternalHostName + ":" + reg.HttpPort | 1198 | string capsPath = reg.ServerURI + CapsUtil.GetCapsSeedPath(a.CapsPath); |
1226 | + "/CAPS/" + a.CapsPath + "0000/"; | ||
1227 | 1199 | ||
1228 | string reason = String.Empty; | 1200 | string reason = String.Empty; |
1229 | 1201 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 47898cc..c75bc0a 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -123,7 +123,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
123 | if ((flags & (int)OpenSim.Data.RegionFlags.Hyperlink) != 0) | 123 | if ((flags & (int)OpenSim.Data.RegionFlags.Hyperlink) != 0) |
124 | { | 124 | { |
125 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Destination region {0} is hyperlink", region.RegionID); | 125 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Destination region {0} is hyperlink", region.RegionID); |
126 | return m_GatekeeperConnector.GetHyperlinkRegion(region, region.RegionID); | 126 | GridRegion real_destination = m_GatekeeperConnector.GetHyperlinkRegion(region, region.RegionID); |
127 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: GetFinalDestination serveruri -> {0}", real_destination.ServerURI); | ||
128 | return real_destination; | ||
127 | } | 129 | } |
128 | return region; | 130 | return region; |
129 | } | 131 | } |
@@ -149,6 +151,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
149 | 151 | ||
150 | protected override bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason, out bool logout) | 152 | protected override bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason, out bool logout) |
151 | { | 153 | { |
154 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: CreateAgent {0} {1}", reg.ServerURI, finalDestination.ServerURI); | ||
152 | reason = string.Empty; | 155 | reason = string.Empty; |
153 | logout = false; | 156 | logout = false; |
154 | int flags = m_aScene.GridService.GetRegionFlags(m_aScene.RegionInfo.ScopeID, reg.RegionID); | 157 | int flags = m_aScene.GridService.GetRegionFlags(m_aScene.RegionInfo.ScopeID, reg.RegionID); |
@@ -240,7 +243,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
240 | string url = aCircuit.ServiceURLs["HomeURI"].ToString(); | 243 | string url = aCircuit.ServiceURLs["HomeURI"].ToString(); |
241 | IUserAgentService security = new UserAgentServiceConnector(url); | 244 | IUserAgentService security = new UserAgentServiceConnector(url); |
242 | return security.VerifyClient(aCircuit.SessionID, token); | 245 | return security.VerifyClient(aCircuit.SessionID, token); |
243 | } | 246 | } |
247 | else | ||
248 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Agent {0} {1} does not have a HomeURI OH NO!", aCircuit.firstname, aCircuit.lastname); | ||
244 | 249 | ||
245 | return false; | 250 | return false; |
246 | } | 251 | } |
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); |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index 3e478b0..9869f4a 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: http://" + m_scene.RegionInfo.ExternalEndPoint.Address.ToString() + ":" + m_scene.RegionInfo.HttpPort.ToString() + "/index.php?method=" + regionimage); | 150 | m_log.Info("[WORLD MAP]: JPEG Map location: " + m_scene.RegionInfo.ServerURI + "/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( |
@@ -579,7 +579,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
579 | 579 | ||
580 | if (mreg != null) | 580 | if (mreg != null) |
581 | { | 581 | { |
582 | httpserver = "http://" + mreg.ExternalEndPoint.Address.ToString() + ":" + mreg.HttpPort + "/MAP/MapItems/" + regionhandle.ToString(); | 582 | httpserver = mreg.ServerURI + "MAP/MapItems/" + regionhandle.ToString(); |
583 | lock (m_cachedRegionMapItemsAddress) | 583 | lock (m_cachedRegionMapItemsAddress) |
584 | { | 584 | { |
585 | if (!m_cachedRegionMapItemsAddress.ContainsKey(regionhandle)) | 585 | if (!m_cachedRegionMapItemsAddress.ContainsKey(regionhandle)) |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 792115a..e48b92b 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3826,6 +3826,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3826 | } | 3826 | } |
3827 | 3827 | ||
3828 | ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID); | 3828 | ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID); |
3829 | |||
3829 | if (childAgentUpdate != null) | 3830 | if (childAgentUpdate != null) |
3830 | { | 3831 | { |
3831 | childAgentUpdate.ChildAgentDataUpdate(cAgentData); | 3832 | childAgentUpdate.ChildAgentDataUpdate(cAgentData); |