aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs31
1 files changed, 24 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
index 1c59624..6879ebb 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
@@ -28,9 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Reflection;
32using System.Threading; 31using System.Threading;
33using log4net;
34using OpenMetaverse; 32using OpenMetaverse;
35using OpenSim.Framework; 33using OpenSim.Framework;
36using OpenSim.Framework.Monitoring; 34using OpenSim.Framework.Monitoring;
@@ -47,8 +45,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
47 /// </summary> 45 /// </summary>
48 public class AsyncCommandManager 46 public class AsyncCommandManager
49 { 47 {
50// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
51
52 private static Thread cmdHandlerThread; 48 private static Thread cmdHandlerThread;
53 private static int cmdHandlerThreadCycleSleepms; 49 private static int cmdHandlerThreadCycleSleepms;
54 50
@@ -229,8 +225,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
229 /// <param name="itemID"></param> 225 /// <param name="itemID"></param>
230 public static void RemoveScript(IScriptEngine engine, uint localID, UUID itemID) 226 public static void RemoveScript(IScriptEngine engine, uint localID, UUID itemID)
231 { 227 {
232// m_log.DebugFormat("[ASYNC COMMAND MANAGER]: Removing facilities for script {0}", itemID);
233
234 // Remove a specific script 228 // Remove a specific script
235 229
236 // Remove dataserver events 230 // Remove dataserver events
@@ -242,7 +236,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
242 // Remove from: HttpRequest 236 // Remove from: HttpRequest
243 IHttpRequestModule iHttpReq = engine.World.RequestModuleInterface<IHttpRequestModule>(); 237 IHttpRequestModule iHttpReq = engine.World.RequestModuleInterface<IHttpRequestModule>();
244 if (iHttpReq != null) 238 if (iHttpReq != null)
245 iHttpReq.StopHttpRequestsForScript(itemID); 239 iHttpReq.StopHttpRequest(localID, itemID);
246 240
247 IWorldComm comms = engine.World.RequestModuleInterface<IWorldComm>(); 241 IWorldComm comms = engine.World.RequestModuleInterface<IWorldComm>();
248 if (comms != null) 242 if (comms != null)
@@ -311,6 +305,29 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
311 return null; 305 return null;
312 } 306 }
313 307
308 public static void StateChange(IScriptEngine engine, uint localID, UUID itemID)
309 {
310 // Remove a specific script
311
312 // Remove dataserver events
313 m_Dataserver[engine].RemoveEvents(localID, itemID);
314
315 IWorldComm comms = engine.World.RequestModuleInterface<IWorldComm>();
316 if (comms != null)
317 comms.DeleteListener(itemID);
318
319 IXMLRPC xmlrpc = engine.World.RequestModuleInterface<IXMLRPC>();
320 if (xmlrpc != null)
321 {
322 xmlrpc.DeleteChannels(itemID);
323 xmlrpc.CancelSRDRequests(itemID);
324 }
325
326 // Remove Sensors
327 m_SensorRepeat[engine].UnSetSenseRepeaterEvents(localID, itemID);
328
329 }
330
314 public static Object[] GetSerializationData(IScriptEngine engine, UUID itemID) 331 public static Object[] GetSerializationData(IScriptEngine engine, UUID itemID)
315 { 332 {
316 List<Object> data = new List<Object>(); 333 List<Object> data = new List<Object>();