From c46a508945158a31d5afa2fd5c7ee4df723d71fd Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sat, 14 Jul 2007 23:06:05 +0000 Subject: * Fixed duplicate CAP bug when a user logs out then relogs back in in grid mode. --- OpenSim/Region/Environment/Scenes/Scene.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 03e7a41..64f51d8 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -711,7 +711,16 @@ namespace OpenSim.Region.Environment.Scenes //Console.WriteLine("new user, so creating caps handler for it"); Caps cap = new Caps(this.assetCache, httpListener, this.m_regInfo.ExternalHostName, this.m_regInfo.ExternalEndPoint.Port, agent.CapsPath, agent.AgentID); cap.RegisterHandlers(); - this.capsHandlers.Add(agent.AgentID, cap); + if (capsHandlers.ContainsKey(agent.AgentID)) + { + OpenSim.Framework.Console.MainLog.Instance.Warn("Adding duplicate CAPS entry for user " + agent.AgentID.ToStringHyphenated()); + this.capsHandlers[agent.AgentID] = cap; + } + else + { + this.capsHandlers.Add(agent.AgentID, cap); + } + } this.authenticateHandler.AddNewCircuit(agent.circuitcode, agent); } -- cgit v1.1