aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorCharles Krinke2008-07-01 13:42:47 +0000
committerCharles Krinke2008-07-01 13:42:47 +0000
commit0aaf0c45659939b2e08fd750a55c598615e6fdc9 (patch)
treecee4b09b756ea835d3c008d35ebb4227f96ef12c /OpenSim/Region/ScriptEngine
parentMantis#1641. Thank you, Lulurun for a patch that addresses: (diff)
downloadopensim-SC-0aaf0c45659939b2e08fd750a55c598615e6fdc9.zip
opensim-SC-0aaf0c45659939b2e08fd750a55c598615e6fdc9.tar.gz
opensim-SC-0aaf0c45659939b2e08fd750a55c598615e6fdc9.tar.bz2
opensim-SC-0aaf0c45659939b2e08fd750a55c598615e6fdc9.tar.xz
Mantis#1640. Thank you, Chernega for a patch that addresses:
It would appear that calling llResetScript() in state_entry() causes deadlock of region. Probably due to llResetScript calling state_entry again. llResetScript should see who called it, and not recall state_entry() after a state/variable reset. Once this script is in a prim, the region/world/debug/script window shows it consuming the server (from 2,400 to 800,000 milliseconds).
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 7f539f3..b6f7fbc 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -866,6 +866,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
866 private string m_ScriptName; 866 private string m_ScriptName;
867 private string m_Assembly; 867 private string m_Assembly;
868 private int m_StartParam = 0; 868 private int m_StartParam = 0;
869 private string m_CurrentEvent = String.Empty;
869 870
870 private Dictionary<string,IScriptApi> m_Apis = new Dictionary<string,IScriptApi>(); 871 private Dictionary<string,IScriptApi> m_Apis = new Dictionary<string,IScriptApi>();
871 872
@@ -1269,6 +1270,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1269 } 1270 }
1270 else 1271 else
1271 { 1272 {
1273 m_CurrentEvent = data.EventName;
1272// m_Engine.Log.DebugFormat("[XEngine] Processed event {0}", data.EventName); 1274// m_Engine.Log.DebugFormat("[XEngine] Processed event {0}", data.EventName);
1273 SceneObjectPart part = m_Engine.World.GetSceneObjectPart( 1275 SceneObjectPart part = m_Engine.World.GetSceneObjectPart(
1274 m_LocalID); 1276 m_LocalID);
@@ -1363,8 +1365,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1363 m_State = "default"; 1365 m_State = "default";
1364 if (running) 1366 if (running)
1365 Start(); 1367 Start();
1366 PostEvent(new EventParams("state_entry", 1368 if(m_CurrentEvent != "state_entry")
1367 new Object[0], new DetectParams[0])); 1369 {
1370 PostEvent(new EventParams("state_entry",
1371 new Object[0], new DetectParams[0]));
1372 }
1368 } 1373 }
1369 1374
1370 public Dictionary<string, object> GetVars() 1375 public Dictionary<string, object> GetVars()