From 2db5de3e7217ca4bd9fcaf5345ea5672b5d6663f Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Sat, 2 Feb 2008 07:35:51 +0000 Subject: Added commands to change config file from console: CONFIG SET section key value value value CONFIG GET section key CONFIG SAVE (it saves, but does it save correctly?:) ScriptEngine will react correctly to any config change made while it is running. --- OpenSim/Framework/Data.MySQL/MySQLDataStore.cs | 16 +++++++++++++--- OpenSim/Framework/RegionInfo.cs | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs index 45d0720..b25924c 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs @@ -415,11 +415,12 @@ namespace OpenSim.Framework.Data.MySQL } } + static Random rnd = new Random(); public void StoreLandObject(Land parcel, LLUUID regionUUID) { // Does the new locking fix it? - //MainLog.Instance.Verbose("DATASTORE", "Tedds temp fix: Waiting 3 seconds for stuff to catch up. (Someone please fix! :))"); - //System.Threading.Thread.Sleep(3000); + MainLog.Instance.Verbose("DATASTORE", "Tedds temp fix: Waiting 3 seconds for stuff to catch up. (Someone please fix! :))"); + System.Threading.Thread.Sleep(2500 + rnd.Next(300, 900)); lock (DBAccessLock) { @@ -1469,7 +1470,16 @@ namespace OpenSim.Framework.Data.MySQL if (conn.State != ConnectionState.Open) { - conn.Open(); + try + { + conn.Open(); + } + catch (Exception ex) + { + MainLog.Instance.Error("MySql", "Error connecting to MySQL server: " + ex.Message); + MainLog.Instance.Error("MySql", "Application is terminating!"); + System.Threading.Thread.CurrentThread.Abort(); + } } try diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index b843774..be0b3e0 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs @@ -310,7 +310,7 @@ namespace OpenSim.Framework NetworkServersInfo.DefaultHttpListenerPort.ToString(), false); configMember.addConfigurationOption("allow_alternate_ports", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, "Allow sim to find alternate UDP ports when ports are in use?", - "false", false); + "false", true); configMember.addConfigurationOption("external_host_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "External Host Name", "127.0.0.1", false); -- cgit v1.1