If a script is deleted before it gets compiled, don't even bother to try

compiling it
0.6.9-post-fixes
Melanie 2010-06-09 03:51:43 +01:00
parent 5f60eb136e
commit 491d898db8
1 changed files with 19 additions and 0 deletions

View File

@ -122,6 +122,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
private ScriptCompileQueue m_CompileQueue = new ScriptCompileQueue();
IWorkItemResult m_CurrentCompile = null;
private Dictionary<UUID, int> m_CompileDict = new Dictionary<UUID, int>();
public string ScriptEngineName
{
@ -492,6 +493,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
else
{
m_CompileQueue.Enqueue(parms);
lock (m_CompileDict)
{
m_CompileDict[itemID] = 0;
}
if (m_CurrentCompile == null)
{
@ -554,6 +559,13 @@ namespace OpenSim.Region.ScriptEngine.XEngine
bool postOnRez = (bool)p[4];
StateSource stateSource = (StateSource)p[5];
lock(m_CompileDict)
{
if (!m_CompileDict.ContainsKey(itemID))
return false;
m_CompileDict.Remove(itemID);
}
// Get the asset ID of the script, so we can check if we
// already have it.
@ -794,6 +806,13 @@ namespace OpenSim.Region.ScriptEngine.XEngine
public void OnRemoveScript(uint localID, UUID itemID)
{
// If it's not yet been compiled, make sure we don't try
lock (m_CompileDict)
{
if (m_CompileDict.ContainsKey(itemID))
m_CompileDict.Remove(itemID);
}
lock (m_Scripts)
{
// Do we even have it?