If a script is deleted before it gets compiled, don't even bother to try
compiling it0.6.9-post-fixes
							parent
							
								
									5f60eb136e
								
							
						
					
					
						commit
						491d898db8
					
				| 
						 | 
					@ -122,6 +122,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        private ScriptCompileQueue m_CompileQueue = new ScriptCompileQueue();
 | 
					        private ScriptCompileQueue m_CompileQueue = new ScriptCompileQueue();
 | 
				
			||||||
        IWorkItemResult m_CurrentCompile = null;
 | 
					        IWorkItemResult m_CurrentCompile = null;
 | 
				
			||||||
 | 
					        private Dictionary<UUID, int> m_CompileDict = new Dictionary<UUID, int>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public string ScriptEngineName
 | 
					        public string ScriptEngineName
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
| 
						 | 
					@ -492,6 +493,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
 | 
				
			||||||
            else
 | 
					            else
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                m_CompileQueue.Enqueue(parms);
 | 
					                m_CompileQueue.Enqueue(parms);
 | 
				
			||||||
 | 
					                lock (m_CompileDict)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    m_CompileDict[itemID] = 0;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (m_CurrentCompile == null)
 | 
					                if (m_CurrentCompile == null)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
| 
						 | 
					@ -554,6 +559,13 @@ namespace OpenSim.Region.ScriptEngine.XEngine
 | 
				
			||||||
            bool postOnRez = (bool)p[4];
 | 
					            bool postOnRez = (bool)p[4];
 | 
				
			||||||
            StateSource stateSource = (StateSource)p[5];
 | 
					            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
 | 
					            // Get the asset ID of the script, so we can check if we
 | 
				
			||||||
            // already have it.
 | 
					            // already have it.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -794,6 +806,13 @@ namespace OpenSim.Region.ScriptEngine.XEngine
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public void OnRemoveScript(uint localID, UUID itemID)
 | 
					        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)
 | 
					            lock (m_Scripts)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                // Do we even have it?
 | 
					                // Do we even have it?
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue