From c263fc54ac04ab494a62b6157623d936d966940c Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 18 Jul 2010 21:05:50 +0200 Subject: Add a state change method to the Async commands handler to allow timers and http requests to survive state changes --- .../Shared/Api/Implementation/AsyncCommandManager.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs index ee32755..61e4934 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs @@ -248,6 +248,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } + public static void StateChange(IScriptEngine engine, uint localID, UUID itemID) + { + // Remove a specific script + + // Remove dataserver events + m_Dataserver[engine].RemoveEvents(localID, itemID); + + IWorldComm comms = engine.World.RequestModuleInterface(); + if (comms != null) + comms.DeleteListener(itemID); + + IXMLRPC xmlrpc = engine.World.RequestModuleInterface(); + xmlrpc.DeleteChannels(itemID); + xmlrpc.CancelSRDRequests(itemID); + + // Remove Sensors + m_SensorRepeat[engine].UnSetSenseRepeaterEvents(localID, itemID); + + } + public static Object[] GetSerializationData(IScriptEngine engine, UUID itemID) { List data = new List(); -- cgit v1.1