aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2012-07-10 18:23:38 +0100
committerUbitUmarov2012-07-10 18:23:38 +0100
commit6b8b7007c4a8c5ed3386093fd0cfac0032587121 (patch)
treee9734cb122a048b63c8e6822294d4ae772021c56 /OpenSim/Region
parentMerge branch 'avination' into ubitwork (diff)
downloadopensim-SC_OLD-6b8b7007c4a8c5ed3386093fd0cfac0032587121.zip
opensim-SC_OLD-6b8b7007c4a8c5ed3386093fd0cfac0032587121.tar.gz
opensim-SC_OLD-6b8b7007c4a8c5ed3386093fd0cfac0032587121.tar.bz2
opensim-SC_OLD-6b8b7007c4a8c5ed3386093fd0cfac0032587121.tar.xz
console region restart: Let Xengine not cry all over the place with
errors also. May not be that good, but is not in use in AVN (i hope). Still safer to do a full shutdown and refire the region from a OS tool like a script, monit, etc etc
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs16
1 files changed, 10 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 1e0f01f..2a01fc4 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -596,7 +596,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine
596 if (!m_Enabled) 596 if (!m_Enabled)
597 return; 597 return;
598 lockScriptsForRead(true); 598 lockScriptsForRead(true);
599 foreach (IScriptInstance instance in m_Scripts.Values) 599
600 List<IScriptInstance> instancesToDel = new List<IScriptInstance>(m_Scripts.Values);
601
602// foreach (IScriptInstance instance in m_Scripts.Values)
603 foreach (IScriptInstance instance in instancesToDel)
600 { 604 {
601 // Force a final state save 605 // Force a final state save
602 // 606 //
@@ -619,7 +623,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
619 // Must be done explicitly because they have infinite 623 // Must be done explicitly because they have infinite
620 // lifetime 624 // lifetime
621 // 625 //
622 if (!m_SimulatorShuttingDown) 626// if (!m_SimulatorShuttingDown)
623 { 627 {
624 m_DomainScripts[instance.AppDomain].Remove(instance.ItemID); 628 m_DomainScripts[instance.AppDomain].Remove(instance.ItemID);
625 if (m_DomainScripts[instance.AppDomain].Count == 0) 629 if (m_DomainScripts[instance.AppDomain].Count == 0)
@@ -629,10 +633,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
629 } 633 }
630 } 634 }
631 635
632 m_Scripts.Clear(); 636// m_Scripts.Clear();
633 m_PrimObjects.Clear(); 637// m_PrimObjects.Clear();
634 m_Assemblies.Clear(); 638// m_Assemblies.Clear();
635 m_DomainScripts.Clear(); 639// m_DomainScripts.Clear();
636 } 640 }
637 lockScriptsForRead(false); 641 lockScriptsForRead(false);
638 lockScriptsForWrite(true); 642 lockScriptsForWrite(true);