aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorMelanie2011-11-19 22:39:15 +0000
committerMelanie2011-11-19 22:39:15 +0000
commitbdb5ac96d9432eb568ed3e3bb46b012365f884bc (patch)
treefe2ce2636be7e750b3f235a6c04b9f3a5cf2f8af /OpenSim/Region/ScriptEngine
parentMerge branch 'master' into bigmerge (diff)
parentRemove the "[LOCAL SIMULATION CONNECTOR]: Did not find region {0} for SendCre... (diff)
downloadopensim-SC-bdb5ac96d9432eb568ed3e3bb46b012365f884bc.zip
opensim-SC-bdb5ac96d9432eb568ed3e3bb46b012365f884bc.tar.gz
opensim-SC-bdb5ac96d9432eb568ed3e3bb46b012365f884bc.tar.bz2
opensim-SC-bdb5ac96d9432eb568ed3e3bb46b012365f884bc.tar.xz
Merge branch 'master' into bigmerge
Conflicts: OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs25
1 files changed, 20 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 402377d..65c7416 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -91,6 +91,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine
91 private bool m_KillTimedOutScripts; 91 private bool m_KillTimedOutScripts;
92 private string m_ScriptEnginesPath = null; 92 private string m_ScriptEnginesPath = null;
93 93
94 /// <summary>
95 /// Is the entire simulator in the process of shutting down?
96 /// </summary>
97 private bool m_SimulatorShuttingDown;
98
94 private static List<XEngine> m_ScriptEngines = 99 private static List<XEngine> m_ScriptEngines =
95 new List<XEngine>(); 100 new List<XEngine>();
96 101
@@ -537,12 +542,20 @@ namespace OpenSim.Region.ScriptEngine.XEngine
537 // Must be done explicitly because they have infinite 542 // Must be done explicitly because they have infinite
538 // lifetime 543 // lifetime
539 // 544 //
540 m_DomainScripts[instance.AppDomain].Remove(instance.ItemID); 545 if (!m_SimulatorShuttingDown)
541 if (m_DomainScripts[instance.AppDomain].Count == 0)
542 { 546 {
543 m_DomainScripts.Remove(instance.AppDomain); 547 m_DomainScripts[instance.AppDomain].Remove(instance.ItemID);
544 UnloadAppDomain(instance.AppDomain); 548 if (m_DomainScripts[instance.AppDomain].Count == 0)
549 {
550 m_DomainScripts.Remove(instance.AppDomain);
551 UnloadAppDomain(instance.AppDomain);
552 }
545 } 553 }
554
555 m_Scripts.Clear();
556 m_PrimObjects.Clear();
557 m_Assemblies.Clear();
558 m_DomainScripts.Clear();
546 } 559 }
547 lockScriptsForRead(false); 560 lockScriptsForRead(false);
548 lockScriptsForWrite(true); 561 lockScriptsForWrite(true);
@@ -1512,6 +1525,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1512 1525
1513 public void OnShutdown() 1526 public void OnShutdown()
1514 { 1527 {
1528 m_SimulatorShuttingDown = true;
1529
1515 List<IScriptInstance> instances = new List<IScriptInstance>(); 1530 List<IScriptInstance> instances = new List<IScriptInstance>();
1516 1531
1517 lockScriptsForRead(true); 1532 lockScriptsForRead(true);
@@ -1907,4 +1922,4 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1907 return true; 1922 return true;
1908 } 1923 }
1909 } 1924 }
1910} \ No newline at end of file 1925}