aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine/XEngine.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 463b052..30e127d 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -125,6 +125,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
125 125
126 private ScriptCompileQueue m_CompileQueue = new ScriptCompileQueue(); 126 private ScriptCompileQueue m_CompileQueue = new ScriptCompileQueue();
127 IWorkItemResult m_CurrentCompile = null; 127 IWorkItemResult m_CurrentCompile = null;
128 private Dictionary<UUID, int> m_CompileDict = new Dictionary<UUID, int>();
128 129
129 private void lockScriptsForRead(bool locked) 130 private void lockScriptsForRead(bool locked)
130 { 131 {
@@ -560,6 +561,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
560 else 561 else
561 { 562 {
562 m_CompileQueue.Enqueue(parms); 563 m_CompileQueue.Enqueue(parms);
564 lock (m_CompileDict)
565 {
566 m_CompileDict[itemID] = 0;
567 }
563 568
564 if (m_CurrentCompile == null) 569 if (m_CurrentCompile == null)
565 { 570 {
@@ -622,6 +627,13 @@ namespace OpenSim.Region.ScriptEngine.XEngine
622 bool postOnRez = (bool)p[4]; 627 bool postOnRez = (bool)p[4];
623 StateSource stateSource = (StateSource)p[5]; 628 StateSource stateSource = (StateSource)p[5];
624 629
630 lock(m_CompileDict)
631 {
632 if (!m_CompileDict.ContainsKey(itemID))
633 return false;
634 m_CompileDict.Remove(itemID);
635 }
636
625 // Get the asset ID of the script, so we can check if we 637 // Get the asset ID of the script, so we can check if we
626 // already have it. 638 // already have it.
627 639
@@ -868,6 +880,13 @@ namespace OpenSim.Region.ScriptEngine.XEngine
868 880
869 public void OnRemoveScript(uint localID, UUID itemID) 881 public void OnRemoveScript(uint localID, UUID itemID)
870 { 882 {
883 // If it's not yet been compiled, make sure we don't try
884 lock (m_CompileDict)
885 {
886 if (m_CompileDict.ContainsKey(itemID))
887 m_CompileDict.Remove(itemID);
888 }
889
871 lockScriptsForRead(true); 890 lockScriptsForRead(true);
872 // Do we even have it? 891 // Do we even have it?
873 if (!m_Scripts.ContainsKey(itemID)) 892 if (!m_Scripts.ContainsKey(itemID))