From 785b641272f0e41c50d42406496baee10e5303a9 Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Sat, 2 Feb 2008 07:53:13 +0000 Subject: [PATCH] fixed a timing bug in config re-read. Apparently there is 1000000000 ns in one second... --- OpenSim/Region/Application/OpenSimMain.cs | 4 +-- .../ScriptEngineBase/MaintenanceThread.cs | 7 ++--- .../Common/ScriptEngineBase/ScriptEngine.cs | 12 ++++----- OpenSim/Tools/OpenSim.32BitLaunch/Program.cs | 24 ++++++++++++++++-- bin/OpenSim.32BitLaunch.exe | Bin 4608 -> 5632 bytes bin/OpenSim.32BitLaunch.pdb | Bin 11776 -> 13824 bytes 6 files changed, 34 insertions(+), 13 deletions(-) diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 223b4a5d8f..1754f7e720 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -720,8 +720,8 @@ namespace OpenSim m_log.Error("show modules - shows info aboutloaded modules."); m_log.Error("stats - statistical information for this server not displayed in the client"); m_log.Error("shutdown - disconnect all clients and shutdown."); - m_log.Error("config set category field value - set a config value"); - m_log.Error("config get category field - get a config value"); + m_log.Error("config set section field value - set a config value"); + m_log.Error("config get section field - get a config value"); m_log.Error("config save - save OpenSim.ini"); m_log.Error("terrain help - show help for terrain commands."); break; diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs index ae6f0012cf..57e56d454a 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs @@ -90,12 +90,12 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase m_ScriptEngine.Log.Warn(m_ScriptEngine.ScriptEngineName, "Configuration error: MaxEventExecutionTimeMs is less than MaintenanceLoopms. The Maintenance Loop will only check scripts once per run."); + long Last_maxFunctionExecutionTimens = 0; // DateTime.Now.Ticks; + long Last_ReReadConfigFilens = DateTime.Now.Ticks; while (true) { try { - long Last_maxFunctionExecutionTimens = 0; // DateTime.Now.Ticks; - long Last_ReReadConfigFilens = DateTime.Now.Ticks; while (true) { System.Threading.Thread.Sleep(MaintenanceLoopms); // Sleep before next pass @@ -107,11 +107,12 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase // // Re-reading config every x seconds // - if (m_ScriptEngine.RefreshConfigFileSeconds > 0) + if (m_ScriptEngine.RefreshConfigFilens > 0) { // Check if its time to re-read config if (DateTime.Now.Ticks - Last_ReReadConfigFilens > m_ScriptEngine.RefreshConfigFilens) { + //Console.WriteLine("Time passed: " + (DateTime.Now.Ticks - Last_ReReadConfigFilens) + ">" + m_ScriptEngine.RefreshConfigFilens ); // Its time to re-read config file m_ScriptEngine.ReadConfig(); Last_ReReadConfigFilens = DateTime.Now.Ticks; // Reset time diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs index 4cf39b463a..f09e63106f 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs @@ -61,10 +61,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase /// How many seconds between re-reading config-file. 0 = never. ScriptEngine will try to adjust to new config changes. /// public int RefreshConfigFileSeconds { - get { return (int)(RefreshConfigFilens / 10000); } - set { RefreshConfigFilens = value * 10000; } + get { return (int)(RefreshConfigFilens / 10000000); } + set { RefreshConfigFilens = value * 10000000; } } - public long RefreshConfigFilens = 0; + public long RefreshConfigFilens; public ScriptManager GetScriptManager() { @@ -131,9 +131,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase } public void ReadConfig() { -#if DEBUG - Log.Debug(ScriptEngineName, "Refreshing configuration for all modules"); -#endif +//#if DEBUG +// Log.Debug(ScriptEngineName, "Refreshing configuration for all modules"); +//#endif RefreshConfigFileSeconds = ScriptConfigSource.GetInt("RefreshConfig", 30); // Reload from disk? No! diff --git a/OpenSim/Tools/OpenSim.32BitLaunch/Program.cs b/OpenSim/Tools/OpenSim.32BitLaunch/Program.cs index afd7754262..c15b738795 100644 --- a/OpenSim/Tools/OpenSim.32BitLaunch/Program.cs +++ b/OpenSim/Tools/OpenSim.32BitLaunch/Program.cs @@ -1,10 +1,30 @@ -namespace OpenSim._32BitLaunch +using System; + +namespace OpenSim._32BitLaunch { class Program { static void Main(string[] args) { - OpenSim.Application.Main(args); + System.Console.WriteLine("32-bit OpenSim executor"); + System.Console.WriteLine("-----------------------"); + System.Console.WriteLine(""); + System.Console.WriteLine("This application is compiled for 32-bit CPU and will run under WOW32 or similar."); + System.Console.WriteLine("All 64-bit incompatibilities should be gone."); + System.Console.WriteLine(""); + System.Threading.Thread.Sleep(300); + try + { + OpenSim.Application.Main(args); + } + catch (Exception ex) + { + System.Console.WriteLine("OpenSim threw an exception:"); + System.Console.WriteLine(ex.ToString()); + System.Console.WriteLine(""); + System.Console.WriteLine("Application will now terminate!"); + System.Console.WriteLine(""); + } } } } diff --git a/bin/OpenSim.32BitLaunch.exe b/bin/OpenSim.32BitLaunch.exe index f16f5b2867bc03ae602c70e0bfb9d004dca7111f..fce690f8609005caf514d635b35bc2eb55373969 100755 GIT binary patch delta 1362 zcma)6O=whC6#nj=$xMfFrlL?fJOsssh$6J0UBo}omADYPlTuvR;G%R_T0|&Rkbd{hbVgly!#($$@1Fae z?;Iv?e(ikU_h;6u>%KOM+Io(Jh>2z(PJoA6iQdYOlZjhBKvso2fTvBBWM_Q3nw93o zsvs%*f+>-1X=R4N9S_cm4I&ZT5$i=)uqaa9OjBz&w?q@-Nj_tR5Mu#Ef@Dj7d1b%A zg(}bvpRkv116tvK*l=?VH{Wn0qMqAG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