From e4d26d7bfa4b4d4e775531a7dd400f41fc61f45f Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Fri, 19 Jun 2009 20:46:17 +0000 Subject: When a shared module hooks OnClientClosed, it has no way of finding out which client connection has closed. So, in multi-region sims, things can get messy fast. This introduces a second parameters, which is a Scene object ref. Minor adjustments to custom modules may be required due to this change. --- OpenSim/Region/Framework/Scenes/EventManager.cs | 6 +++--- OpenSim/Region/Framework/Scenes/Scene.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 08ec1aa..4b3e45f 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs @@ -162,7 +162,7 @@ namespace OpenSim.Region.Framework.Scenes public event IncomingInstantMessage OnUnhandledInstantMessage; - public delegate void ClientClosed(UUID clientID); + public delegate void ClientClosed(UUID clientID, Scene scene); public event ClientClosed OnClientClosed; @@ -733,12 +733,12 @@ namespace OpenSim.Region.Framework.Scenes } } - public void TriggerClientClosed(UUID ClientID) + public void TriggerClientClosed(UUID ClientID, Scene scene) { handlerClientClosed = OnClientClosed; if (handlerClientClosed != null) { - handlerClientClosed(ClientID); + handlerClientClosed(ClientID, scene); } } diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index d3437b9..8f6e920 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2246,7 +2246,7 @@ namespace OpenSim.Region.Framework.Scenes m_sceneGridService.SendCloseChildAgentConnections(agentID, regions); } - m_eventManager.TriggerClientClosed(agentID); + m_eventManager.TriggerClientClosed(agentID, this); } catch (NullReferenceException) { -- cgit v1.1