From d8a6eb5641f3b16811695ff34d925ae27de8fa38 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 24 Jul 2013 11:13:31 -0700 Subject: Decreased the time of group cache to 1 min, because it was getting on my nerves that it takes so long to let go of old info. --- OpenSim/Addons/Groups/RemoteConnectorCacheWrapper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Addons/Groups/RemoteConnectorCacheWrapper.cs b/OpenSim/Addons/Groups/RemoteConnectorCacheWrapper.cs index 79d6fc5..3ac74fc 100644 --- a/OpenSim/Addons/Groups/RemoteConnectorCacheWrapper.cs +++ b/OpenSim/Addons/Groups/RemoteConnectorCacheWrapper.cs @@ -53,7 +53,7 @@ namespace OpenSim.Groups private ForeignImporter m_ForeignImporter; private Dictionary m_ActiveRequests = new Dictionary(); - private const int GROUPS_CACHE_TIMEOUT = 5 * 60; // 5 minutes + private const int GROUPS_CACHE_TIMEOUT = 1 * 60; // 1 minutes // This all important cache cahces objects of different types: // group- or group- => ExtendedGroupRecord -- cgit v1.1 From e103e34f1d17d218c55ebb1ff19450c018cf73b2 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 24 Jul 2013 11:23:19 -0700 Subject: Added config var that we all thought was already there: see_into_region. (Note: different from the defunct see_into_neighboring_sim, which used to control the process from the other end). This enables child agents in neighbors for which the root agent doesn't have permission to be in. --- OpenSim/Region/Framework/Scenes/Scene.cs | 79 ++++++++++++++++++-------------- 1 file changed, 45 insertions(+), 34 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 9cfe869..e443c1d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -230,6 +230,8 @@ namespace OpenSim.Region.Framework.Scenes public int MaxUndoCount { get; set; } + public bool SeeIntoRegion { get; set; } + // Using this for RegionReady module to prevent LoginsDisabled from changing under our feet; public bool LoginLock = false; @@ -839,6 +841,8 @@ namespace OpenSim.Region.Framework.Scenes //Animation states m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false); + SeeIntoRegion = startupConfig.GetBoolean("see_into_region", true); + MaxUndoCount = startupConfig.GetInt("MaxPrimUndos", 20); PhysicalPrims = startupConfig.GetBoolean("physical_prim", PhysicalPrims); @@ -4010,51 +4014,58 @@ namespace OpenSim.Region.Framework.Scenes m_log.ErrorFormat("[CONNECTION BEGIN]: Estate Settings is null!"); } - List agentGroups = new List(); - - if (m_groupsModule != null) + // We only test the things below when we want to cut off + // child agents from being present in the scene for which their root + // agent isn't allowed. Otherwise, we allow child agents. The test for + // the root is done elsewhere (QueryAccess) + if (!SeeIntoRegion) { - GroupMembershipData[] GroupMembership = m_groupsModule.GetMembershipData(agent.AgentID); + List agentGroups = new List(); - if (GroupMembership != null) - { - for (int i = 0; i < GroupMembership.Length; i++) - agentGroups.Add(GroupMembership[i].GroupID); - } - else + if (m_groupsModule != null) { - m_log.ErrorFormat("[CONNECTION BEGIN]: GroupMembership is null!"); + GroupMembershipData[] GroupMembership = m_groupsModule.GetMembershipData(agent.AgentID); + + if (GroupMembership != null) + { + for (int i = 0; i < GroupMembership.Length; i++) + agentGroups.Add(GroupMembership[i].GroupID); + } + else + { + m_log.ErrorFormat("[CONNECTION BEGIN]: GroupMembership is null!"); + } } - } - bool groupAccess = false; - UUID[] estateGroups = RegionInfo.EstateSettings.EstateGroups; + bool groupAccess = false; + UUID[] estateGroups = RegionInfo.EstateSettings.EstateGroups; - if (estateGroups != null) - { - foreach (UUID group in estateGroups) + if (estateGroups != null) { - if (agentGroups.Contains(group)) + foreach (UUID group in estateGroups) { - groupAccess = true; - break; + if (agentGroups.Contains(group)) + { + groupAccess = true; + break; + } } } - } - else - { - m_log.ErrorFormat("[CONNECTION BEGIN]: EstateGroups is null!"); - } + else + { + m_log.ErrorFormat("[CONNECTION BEGIN]: EstateGroups is null!"); + } - if (!RegionInfo.EstateSettings.PublicAccess && - !RegionInfo.EstateSettings.HasAccess(agent.AgentID) && - !groupAccess) - { - m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the estate", - agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName); - reason = String.Format("Denied access to private region {0}: You are not on the access list for that region.", - RegionInfo.RegionName); - return false; + if (!RegionInfo.EstateSettings.PublicAccess && + !RegionInfo.EstateSettings.HasAccess(agent.AgentID) && + !groupAccess) + { + m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the estate", + agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName); + reason = String.Format("Denied access to private region {0}: You are not on the access list for that region.", + RegionInfo.RegionName); + return false; + } } // TODO: estate/region settings are not properly hooked up -- cgit v1.1 From 00d4a26eefafbe078af78458c9ca58931e29ecb9 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 24 Jul 2013 11:42:35 -0700 Subject: Amend previous commit. --- OpenSim/Region/Framework/Scenes/Scene.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index e443c1d..f766140 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3739,7 +3739,7 @@ namespace OpenSim.Region.Framework.Scenes try { - if (!AuthorizeUser(agent, out reason)) + if (!AuthorizeUser(agent, SeeIntoRegion, out reason)) { m_authenticateHandler.RemoveCircuit(agent.circuitcode); return false; @@ -3979,7 +3979,7 @@ namespace OpenSim.Region.Framework.Scenes /// outputs the reason to this string /// True if the region accepts this agent. False if it does not. False will /// also return a reason. - protected virtual bool AuthorizeUser(AgentCircuitData agent, out string reason) + protected virtual bool AuthorizeUser(AgentCircuitData agent, bool bypassAccessControl, out string reason) { reason = String.Empty; @@ -4018,7 +4018,7 @@ namespace OpenSim.Region.Framework.Scenes // child agents from being present in the scene for which their root // agent isn't allowed. Otherwise, we allow child agents. The test for // the root is done elsewhere (QueryAccess) - if (!SeeIntoRegion) + if (!bypassAccessControl) { List agentGroups = new List(); @@ -5588,7 +5588,7 @@ namespace OpenSim.Region.Framework.Scenes try { - if (!AuthorizeUser(aCircuit, out reason)) + if (!AuthorizeUser(aCircuit, false, out reason)) { // m_log.DebugFormat("[SCENE]: Denying access for {0}", agentID); return false; -- cgit v1.1 From 9ab78d412cdb61b3d5c4727002c3a8eb7f6abb7f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 21 Jul 2013 17:38:01 -0700 Subject: EXPERIMENTAL: yet another variation of ES/EAC/TPFinish --- .../EntityTransfer/EntityTransferModule.cs | 78 +++++++++++----------- 1 file changed, 39 insertions(+), 39 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 344c8d7..3e7575b 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -744,30 +744,30 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer #endregion capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); - if (m_eqModule != null) - { - // The EnableSimulator message makes the client establish a connection with the destination - // simulator by sending the initial UseCircuitCode UDP packet to the destination containing the - // correct circuit code. - m_eqModule.EnableSimulator(destinationHandle, endPoint, sp.UUID); - - // XXX: Is this wait necessary? We will always end up waiting on UpdateAgent for the destination - // simulator to confirm that it has established communication with the viewer. - Thread.Sleep(200); - - // At least on LL 3.3.4 for teleports between different regions on the same simulator this appears - // unnecessary - teleport will succeed and SEED caps will be requested without it (though possibly - // only on TeleportFinish). This is untested for region teleport between different simulators - // though this probably also works. - m_eqModule.EstablishAgentCommunication(sp.UUID, endPoint, capsPath); - } - else - { - // XXX: This is a little misleading since we're information the client of its avatar destination, - // which may or may not be a neighbour region of the source region. This path is probably little - // used anyway (with EQ being the one used). But it is currently being used for test code. - sp.ControllingClient.InformClientOfNeighbour(destinationHandle, endPoint); - } + //if (m_eqModule != null) + //{ + // // The EnableSimulator message makes the client establish a connection with the destination + // // simulator by sending the initial UseCircuitCode UDP packet to the destination containing the + // // correct circuit code. + // m_eqModule.EnableSimulator(destinationHandle, endPoint, sp.UUID); + + // // XXX: Is this wait necessary? We will always end up waiting on UpdateAgent for the destination + // // simulator to confirm that it has established communication with the viewer. + // Thread.Sleep(200); + + // // At least on LL 3.3.4 for teleports between different regions on the same simulator this appears + // // unnecessary - teleport will succeed and SEED caps will be requested without it (though possibly + // // only on TeleportFinish). This is untested for region teleport between different simulators + // // though this probably also works. + // m_eqModule.EstablishAgentCommunication(sp.UUID, endPoint, capsPath); + //} + //else + //{ + // // XXX: This is a little misleading since we're information the client of its avatar destination, + // // which may or may not be a neighbour region of the source region. This path is probably little + // // used anyway (with EQ being the one used). But it is currently being used for test code. + // sp.ControllingClient.InformClientOfNeighbour(destinationHandle, endPoint); + //} } else { @@ -796,6 +796,21 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer return; } + // We need to set this here to avoid an unlikely race condition when teleporting to a neighbour simulator, + // where that neighbour simulator could otherwise request a child agent create on the source which then + // closes our existing agent which is still signalled as root. + sp.IsChildAgent = true; + + if (m_eqModule != null) + { + m_eqModule.TeleportFinishEvent(destinationHandle, 13, endPoint, 0, teleportFlags, capsPath, sp.UUID); + } + else + { + sp.ControllingClient.SendRegionTeleport(destinationHandle, 13, endPoint, 4, + teleportFlags, capsPath); + } + // A common teleport failure occurs when we can send CreateAgent to the // destination region but the viewer cannot establish the connection (e.g. due to network issues between // the viewer and the destination). In this case, UpdateAgent timesout after 10 seconds, although then @@ -838,21 +853,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer "[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} from {1} to {2}", capsPath, sp.Scene.RegionInfo.RegionName, sp.Name); - // We need to set this here to avoid an unlikely race condition when teleporting to a neighbour simulator, - // where that neighbour simulator could otherwise request a child agent create on the source which then - // closes our existing agent which is still signalled as root. - sp.IsChildAgent = true; - - if (m_eqModule != null) - { - m_eqModule.TeleportFinishEvent(destinationHandle, 13, endPoint, 0, teleportFlags, capsPath, sp.UUID); - } - else - { - sp.ControllingClient.SendRegionTeleport(destinationHandle, 13, endPoint, 4, - teleportFlags, capsPath); - } - // TeleportFinish makes the client send CompleteMovementIntoRegion (at the destination), which // trigers a whole shebang of things there, including MakeRoot. So let's wait for confirmation // that the client contacted the destination before we close things here. -- cgit v1.1 From aae29c0ee2467a7978df53dba6f8461d1f566c59 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 21 Jul 2013 20:22:13 -0700 Subject: Further tweaks on TPs: not sending the callback URL and instead waiting 15sec before closing the agent. This seems to be working fairly well. The viewer seems to have an 8 sec delay between UseCircuitCode and CompleteMovement. Also added back the position on UpdateAgent, because it's needed for TPing between neighboring regions. --- .../EntityTransfer/EntityTransferModule.cs | 59 ++++++++++++---------- .../Presence/PresenceDetector.cs | 2 +- OpenSim/Region/Framework/Scenes/Scene.cs | 2 +- 3 files changed, 35 insertions(+), 28 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 3e7575b..5124aed 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -684,6 +684,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer agentCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath(); } + //sp.ControllingClient.SendTeleportProgress(teleportFlags, "Contacting destination..."); + // Let's create an agent there if one doesn't exist yet. // NOTE: logout will always be false for a non-HG teleport. bool logout = false; @@ -724,8 +726,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // Past this point we have to attempt clean up if the teleport fails, so update transfer state. m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring); - // OK, it got this agent. Let's close some child agents - sp.CloseChildAgents(newRegionX, newRegionY); + #region old protocol IClientIPEndpoint ipepClient; if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY)) @@ -775,11 +776,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); } + #endregion old protocol + // Let's send a full update of the agent. This is a synchronous call. AgentData agent = new AgentData(); sp.CopyTo(agent); agent.Position = position; - SetCallbackURL(agent, sp.Scene.RegionInfo); + //SetCallbackURL(agent, sp.Scene.RegionInfo); //sp.ControllingClient.SendTeleportProgress(teleportFlags, "Updating agent..."); @@ -801,6 +804,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // closes our existing agent which is still signalled as root. sp.IsChildAgent = true; + // New protocol: send TP Finish directly, without prior ES or EAC. That's what happens in the Linden grid if (m_eqModule != null) { m_eqModule.TeleportFinishEvent(destinationHandle, 13, endPoint, 0, teleportFlags, capsPath, sp.UUID); @@ -853,30 +857,30 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer "[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} from {1} to {2}", capsPath, sp.Scene.RegionInfo.RegionName, sp.Name); - // TeleportFinish makes the client send CompleteMovementIntoRegion (at the destination), which - // trigers a whole shebang of things there, including MakeRoot. So let's wait for confirmation - // that the client contacted the destination before we close things here. - if (!m_entityTransferStateMachine.WaitForAgentArrivedAtDestination(sp.UUID)) - { - if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Aborting) - { - m_interRegionTeleportAborts.Value++; - - m_log.DebugFormat( - "[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} after WaitForAgentArrivedAtDestination due to previous client close.", - sp.Name, finalDestination.RegionName, sp.Scene.Name); - - return; - } - - m_log.WarnFormat( - "[ENTITY TRANSFER MODULE]: Teleport of {0} to {1} from {2} failed due to no callback from destination region. Returning avatar to source region.", - sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); + //// TeleportFinish makes the client send CompleteMovementIntoRegion (at the destination), which + //// trigers a whole shebang of things there, including MakeRoot. So let's wait for confirmation + //// that the client contacted the destination before we close things here. + //if (!m_entityTransferStateMachine.WaitForAgentArrivedAtDestination(sp.UUID)) + //{ + // if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Aborting) + // { + // m_interRegionTeleportAborts.Value++; + + // m_log.DebugFormat( + // "[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} after WaitForAgentArrivedAtDestination due to previous client close.", + // sp.Name, finalDestination.RegionName, sp.Scene.Name); + + // return; + // } + + // m_log.WarnFormat( + // "[ENTITY TRANSFER MODULE]: Teleport of {0} to {1} from {2} failed due to no callback from destination region. Returning avatar to source region.", + // sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); - Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Destination region did not signal teleport completion."); + // Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Destination region did not signal teleport completion."); - return; - } + // return; + //} m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); @@ -897,6 +901,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // Now let's make it officially a child agent sp.MakeChildAgent(); + // OK, it got this agent. Let's close some child agents + sp.CloseChildAgents(newRegionX, newRegionY); + // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) @@ -907,7 +914,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // // This sleep can be increased if necessary. However, whilst it's active, // an agent cannot teleport back to this region if it has teleported away. - Thread.Sleep(2000); + Thread.Sleep(15000); sp.Scene.IncomingCloseAgent(sp.UUID, false); } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs index 172bea1..516ad40 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs @@ -79,7 +79,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence public void OnConnectionClose(IClientAPI client) { - if (!client.SceneAgent.IsChildAgent) + if (client != null && client.SceneAgent != null && !client.SceneAgent.IsChildAgent) { // m_log.DebugFormat("[PRESENCE DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName); m_PresenceService.LogoutAgent(client.SessionId); diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index f766140..d4ef3d9 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4269,7 +4269,7 @@ namespace OpenSim.Region.Framework.Scenes /// protected virtual ScenePresence WaitGetScenePresence(UUID agentID) { - int ntimes = 10; + int ntimes = 20; ScenePresence sp = null; while ((sp = GetScenePresence(agentID)) == null && (ntimes-- > 0)) Thread.Sleep(1000); -- cgit v1.1 From 3891a8946bb72c9256d8de4185bf4a72c90be859 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 22 Jul 2013 11:54:35 -0700 Subject: New Teleport protocol (V2), still compatible with V1 and older. (version of the destination is being checked) In this new protocol, and as committed before, the viewer is not sent EnableSimulator/EstablishChildCommunication for the destination. Instead, it is sent TeleportFinish directly. TeleportFinish, in turn, makes the viewer send a UserCircuitCode packet followed by CompleteMovementIntoRegion packet. These 2 packets tend to occur one after the other almost immediately to the point that when CMIR arrives the client is not even connected yet and that packet is ignored (there might have been some race conditions here before); then the viewer sends CMIR again within 5-8 secs. But the delay between them may be higher in busier regions, which may lead to race conditions. This commit improves the process so there are are no race conditions at the destination. CompleteMovement (triggered by the viewer) waits until Update has been sent from the origin. Update, in turn, waits until there is a *root* scene presence -- so making sure CompleteMovement has run MakeRoot. In other words, there are two threadlets at the destination, one from the viewer and one from the origin region, waiting for each other to do the right thing. That makes it safe to close the agent at the origin upon return of the Update call without having to wait for callback, because we are absolutely sure that the viewer knows it is in th new region. Note also that in the V1 protocol, the destination was getting UseCircuitCode from the viewer twice -- once on EstablishAgentCommunication and then again on TeleportFinish. The second UCC was being ignored, but it shows how we were not following the expected steps... --- OpenSim/Framework/ChildAgentDataUpdate.cs | 11 +- .../Region/ClientStack/Linden/UDP/LLUDPServer.cs | 68 ++++++ .../EntityTransfer/EntityTransferModule.cs | 263 +++++++++++++++------ .../Simulation/LocalSimulationConnector.cs | 2 +- OpenSim/Region/Framework/Scenes/Scene.cs | 18 +- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 33 ++- 6 files changed, 316 insertions(+), 79 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs index 9fc048b..1c5f558 100644 --- a/OpenSim/Framework/ChildAgentDataUpdate.cs +++ b/OpenSim/Framework/ChildAgentDataUpdate.cs @@ -287,7 +287,7 @@ namespace OpenSim.Framework public Vector3 AtAxis; public Vector3 LeftAxis; public Vector3 UpAxis; - public bool ChangedGrid; + public bool SenderWantsToWaitForRoot; public float Far; public float Aspect; @@ -356,8 +356,9 @@ namespace OpenSim.Framework args["left_axis"] = OSD.FromString(LeftAxis.ToString()); args["up_axis"] = OSD.FromString(UpAxis.ToString()); - - args["changed_grid"] = OSD.FromBoolean(ChangedGrid); + //backwards compatibility + args["changed_grid"] = OSD.FromBoolean(SenderWantsToWaitForRoot); + args["wait_for_root"] = OSD.FromBoolean(SenderWantsToWaitForRoot); args["far"] = OSD.FromReal(Far); args["aspect"] = OSD.FromReal(Aspect); @@ -526,8 +527,8 @@ namespace OpenSim.Framework if (args["up_axis"] != null) Vector3.TryParse(args["up_axis"].AsString(), out AtAxis); - if (args["changed_grid"] != null) - ChangedGrid = args["changed_grid"].AsBoolean(); + if (args.ContainsKey("wait_for_root") && args["wait_for_root"] != null) + SenderWantsToWaitForRoot = args["wait_for_root"].AsBoolean(); if (args["far"] != null) Far = (float)(args["far"].AsReal()); diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 37fd252..1b72b26 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -1257,6 +1257,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // UseCircuitCode handling if (packet.Type == PacketType.UseCircuitCode) { + m_log.DebugFormat("[ZZZ]: In the dungeon: UseCircuitCode"); // We need to copy the endpoint so that it doesn't get changed when another thread reuses the // buffer. object[] array = new object[] { new IPEndPoint(endPoint.Address, endPoint.Port), packet }; @@ -1265,6 +1266,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP return; } + else if (packet.Type == PacketType.CompleteAgentMovement) + { + // Send ack straight away to let the viewer know that we got it. + SendAckImmediate(endPoint, packet.Header.Sequence); + + m_log.DebugFormat("[ZZZ]: In the dungeon: CompleteAgentMovement"); + // We need to copy the endpoint so that it doesn't get changed when another thread reuses the + // buffer. + object[] array = new object[] { new IPEndPoint(endPoint.Address, endPoint.Port), packet }; + + Util.FireAndForget(HandleCompleteMovementIntoRegion, array); + + return; + } // Determine which agent this packet came from IClientAPI client; @@ -1604,6 +1619,56 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } + private void HandleCompleteMovementIntoRegion(object o) + { + IPEndPoint endPoint = null; + IClientAPI client = null; + + try + { + object[] array = (object[])o; + endPoint = (IPEndPoint)array[0]; + CompleteAgentMovementPacket packet = (CompleteAgentMovementPacket)array[1]; + + // Determine which agent this packet came from + int count = 10; + while (!m_scene.TryGetClient(endPoint, out client) && count-- > 0) + { + m_log.Debug("[LLUDPSERVER]: Received a CompleteMovementIntoRegion in " + m_scene.RegionInfo.RegionName + " (not ready yet)"); + Thread.Sleep(200); + } + + if (client == null) + return; + + IncomingPacket incomingPacket1; + + // Inbox insertion + if (UsePools) + { + incomingPacket1 = m_incomingPacketPool.GetObject(); + incomingPacket1.Client = (LLClientView)client; + incomingPacket1.Packet = packet; + } + else + { + incomingPacket1 = new IncomingPacket((LLClientView)client, packet); + } + + packetInbox.Enqueue(incomingPacket1); + } + catch (Exception e) + { + m_log.ErrorFormat( + "[LLUDPSERVER]: CompleteMovementIntoRegion handling from endpoint {0}, client {1} {2} failed. Exception {3}{4}", + endPoint != null ? endPoint.ToString() : "n/a", + client != null ? client.Name : "unknown", + client != null ? client.AgentId.ToString() : "unknown", + e.Message, + e.StackTrace); + } + } + /// /// Send an ack immediately to the given endpoint. /// @@ -1999,6 +2064,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP Packet packet = incomingPacket.Packet; LLClientView client = incomingPacket.Client; + if (packet is CompleteAgentMovementPacket) + m_log.DebugFormat("[ZZZ]: Received CompleteAgentMovementPacket"); + if (client.IsActive) { m_currentIncomingClient = client; diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 5124aed..b0c0b1d 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -684,7 +684,18 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer agentCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath(); } - //sp.ControllingClient.SendTeleportProgress(teleportFlags, "Contacting destination..."); + if (version.Equals("SIMULATION/0.2")) + TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason); + else + TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason); + + } + + private void TransferAgent_V1(ScenePresence sp, AgentCircuitData agentCircuit, GridRegion reg, GridRegion finalDestination, + IPEndPoint endPoint, uint teleportFlags, uint oldRegionX, uint newRegionX, uint oldRegionY, uint newRegionY, string version, out string reason) + { + ulong destinationHandle = finalDestination.RegionHandle; + AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode); // Let's create an agent there if one doesn't exist yet. // NOTE: logout will always be false for a non-HG teleport. @@ -707,7 +718,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer m_interRegionTeleportCancels.Value++; m_log.DebugFormat( - "[ENTITY TRANSFER MODULE]: Cancelled teleport of {0} to {1} from {2} after CreateAgent on client request", + "[ENTITY TRANSFER MODULE]: Cancelled teleport of {0} to {1} from {2} after CreateAgent on client request", sp.Name, finalDestination.RegionName, sp.Scene.Name); return; @@ -725,14 +736,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // Past this point we have to attempt clean up if the teleport fails, so update transfer state. m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring); - - #region old protocol - - IClientIPEndpoint ipepClient; + + IClientIPEndpoint ipepClient; + string capsPath = String.Empty; if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY)) { m_log.DebugFormat( - "[ENTITY TRANSFER MODULE]: Determined that region {0} at {1},{2} needs new child agent for incoming agent {3} from {4}", + "[ENTITY TRANSFER MODULE]: Determined that region {0} at {1},{2} needs new child agent for incoming agent {3} from {4}", finalDestination.RegionName, newRegionX, newRegionY, sp.Name, Scene.Name); //sp.ControllingClient.SendTeleportProgress(teleportFlags, "Creating agent..."); @@ -745,30 +755,30 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer #endregion capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); - //if (m_eqModule != null) - //{ - // // The EnableSimulator message makes the client establish a connection with the destination - // // simulator by sending the initial UseCircuitCode UDP packet to the destination containing the - // // correct circuit code. - // m_eqModule.EnableSimulator(destinationHandle, endPoint, sp.UUID); - - // // XXX: Is this wait necessary? We will always end up waiting on UpdateAgent for the destination - // // simulator to confirm that it has established communication with the viewer. - // Thread.Sleep(200); - - // // At least on LL 3.3.4 for teleports between different regions on the same simulator this appears - // // unnecessary - teleport will succeed and SEED caps will be requested without it (though possibly - // // only on TeleportFinish). This is untested for region teleport between different simulators - // // though this probably also works. - // m_eqModule.EstablishAgentCommunication(sp.UUID, endPoint, capsPath); - //} - //else - //{ - // // XXX: This is a little misleading since we're information the client of its avatar destination, - // // which may or may not be a neighbour region of the source region. This path is probably little - // // used anyway (with EQ being the one used). But it is currently being used for test code. - // sp.ControllingClient.InformClientOfNeighbour(destinationHandle, endPoint); - //} + if (m_eqModule != null) + { + // The EnableSimulator message makes the client establish a connection with the destination + // simulator by sending the initial UseCircuitCode UDP packet to the destination containing the + // correct circuit code. + m_eqModule.EnableSimulator(destinationHandle, endPoint, sp.UUID); + + // XXX: Is this wait necessary? We will always end up waiting on UpdateAgent for the destination + // simulator to confirm that it has established communication with the viewer. + Thread.Sleep(200); + + // At least on LL 3.3.4 for teleports between different regions on the same simulator this appears + // unnecessary - teleport will succeed and SEED caps will be requested without it (though possibly + // only on TeleportFinish). This is untested for region teleport between different simulators + // though this probably also works. + m_eqModule.EstablishAgentCommunication(sp.UUID, endPoint, capsPath); + } + else + { + // XXX: This is a little misleading since we're information the client of its avatar destination, + // which may or may not be a neighbour region of the source region. This path is probably little + // used anyway (with EQ being the one used). But it is currently being used for test code. + sp.ControllingClient.InformClientOfNeighbour(destinationHandle, endPoint); + } } else { @@ -776,15 +786,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); } - #endregion old protocol - // Let's send a full update of the agent. This is a synchronous call. AgentData agent = new AgentData(); sp.CopyTo(agent); - agent.Position = position; - //SetCallbackURL(agent, sp.Scene.RegionInfo); + agent.Position = agentCircuit.startpos; + SetCallbackURL(agent, sp.Scene.RegionInfo); - //sp.ControllingClient.SendTeleportProgress(teleportFlags, "Updating agent..."); // We will check for an abort before UpdateAgent since UpdateAgent will require an active viewer to // establish th econnection to the destination which makes it return true. @@ -814,7 +821,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer sp.ControllingClient.SendRegionTeleport(destinationHandle, 13, endPoint, 4, teleportFlags, capsPath); } - + // A common teleport failure occurs when we can send CreateAgent to the // destination region but the viewer cannot establish the connection (e.g. due to network issues between // the viewer and the destination). In this case, UpdateAgent timesout after 10 seconds, although then @@ -835,7 +842,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer m_log.WarnFormat( "[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1} from {2}. Keeping avatar in source region.", sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); - + Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Connection between viewer and destination region could not be established."); return; } @@ -845,7 +852,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer m_interRegionTeleportCancels.Value++; m_log.DebugFormat( - "[ENTITY TRANSFER MODULE]: Cancelled teleport of {0} to {1} from {2} after UpdateAgent on client request", + "[ENTITY TRANSFER MODULE]: Cancelled teleport of {0} to {1} from {2} after UpdateAgent on client request", sp.Name, finalDestination.RegionName, sp.Scene.Name); CleanupFailedInterRegionTeleport(sp, currentAgentCircuit.SessionID.ToString(), finalDestination); @@ -857,30 +864,30 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer "[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} from {1} to {2}", capsPath, sp.Scene.RegionInfo.RegionName, sp.Name); - //// TeleportFinish makes the client send CompleteMovementIntoRegion (at the destination), which - //// trigers a whole shebang of things there, including MakeRoot. So let's wait for confirmation - //// that the client contacted the destination before we close things here. - //if (!m_entityTransferStateMachine.WaitForAgentArrivedAtDestination(sp.UUID)) - //{ - // if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Aborting) - // { - // m_interRegionTeleportAborts.Value++; - - // m_log.DebugFormat( - // "[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} after WaitForAgentArrivedAtDestination due to previous client close.", - // sp.Name, finalDestination.RegionName, sp.Scene.Name); - - // return; - // } - - // m_log.WarnFormat( - // "[ENTITY TRANSFER MODULE]: Teleport of {0} to {1} from {2} failed due to no callback from destination region. Returning avatar to source region.", - // sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); - - // Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Destination region did not signal teleport completion."); + // TeleportFinish makes the client send CompleteMovementIntoRegion (at the destination), which + // trigers a whole shebang of things there, including MakeRoot. So let's wait for confirmation + // that the client contacted the destination before we close things here. + if (!m_entityTransferStateMachine.WaitForAgentArrivedAtDestination(sp.UUID)) + { + if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Aborting) + { + m_interRegionTeleportAborts.Value++; - // return; - //} + m_log.DebugFormat( + "[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} after WaitForAgentArrivedAtDestination due to previous client close.", + sp.Name, finalDestination.RegionName, sp.Scene.Name); + + return; + } + + m_log.WarnFormat( + "[ENTITY TRANSFER MODULE]: Teleport of {0} to {1} from {2} failed due to no callback from destination region. Returning avatar to source region.", + sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); + + Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Destination region did not signal teleport completion."); + + return; + } m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); @@ -914,7 +921,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // // This sleep can be increased if necessary. However, whilst it's active, // an agent cannot teleport back to this region if it has teleported away. - Thread.Sleep(15000); + Thread.Sleep(2000); sp.Scene.IncomingCloseAgent(sp.UUID, false); } @@ -925,6 +932,126 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer } } + private void TransferAgent_V2(ScenePresence sp, AgentCircuitData agentCircuit, GridRegion reg, GridRegion finalDestination, + IPEndPoint endPoint, uint teleportFlags, uint oldRegionX, uint newRegionX, uint oldRegionY, uint newRegionY, string version, out string reason) + { + ulong destinationHandle = finalDestination.RegionHandle; + AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode); + + // Let's create an agent there if one doesn't exist yet. + // NOTE: logout will always be false for a non-HG teleport. + bool logout = false; + if (!CreateAgent(sp, reg, finalDestination, agentCircuit, teleportFlags, out reason, out logout)) + { + m_interRegionTeleportFailures.Value++; + + sp.ControllingClient.SendTeleportFailed(String.Format("Teleport refused: {0}", reason)); + + m_log.DebugFormat( + "[ENTITY TRANSFER MODULE]: Teleport of {0} from {1} to {2} was refused because {3}", + sp.Name, sp.Scene.RegionInfo.RegionName, finalDestination.RegionName, reason); + + return; + } + + // Past this point we have to attempt clean up if the teleport fails, so update transfer state. + m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring); + + IClientIPEndpoint ipepClient; + string capsPath = String.Empty; + if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY)) + { + m_log.DebugFormat( + "[ENTITY TRANSFER MODULE]: Determined that region {0} at {1},{2} needs new child agent for agent {3} from {4}", + finalDestination.RegionName, newRegionX, newRegionY, sp.Name, Scene.Name); + + //sp.ControllingClient.SendTeleportProgress(teleportFlags, "Creating agent..."); + #region IP Translation for NAT + // Uses ipepClient above + if (sp.ClientView.TryGet(out ipepClient)) + { + endPoint.Address = NetworkUtil.GetIPFor(ipepClient.EndPoint, endPoint.Address); + } + #endregion + capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); + } + else + { + agentCircuit.CapsPath = sp.Scene.CapsModule.GetChildSeed(sp.UUID, reg.RegionHandle); + capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); + } + + // We need to set this here to avoid an unlikely race condition when teleporting to a neighbour simulator, + // where that neighbour simulator could otherwise request a child agent create on the source which then + // closes our existing agent which is still signalled as root. + //sp.IsChildAgent = true; + + // New protocol: send TP Finish directly, without prior ES or EAC. That's what happens in the Linden grid + if (m_eqModule != null) + m_eqModule.TeleportFinishEvent(destinationHandle, 13, endPoint, 0, teleportFlags, capsPath, sp.UUID); + else + sp.ControllingClient.SendRegionTeleport(destinationHandle, 13, endPoint, 4, + teleportFlags, capsPath); + + m_log.DebugFormat( + "[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} from {1} to {2}", + capsPath, sp.Scene.RegionInfo.RegionName, sp.Name); + + // Let's send a full update of the agent. + AgentData agent = new AgentData(); + sp.CopyTo(agent); + agent.Position = agentCircuit.startpos; + agent.SenderWantsToWaitForRoot = true; + //SetCallbackURL(agent, sp.Scene.RegionInfo); + + // Send the Update. If this returns true, we know the client has contacted the destination + // via CompleteMovementIntoRegion, so we can let go. + // If it returns false, something went wrong, and we need to abort. + m_log.DebugFormat("[ZZZ]: Sending Update"); + if (!UpdateAgent(reg, finalDestination, agent, sp)) + { + if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Aborting) + { + m_interRegionTeleportAborts.Value++; + + m_log.DebugFormat( + "[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} after UpdateAgent due to previous client close.", + sp.Name, finalDestination.RegionName, sp.Scene.Name); + + return; + } + + m_log.WarnFormat( + "[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1} from {2}. Keeping avatar in source region.", + sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); + + Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Connection between viewer and destination region could not be established."); + return; + } + + m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); + + // May need to logout or other cleanup + AgentHasMovedAway(sp, logout); + + // Well, this is it. The agent is over there. + KillEntity(sp.Scene, sp.LocalId); + + // Now let's make it officially a child agent + sp.MakeChildAgent(); + + // OK, it got this agent. Let's close some child agents + sp.CloseChildAgents(newRegionX, newRegionY); + + // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone + + if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) + sp.Scene.IncomingCloseAgent(sp.UUID, false); + else + // now we have a child agent in this region. + sp.Reset(); + } + /// /// Clean up an inter-region teleport that did not complete, either because of simulator failure or cancellation. /// @@ -938,11 +1065,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer { m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); - sp.IsChildAgent = false; - ReInstantiateScripts(sp); - - EnableChildAgents(sp); + if (sp.IsChildAgent) // We had set it to child before attempted TP (V1) + { + sp.IsChildAgent = false; + ReInstantiateScripts(sp); + EnableChildAgents(sp); + } // Finally, kill the agent we just created at the destination. // XXX: Possibly this should be done asynchronously. Scene.SimulationService.CloseAgent(finalDestination, sp.UUID, auth_token); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs index 6d5039b..7dd10f7 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs @@ -48,7 +48,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation /// /// Version of this service /// - private const string m_Version = "SIMULATION/0.1"; + private const string m_Version = "SIMULATION/0.2"; /// /// Map region ID to scene. diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index d4ef3d9..da8a1b8 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4221,6 +4221,20 @@ namespace OpenSim.Region.Framework.Scenes } childAgentUpdate.ChildAgentDataUpdate(cAgentData); + + int ntimes = 20; + if (cAgentData.SenderWantsToWaitForRoot) + { + while (childAgentUpdate.IsChildAgent && ntimes-- > 0) + Thread.Sleep(500); + + m_log.DebugFormat( + "[SCENE PRESENCE]: Found presence {0} {1} {2} in {3} after {4} waits", + childAgentUpdate.Name, childAgentUpdate.UUID, childAgentUpdate.IsChildAgent ? "child" : "root", RegionInfo.RegionName, 20 - ntimes); + + if (childAgentUpdate.IsChildAgent) + return false; + } return true; } return false; @@ -4278,10 +4292,6 @@ namespace OpenSim.Region.Framework.Scenes m_log.WarnFormat( "[SCENE PRESENCE]: Did not find presence with id {0} in {1} before timeout", agentID, RegionInfo.RegionName); -// else -// m_log.DebugFormat( -// "[SCENE PRESENCE]: Found presence {0} {1} {2} in {3} after {4} waits", -// sp.Name, sp.UUID, sp.IsChildAgent ? "child" : "root", RegionInfo.RegionName, 10 - ntimes); return sp; } diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 6433878..891e04e 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -29,7 +29,9 @@ using System; using System.Xml; using System.Collections.Generic; using System.Reflection; +using System.Threading; using System.Timers; +using Timer = System.Timers.Timer; using OpenMetaverse; using log4net; using Nini.Config; @@ -1311,6 +1313,26 @@ namespace OpenSim.Region.Framework.Scenes PhysicsActor.Size = new Vector3(0.45f, 0.6f, height); } + private bool WaitForUpdateAgent(IClientAPI client) + { + // Before UpdateAgent, m_originRegionID is UUID.Zero; after, it's non-Zero + int count = 20; + while (m_originRegionID.Equals(UUID.Zero) && count-- > 0) + { + m_log.DebugFormat("[SCENE PRESENCE]: Agent {0} waiting for update in {1}", client.Name, Scene.RegionInfo.RegionName); + Thread.Sleep(200); + } + + if (m_originRegionID.Equals(UUID.Zero)) + { + // Movement into region will fail + m_log.WarnFormat("[SCENE PRESENCE]: Update agent {0} never arrived", client.Name); + return false; + } + + return true; + } + /// /// Complete Avatar's movement into the region. /// @@ -1328,6 +1350,12 @@ namespace OpenSim.Region.Framework.Scenes "[SCENE PRESENCE]: Completing movement of {0} into region {1} in position {2}", client.Name, Scene.RegionInfo.RegionName, AbsolutePosition); + if (m_teleportFlags != TeleportFlags.ViaLogin) + // Let's wait until UpdateAgent (called by departing region) is done + if (!WaitForUpdateAgent(client)) + // The sending region never sent the UpdateAgent data, we have to refuse + return; + Vector3 look = Velocity; if ((look.X == 0) && (look.Y == 0) && (look.Z == 0)) @@ -1348,10 +1376,11 @@ namespace OpenSim.Region.Framework.Scenes bool flying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); MakeRootAgent(AbsolutePosition, flying); + + // Tell the client that we're totally ready ControllingClient.MoveAgentIntoRegion(m_scene.RegionInfo, AbsolutePosition, look); + // Remember in HandleUseCircuitCode, we delayed this to here - // This will also send the initial data to clients when TP to a neighboring region. - // Not ideal, but until we know we're TP-ing from a neighboring region, there's not much we can do if (m_teleportFlags > 0) SendInitialDataToMe(); -- cgit v1.1 From aaee63af8241f23c94bc97435a3b1d17425df890 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 22 Jul 2013 13:16:13 -0700 Subject: Minor improvements on TP V1 trying to make it exactly as it was before. --- .../EntityTransfer/EntityTransferModule.cs | 32 ++++++++++++---------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index b0c0b1d..4f11326 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -697,6 +697,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer ulong destinationHandle = finalDestination.RegionHandle; AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode); + m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Using TP V1"); // Let's create an agent there if one doesn't exist yet. // NOTE: logout will always be false for a non-HG teleport. bool logout = false; @@ -736,7 +737,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // Past this point we have to attempt clean up if the teleport fails, so update transfer state. m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring); - + + // OK, it got this agent. Let's close some child agents + sp.CloseChildAgents(newRegionX, newRegionY); + IClientIPEndpoint ipepClient; string capsPath = String.Empty; if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY)) @@ -811,17 +815,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // closes our existing agent which is still signalled as root. sp.IsChildAgent = true; - // New protocol: send TP Finish directly, without prior ES or EAC. That's what happens in the Linden grid - if (m_eqModule != null) - { - m_eqModule.TeleportFinishEvent(destinationHandle, 13, endPoint, 0, teleportFlags, capsPath, sp.UUID); - } - else - { - sp.ControllingClient.SendRegionTeleport(destinationHandle, 13, endPoint, 4, - teleportFlags, capsPath); - } - // A common teleport failure occurs when we can send CreateAgent to the // destination region but the viewer cannot establish the connection (e.g. due to network issues between // the viewer and the destination). In this case, UpdateAgent timesout after 10 seconds, although then @@ -847,6 +840,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer return; } + // OK, send TPFinish to the client, so that it starts the process of contacting the destination region + if (m_eqModule != null) + { + m_eqModule.TeleportFinishEvent(destinationHandle, 13, endPoint, 0, teleportFlags, capsPath, sp.UUID); + } + else + { + sp.ControllingClient.SendRegionTeleport(destinationHandle, 13, endPoint, 4, + teleportFlags, capsPath); + } + if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Cancelling) { m_interRegionTeleportCancels.Value++; @@ -908,9 +912,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // Now let's make it officially a child agent sp.MakeChildAgent(); - // OK, it got this agent. Let's close some child agents - sp.CloseChildAgents(newRegionX, newRegionY); - // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) @@ -1063,6 +1064,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer /// protected virtual void CleanupFailedInterRegionTeleport(ScenePresence sp, string auth_token, GridRegion finalDestination) { + m_log.DebugFormat("[ZZZ]: FAIL!"); m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); if (sp.IsChildAgent) // We had set it to child before attempted TP (V1) -- cgit v1.1 From d7984ef775d0854606dadd71eac77d5f487ab8df Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 22 Jul 2013 13:29:58 -0700 Subject: More on putting TP V1 as it was --- .../EntityTransfer/EntityTransferModule.cs | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 4f11326..22b577b 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -810,11 +810,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer return; } - // We need to set this here to avoid an unlikely race condition when teleporting to a neighbour simulator, - // where that neighbour simulator could otherwise request a child agent create on the source which then - // closes our existing agent which is still signalled as root. - sp.IsChildAgent = true; - // A common teleport failure occurs when we can send CreateAgent to the // destination region but the viewer cannot establish the connection (e.g. due to network issues between // the viewer and the destination). In this case, UpdateAgent timesout after 10 seconds, although then @@ -840,17 +835,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer return; } - // OK, send TPFinish to the client, so that it starts the process of contacting the destination region - if (m_eqModule != null) - { - m_eqModule.TeleportFinishEvent(destinationHandle, 13, endPoint, 0, teleportFlags, capsPath, sp.UUID); - } - else - { - sp.ControllingClient.SendRegionTeleport(destinationHandle, 13, endPoint, 4, - teleportFlags, capsPath); - } - if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Cancelling) { m_interRegionTeleportCancels.Value++; @@ -868,6 +852,22 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer "[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} from {1} to {2}", capsPath, sp.Scene.RegionInfo.RegionName, sp.Name); + // We need to set this here to avoid an unlikely race condition when teleporting to a neighbour simulator, + // where that neighbour simulator could otherwise request a child agent create on the source which then + // closes our existing agent which is still signalled as root. + sp.IsChildAgent = true; + + // OK, send TPFinish to the client, so that it starts the process of contacting the destination region + if (m_eqModule != null) + { + m_eqModule.TeleportFinishEvent(destinationHandle, 13, endPoint, 0, teleportFlags, capsPath, sp.UUID); + } + else + { + sp.ControllingClient.SendRegionTeleport(destinationHandle, 13, endPoint, 4, + teleportFlags, capsPath); + } + // TeleportFinish makes the client send CompleteMovementIntoRegion (at the destination), which // trigers a whole shebang of things there, including MakeRoot. So let's wait for confirmation // that the client contacted the destination before we close things here. -- cgit v1.1 From 261512606d77747701934e80e150bd55454571f2 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 22 Jul 2013 14:23:50 -0700 Subject: Improve the opening test in CompleteMovement, to account for multiple flags besides ViaLogin. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 891e04e..edd49eb 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1350,7 +1350,7 @@ namespace OpenSim.Region.Framework.Scenes "[SCENE PRESENCE]: Completing movement of {0} into region {1} in position {2}", client.Name, Scene.RegionInfo.RegionName, AbsolutePosition); - if (m_teleportFlags != TeleportFlags.ViaLogin) + if ((m_teleportFlags & TeleportFlags.ViaLogin) != 0) // Let's wait until UpdateAgent (called by departing region) is done if (!WaitForUpdateAgent(client)) // The sending region never sent the UpdateAgent data, we have to refuse -- cgit v1.1 From 879cbb45753bf3f3144512748acd8faf120fc626 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 22 Jul 2013 14:35:14 -0700 Subject: This commit message intentionally left blank (last commit was idiotic) --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index edd49eb..7f24174 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1350,7 +1350,8 @@ namespace OpenSim.Region.Framework.Scenes "[SCENE PRESENCE]: Completing movement of {0} into region {1} in position {2}", client.Name, Scene.RegionInfo.RegionName, AbsolutePosition); - if ((m_teleportFlags & TeleportFlags.ViaLogin) != 0) + // Make sure it's not a login agent. We don't want to wait for updates during login + if ((m_teleportFlags & TeleportFlags.ViaLogin) == 0) // Let's wait until UpdateAgent (called by departing region) is done if (!WaitForUpdateAgent(client)) // The sending region never sent the UpdateAgent data, we have to refuse -- cgit v1.1 From c0433d5e4c8170de10e16dd09d85bf620a1530ae Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 22 Jul 2013 18:46:51 -0700 Subject: Changed the RegionHandshake packet to the Unknown queue, so that it is sent with high priority and hopefully gets to the client before AgentMovementComplete --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 32549c8..8b2440a 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -811,7 +811,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP handshake.RegionInfo4[0].RegionFlagsExtended = args.regionFlags; handshake.RegionInfo4[0].RegionProtocols = 0; // 1 here would indicate that SSB is supported - OutPacket(handshake, ThrottleOutPacketType.Task); + OutPacket(handshake, ThrottleOutPacketType.Unknown); } -- cgit v1.1 From 14530b260764372df3627206c531b96b9d817dbe Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 22 Jul 2013 20:20:48 -0700 Subject: Minor adjustment on timings of waits. --- .../Region/ClientStack/Linden/UDP/LLUDPServer.cs | 23 ++++++++++++++++++---- OpenSim/Region/Framework/Scenes/Scene.cs | 4 ++-- 2 files changed, 21 insertions(+), 6 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 1b72b26..43167ee 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -1631,11 +1631,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP CompleteAgentMovementPacket packet = (CompleteAgentMovementPacket)array[1]; // Determine which agent this packet came from - int count = 10; - while (!m_scene.TryGetClient(endPoint, out client) && count-- > 0) + int count = 20; + bool ready = false; + while (!ready && count-- > 0) { - m_log.Debug("[LLUDPSERVER]: Received a CompleteMovementIntoRegion in " + m_scene.RegionInfo.RegionName + " (not ready yet)"); - Thread.Sleep(200); + if (m_scene.TryGetClient(endPoint, out client) && client.IsActive) + { + LLUDPClient udpClient = ((LLClientView)client).UDPClient; + if (udpClient != null && udpClient.IsConnected) + ready = true; + else + { + m_log.Debug("[LLUDPSERVER]: Received a CompleteMovementIntoRegion in " + m_scene.RegionInfo.RegionName + " (not ready yet)"); + Thread.Sleep(200); + } + } + else + { + m_log.Debug("[LLUDPSERVER]: Received a CompleteMovementIntoRegion in " + m_scene.RegionInfo.RegionName + " (not ready yet)"); + Thread.Sleep(200); + } } if (client == null) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index da8a1b8..84fdef0 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4226,10 +4226,10 @@ namespace OpenSim.Region.Framework.Scenes if (cAgentData.SenderWantsToWaitForRoot) { while (childAgentUpdate.IsChildAgent && ntimes-- > 0) - Thread.Sleep(500); + Thread.Sleep(1000); m_log.DebugFormat( - "[SCENE PRESENCE]: Found presence {0} {1} {2} in {3} after {4} waits", + "[SCENE]: Found presence {0} {1} {2} in {3} after {4} waits", childAgentUpdate.Name, childAgentUpdate.UUID, childAgentUpdate.IsChildAgent ? "child" : "root", RegionInfo.RegionName, 20 - ntimes); if (childAgentUpdate.IsChildAgent) -- cgit v1.1 From e6a0f6e428e32356eba14729766aac28cec9989f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 22 Jul 2013 20:49:40 -0700 Subject: One more thing to test in order to let CompleteMovement go up the stack. --- OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 43167ee..f40948f 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -1635,9 +1635,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP bool ready = false; while (!ready && count-- > 0) { - if (m_scene.TryGetClient(endPoint, out client) && client.IsActive) + if (m_scene.TryGetClient(endPoint, out client) && client.IsActive && client.SceneAgent != null) { - LLUDPClient udpClient = ((LLClientView)client).UDPClient; + LLClientView llClientView = (LLClientView)client; + LLUDPClient udpClient = llClientView.UDPClient; if (udpClient != null && udpClient.IsConnected) ready = true; else -- cgit v1.1 From 4e5c7bdeb3222edeff8fbf8c01ce0b5916473e46 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 22 Jul 2013 22:00:20 -0700 Subject: Moved TriggerOnMakeRootAgent back to the end of MakeRootAgent, to see if that eliminates the temporary placement at infinity upon TPs --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 7f24174..f9190d9 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1013,9 +1013,8 @@ namespace OpenSim.Region.Framework.Scenes // recorded, which stops the input from being processed. MovementFlag = 0; - // DIVA NOTE: I moved TriggerOnMakeRootAgent out of here and into the end of - // CompleteMovement. We don't want modules doing heavy computation before CompleteMovement - // is over. + m_scene.EventManager.TriggerOnMakeRootAgent(this); + } public int GetStateSource() @@ -1437,10 +1436,6 @@ namespace OpenSim.Region.Framework.Scenes // "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms", // client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds); - // DIVA NOTE: moved this here from MakeRoot. We don't want modules making heavy - // computations before CompleteMovement is over - m_scene.EventManager.TriggerOnMakeRootAgent(this); - } /// -- cgit v1.1 From 46d017b19745ccdd5948865de53375a814bf2659 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 24 Jul 2013 12:54:13 -0700 Subject: Today's wild shot at the infinity problem. Wait on the child agent left behind. --- .../CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 22b577b..29ba5f8 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -1047,7 +1047,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) + { + Thread.Sleep(5000); sp.Scene.IncomingCloseAgent(sp.UUID, false); + } else // now we have a child agent in this region. sp.Reset(); @@ -1064,7 +1067,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer /// protected virtual void CleanupFailedInterRegionTeleport(ScenePresence sp, string auth_token, GridRegion finalDestination) { - m_log.DebugFormat("[ZZZ]: FAIL!"); m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); if (sp.IsChildAgent) // We had set it to child before attempted TP (V1) -- cgit v1.1 From f0320f56520318d20e8aa250c441b72aa1f0019c Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 24 Jul 2013 14:22:59 -0700 Subject: The previous commit did fix the infinity problem! I'm putting the same time on TP_V1 and adding a big red warning on top of those lines. --- .../Framework/EntityTransfer/EntityTransferModule.cs | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 29ba5f8..1ea0fd7 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -916,13 +916,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) { - // We need to delay here because Imprudence viewers, unlike v1 or v3, have a short (<200ms, <500ms) delay before - // they regard the new region as the current region after receiving the AgentMovementComplete - // response. If close is sent before then, it will cause the viewer to quit instead. - // - // This sleep can be increased if necessary. However, whilst it's active, - // an agent cannot teleport back to this region if it has teleported away. - Thread.Sleep(2000); + // RED ALERT!!!! + // PLEASE DO NOT DECREASE THIS WAIT TIME UNDER ANY CIRCUMSTANCES. + // THE VIEWERS SEEM TO NEED SOME TIME AFTER RECEIVING MoveAgentIntoRegion + // BEFORE THEY SETTLE IN THE NEW REGION. + // DECREASING THE WAIT TIME HERE WILL EITHER RESULT IN A VIEWER CRASH OR + // IN THE AVIE BEING PLACED IN INFINITY FOR A COUPLE OF SECONDS. + Thread.Sleep(5000); sp.Scene.IncomingCloseAgent(sp.UUID, false); } @@ -1048,6 +1048,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) { + // RED ALERT!!!! + // PLEASE DO NOT DECREASE THIS WAIT TIME UNDER ANY CIRCUMSTANCES. + // THE VIEWERS SEEM TO NEED SOME TIME AFTER RECEIVING MoveAgentIntoRegion + // BEFORE THEY SETTLE IN THE NEW REGION. + // DECREASING THE WAIT TIME HERE WILL EITHER RESULT IN A VIEWER CRASH OR + // IN THE AVIE BEING PLACED IN INFINITY FOR A COUPLE OF SECONDS. Thread.Sleep(5000); sp.Scene.IncomingCloseAgent(sp.UUID, false); } -- cgit v1.1 From cac37e298c267e4fa9c8d4306df85d74bff81fbe Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 24 Jul 2013 14:24:17 -0700 Subject: Deleted all [ZZZ] debug messages. --- OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 5 ----- .../CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 1 - 2 files changed, 6 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index f40948f..25e10be 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -1257,7 +1257,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP // UseCircuitCode handling if (packet.Type == PacketType.UseCircuitCode) { - m_log.DebugFormat("[ZZZ]: In the dungeon: UseCircuitCode"); // We need to copy the endpoint so that it doesn't get changed when another thread reuses the // buffer. object[] array = new object[] { new IPEndPoint(endPoint.Address, endPoint.Port), packet }; @@ -1271,7 +1270,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP // Send ack straight away to let the viewer know that we got it. SendAckImmediate(endPoint, packet.Header.Sequence); - m_log.DebugFormat("[ZZZ]: In the dungeon: CompleteAgentMovement"); // We need to copy the endpoint so that it doesn't get changed when another thread reuses the // buffer. object[] array = new object[] { new IPEndPoint(endPoint.Address, endPoint.Port), packet }; @@ -2080,9 +2078,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP Packet packet = incomingPacket.Packet; LLClientView client = incomingPacket.Client; - if (packet is CompleteAgentMovementPacket) - m_log.DebugFormat("[ZZZ]: Received CompleteAgentMovementPacket"); - if (client.IsActive) { m_currentIncomingClient = client; diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 1ea0fd7..70fbfc3 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -1008,7 +1008,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // Send the Update. If this returns true, we know the client has contacted the destination // via CompleteMovementIntoRegion, so we can let go. // If it returns false, something went wrong, and we need to abort. - m_log.DebugFormat("[ZZZ]: Sending Update"); if (!UpdateAgent(reg, finalDestination, agent, sp)) { if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Aborting) -- cgit v1.1