From 309cfeff88e9b348c9170ecd1818df68a1835681 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 23 Sep 2014 21:53:09 +0200 Subject: [PATCH 1/2] If an agent is logging in, rather than teleporting, make sure all known circuits for that agent are closed. --- .../CoreModules/Framework/Caps/CapabilitiesModule.cs | 8 ++++++++ OpenSim/Region/Framework/Scenes/Scene.cs | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs index 8aceaa1586..88447f30da 100644 --- a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs @@ -139,6 +139,14 @@ namespace OpenSim.Region.CoreModules.Framework { Caps oldCaps = m_capsObjects[circuitCode]; + // Remove tge handlers. They may conflict with the + // new object created below + oldCaps.DeregisterHandlers(); + + // Better safe ... should not be needed but also + // no big deal + m_capsObjects.Remove(circuitCode); + // if (capsObjectPath == oldCaps.CapsObjectPath) // { // m_log.WarnFormat( diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 087df70a80..8cb795d8bd 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3988,6 +3988,12 @@ namespace OpenSim.Region.Framework.Scenes // We need the circuit data here for some of the subsequent checks. (groups, for example) // If the checks fail, we remove the circuit. acd.teleportFlags = teleportFlags; + + // Remove any preexisting circuit - we don't want duplicates + // This is a stab at preventing avatar "ghosting" + if (vialogin) + m_authenticateHandler.RemoveCircuit(acd.AgentID); + m_authenticateHandler.AddNewCircuit(acd.circuitcode, acd); land = LandChannel.GetLandObject(acd.startpos.X, acd.startpos.Y); From a6b27a7aa45bbc0ae76ce166c425ab21ff936dac Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 24 Sep 2014 00:16:04 +0200 Subject: [PATCH 2/2] Add a link number field to ColliderArgs --- OpenSim/Framework/ColliderData.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/OpenSim/Framework/ColliderData.cs b/OpenSim/Framework/ColliderData.cs index 1b7b68269b..00013e108c 100644 --- a/OpenSim/Framework/ColliderData.cs +++ b/OpenSim/Framework/ColliderData.cs @@ -42,6 +42,7 @@ namespace OpenSim.Framework public Vector3 velVector = Vector3.Zero; public string nameStr = String.Empty; public int colliderType = 0; + public int linkNumber; } public class ColliderArgs : EventArgs