aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs
diff options
context:
space:
mode:
authorTedd Hansen2008-02-22 20:58:25 +0000
committerTedd Hansen2008-02-22 20:58:25 +0000
commit0fc6b2a429fe1db9a31456d82f27bf702bd96514 (patch)
tree04d4fb03272e59b9db5dd9d04da26d3a7a7bcd27 /OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs
parent* Oops! Add missing interface (diff)
downloadopensim-SC-0fc6b2a429fe1db9a31456d82f27bf702bd96514.zip
opensim-SC-0fc6b2a429fe1db9a31456d82f27bf702bd96514.tar.gz
opensim-SC-0fc6b2a429fe1db9a31456d82f27bf702bd96514.tar.bz2
opensim-SC-0fc6b2a429fe1db9a31456d82f27bf702bd96514.tar.xz
Bugfixes - Scripting works again
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs18
1 files changed, 16 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs
index 47fe815..e0ec27f 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs
@@ -131,6 +131,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
131 long Last_ReReadConfigFilens = DateTime.Now.Ticks; 131 long Last_ReReadConfigFilens = DateTime.Now.Ticks;
132 int MaintenanceLoopTicks_ScriptLoadUnload_Count = 0; 132 int MaintenanceLoopTicks_ScriptLoadUnload_Count = 0;
133 int MaintenanceLoopTicks_Other_Count = 0; 133 int MaintenanceLoopTicks_Other_Count = 0;
134 bool MaintenanceLoopTicks_ScriptLoadUnload_ResetCount = false;
135 bool MaintenanceLoopTicks_Other_ResetCount = false;
134 136
135 while (true) 137 while (true)
136 { 138 {
@@ -140,6 +142,18 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
140 { 142 {
141 System.Threading.Thread.Sleep(MaintenanceLoopms); // Sleep before next pass 143 System.Threading.Thread.Sleep(MaintenanceLoopms); // Sleep before next pass
142 144
145 // Reset counters?
146 if (MaintenanceLoopTicks_ScriptLoadUnload_ResetCount)
147 {
148 MaintenanceLoopTicks_ScriptLoadUnload_ResetCount = false;
149 MaintenanceLoopTicks_ScriptLoadUnload_Count = 0;
150 }
151 if (MaintenanceLoopTicks_Other_ResetCount)
152 {
153 MaintenanceLoopTicks_Other_ResetCount = false;
154 MaintenanceLoopTicks_Other_Count = 0;
155 }
156
143 // Increase our counters 157 // Increase our counters
144 MaintenanceLoopTicks_ScriptLoadUnload_Count++; 158 MaintenanceLoopTicks_ScriptLoadUnload_Count++;
145 MaintenanceLoopTicks_Other_Count++; 159 MaintenanceLoopTicks_Other_Count++;
@@ -151,7 +165,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
151 // Re-reading config every x seconds 165 // Re-reading config every x seconds
152 if (MaintenanceLoopTicks_Other_Count >= MaintenanceLoopTicks_Other) 166 if (MaintenanceLoopTicks_Other_Count >= MaintenanceLoopTicks_Other)
153 { 167 {
154 MaintenanceLoopTicks_Other_Count = 0; 168 MaintenanceLoopTicks_Other_ResetCount = true;
155 if (m_ScriptEngine.RefreshConfigFilens > 0) 169 if (m_ScriptEngine.RefreshConfigFilens > 0)
156 { 170 {
157 171
@@ -187,7 +201,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
187 } 201 }
188 if (MaintenanceLoopTicks_ScriptLoadUnload_Count >= MaintenanceLoopTicks_ScriptLoadUnload) 202 if (MaintenanceLoopTicks_ScriptLoadUnload_Count >= MaintenanceLoopTicks_ScriptLoadUnload)
189 { 203 {
190 MaintenanceLoopTicks_ScriptLoadUnload_Count = 0; 204 MaintenanceLoopTicks_ScriptLoadUnload_ResetCount = true;
191 // LOAD / UNLOAD SCRIPTS 205 // LOAD / UNLOAD SCRIPTS
192 if (m_ScriptEngine.m_ScriptManager != null) 206 if (m_ScriptEngine.m_ScriptManager != null)
193 m_ScriptEngine.m_ScriptManager.DoScriptLoadUnload(); 207 m_ScriptEngine.m_ScriptManager.DoScriptLoadUnload();