diff options
author | Melanie | 2010-06-09 03:51:43 +0100 |
---|---|---|
committer | Melanie | 2010-06-09 03:51:43 +0100 |
commit | 16439fa3549f48f67532b91a58c1c88984fbcc67 (patch) | |
tree | 4e627dc73e70407119261084afce4d1fdf75dafa /OpenSim/Region | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC_OLD-16439fa3549f48f67532b91a58c1c88984fbcc67.zip opensim-SC_OLD-16439fa3549f48f67532b91a58c1c88984fbcc67.tar.gz opensim-SC_OLD-16439fa3549f48f67532b91a58c1c88984fbcc67.tar.bz2 opensim-SC_OLD-16439fa3549f48f67532b91a58c1c88984fbcc67.tar.xz |
If a script is deleted before it gets compiled, don't even bother to try
compiling it
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 54074ed..61a2088 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -122,6 +122,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
122 | 122 | ||
123 | private ScriptCompileQueue m_CompileQueue = new ScriptCompileQueue(); | 123 | private ScriptCompileQueue m_CompileQueue = new ScriptCompileQueue(); |
124 | IWorkItemResult m_CurrentCompile = null; | 124 | IWorkItemResult m_CurrentCompile = null; |
125 | private Dictionary<UUID, int> m_CompileDict = new Dictionary<UUID, int>(); | ||
125 | 126 | ||
126 | public string ScriptEngineName | 127 | public string ScriptEngineName |
127 | { | 128 | { |
@@ -492,6 +493,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
492 | else | 493 | else |
493 | { | 494 | { |
494 | m_CompileQueue.Enqueue(parms); | 495 | m_CompileQueue.Enqueue(parms); |
496 | lock (m_CompileDict) | ||
497 | { | ||
498 | m_CompileDict[itemID] = 0; | ||
499 | } | ||
495 | 500 | ||
496 | if (m_CurrentCompile == null) | 501 | if (m_CurrentCompile == null) |
497 | { | 502 | { |
@@ -554,6 +559,13 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
554 | bool postOnRez = (bool)p[4]; | 559 | bool postOnRez = (bool)p[4]; |
555 | StateSource stateSource = (StateSource)p[5]; | 560 | StateSource stateSource = (StateSource)p[5]; |
556 | 561 | ||
562 | lock(m_CompileDict) | ||
563 | { | ||
564 | if (!m_CompileDict.ContainsKey(itemID)) | ||
565 | return false; | ||
566 | m_CompileDict.Remove(itemID); | ||
567 | } | ||
568 | |||
557 | // Get the asset ID of the script, so we can check if we | 569 | // Get the asset ID of the script, so we can check if we |
558 | // already have it. | 570 | // already have it. |
559 | 571 | ||
@@ -794,6 +806,13 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
794 | 806 | ||
795 | public void OnRemoveScript(uint localID, UUID itemID) | 807 | public void OnRemoveScript(uint localID, UUID itemID) |
796 | { | 808 | { |
809 | // If it's not yet been compiled, make sure we don't try | ||
810 | lock (m_CompileDict) | ||
811 | { | ||
812 | if (m_CompileDict.ContainsKey(itemID)) | ||
813 | m_CompileDict.Remove(itemID); | ||
814 | } | ||
815 | |||
797 | lock (m_Scripts) | 816 | lock (m_Scripts) |
798 | { | 817 | { |
799 | // Do we even have it? | 818 | // Do we even have it? |