diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs index 998f40b..1e19032 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs | |||
@@ -28,9 +28,7 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Reflection; | ||
32 | using System.Threading; | 31 | using System.Threading; |
33 | using log4net; | ||
34 | using OpenMetaverse; | 32 | using OpenMetaverse; |
35 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
36 | using OpenSim.Framework.Monitoring; | 34 | using OpenSim.Framework.Monitoring; |
@@ -39,6 +37,8 @@ using OpenSim.Region.ScriptEngine.Interfaces; | |||
39 | using OpenSim.Region.ScriptEngine.Shared; | 37 | using OpenSim.Region.ScriptEngine.Shared; |
40 | using OpenSim.Region.ScriptEngine.Shared.Api.Plugins; | 38 | using OpenSim.Region.ScriptEngine.Shared.Api.Plugins; |
41 | using Timer=OpenSim.Region.ScriptEngine.Shared.Api.Plugins.Timer; | 39 | using Timer=OpenSim.Region.ScriptEngine.Shared.Api.Plugins.Timer; |
40 | using System.Reflection; | ||
41 | using log4net; | ||
42 | 42 | ||
43 | namespace OpenSim.Region.ScriptEngine.Shared.Api | 43 | namespace OpenSim.Region.ScriptEngine.Shared.Api |
44 | { | 44 | { |
@@ -269,6 +269,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
269 | /// <param name="itemID"></param> | 269 | /// <param name="itemID"></param> |
270 | public static void RemoveScript(IScriptEngine engine, uint localID, UUID itemID) | 270 | public static void RemoveScript(IScriptEngine engine, uint localID, UUID itemID) |
271 | { | 271 | { |
272 | // Remove a specific script | ||
272 | // m_log.DebugFormat("[ASYNC COMMAND MANAGER]: Removing facilities for script {0}", itemID); | 273 | // m_log.DebugFormat("[ASYNC COMMAND MANAGER]: Removing facilities for script {0}", itemID); |
273 | 274 | ||
274 | lock (staticLock) | 275 | lock (staticLock) |
@@ -282,7 +283,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
282 | // Remove from: HttpRequest | 283 | // Remove from: HttpRequest |
283 | IHttpRequestModule iHttpReq = engine.World.RequestModuleInterface<IHttpRequestModule>(); | 284 | IHttpRequestModule iHttpReq = engine.World.RequestModuleInterface<IHttpRequestModule>(); |
284 | if (iHttpReq != null) | 285 | if (iHttpReq != null) |
285 | iHttpReq.StopHttpRequestsForScript(itemID); | 286 | iHttpReq.StopHttpRequest(localID, itemID); |
286 | 287 | ||
287 | IWorldComm comms = engine.World.RequestModuleInterface<IWorldComm>(); | 288 | IWorldComm comms = engine.World.RequestModuleInterface<IWorldComm>(); |
288 | if (comms != null) | 289 | if (comms != null) |
@@ -364,6 +365,29 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
364 | } | 365 | } |
365 | } | 366 | } |
366 | 367 | ||
368 | public static void StateChange(IScriptEngine engine, uint localID, UUID itemID) | ||
369 | { | ||
370 | // Remove a specific script | ||
371 | |||
372 | // Remove dataserver events | ||
373 | m_Dataserver[engine].RemoveEvents(localID, itemID); | ||
374 | |||
375 | IWorldComm comms = engine.World.RequestModuleInterface<IWorldComm>(); | ||
376 | if (comms != null) | ||
377 | comms.DeleteListener(itemID); | ||
378 | |||
379 | IXMLRPC xmlrpc = engine.World.RequestModuleInterface<IXMLRPC>(); | ||
380 | if (xmlrpc != null) | ||
381 | { | ||
382 | xmlrpc.DeleteChannels(itemID); | ||
383 | xmlrpc.CancelSRDRequests(itemID); | ||
384 | } | ||
385 | |||
386 | // Remove Sensors | ||
387 | m_SensorRepeat[engine].UnSetSenseRepeaterEvents(localID, itemID); | ||
388 | |||
389 | } | ||
390 | |||
367 | public static Object[] GetSerializationData(IScriptEngine engine, UUID itemID) | 391 | public static Object[] GetSerializationData(IScriptEngine engine, UUID itemID) |
368 | { | 392 | { |
369 | List<Object> data = new List<Object>(); | 393 | List<Object> data = new List<Object>(); |
@@ -439,4 +463,4 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
439 | } | 463 | } |
440 | } | 464 | } |
441 | } | 465 | } |
442 | } \ No newline at end of file | 466 | } |