diff options
author | Melanie | 2010-06-09 03:51:43 +0100 |
---|---|---|
committer | Melanie | 2010-06-09 03:52:59 +0100 |
commit | 491d898db8303c829d1e43f5c63afa05d6f6a445 (patch) | |
tree | ed5878a5e3eb4982696ca7839fc24d71f361802e /OpenSim/Region/ScriptEngine/XEngine | |
parent | Improve instructions for [Groups] setup in OpenSim.ini.example (diff) | |
download | opensim-SC-491d898db8303c829d1e43f5c63afa05d6f6a445.zip opensim-SC-491d898db8303c829d1e43f5c63afa05d6f6a445.tar.gz opensim-SC-491d898db8303c829d1e43f5c63afa05d6f6a445.tar.bz2 opensim-SC-491d898db8303c829d1e43f5c63afa05d6f6a445.tar.xz |
If a script is deleted before it gets compiled, don't even bother to try
compiling it
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine')
-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 98e77c0..f702e65 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? |