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.ThreadPoolClientBranch
parent
b1a6f4821b
commit
2db5de3e72
|
@ -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)
|
||||
{
|
||||
|
@ -1468,9 +1469,18 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
MySqlCommand lalcmd = new MySqlCommand(createLandAccessList, conn);
|
||||
|
||||
if (conn.State != ConnectionState.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
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -720,6 +720,9 @@ 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 save - save OpenSim.ini");
|
||||
m_log.Error("terrain help - show help for terrain commands.");
|
||||
break;
|
||||
|
||||
|
@ -912,7 +915,65 @@ namespace OpenSim
|
|||
}
|
||||
break;
|
||||
|
||||
case "config":
|
||||
string n = command.ToUpper();
|
||||
if (cmdparams.Length > 0)
|
||||
{
|
||||
switch (cmdparams[0].ToLower())
|
||||
{
|
||||
case "set":
|
||||
if (cmdparams.Length < 4)
|
||||
{
|
||||
MainLog.Instance.Notice(n, "SYNTAX: " + n + " SET SECTION KEY VALUE");
|
||||
MainLog.Instance.Notice(n, "EXAMPLE: " + n + " SET ScriptEngine.DotNetEngine NumberOfScriptThreads 5");
|
||||
}
|
||||
else
|
||||
{
|
||||
IConfig c = DefaultConfig().Configs[cmdparams[1]];
|
||||
if (c == null)
|
||||
c = DefaultConfig().AddConfig(cmdparams[1]);
|
||||
string _value = String.Join(" ", cmdparams, 3, cmdparams.Length - 3);
|
||||
c.Set(cmdparams[2], _value);
|
||||
m_config.Merge(c.ConfigSource);
|
||||
|
||||
MainLog.Instance.Notice(n,
|
||||
n + " " + n + " " + cmdparams[1] + " " + cmdparams[2] + " " +
|
||||
_value);
|
||||
}
|
||||
break;
|
||||
case "get":
|
||||
if (cmdparams.Length < 3)
|
||||
{
|
||||
MainLog.Instance.Notice(n, "SYNTAX: " + n + " GET SECTION KEY");
|
||||
MainLog.Instance.Notice(n, "EXAMPLE: " + n + " GET ScriptEngine.DotNetEngine NumberOfScriptThreads");
|
||||
}
|
||||
else
|
||||
{
|
||||
IConfig c = DefaultConfig().Configs[cmdparams[1]];
|
||||
if (c == null)
|
||||
{
|
||||
MainLog.Instance.Notice(n, "Section \"" + cmdparams[1] + "\" does not exist.");
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Notice(n,
|
||||
n + " GET " + cmdparams[1] + " " + cmdparams[2] + ": " +
|
||||
c.GetString(cmdparams[2]));
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case "save":
|
||||
MainLog.Instance.Notice(n, "Saving configuration file: " + Application.iniFilePath);
|
||||
m_config.Save(Application.iniFilePath);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
break;
|
||||
default:
|
||||
m_log.Error("Unknown command");
|
||||
break;
|
||||
|
|
|
@ -257,7 +257,7 @@ namespace OpenSim.Region.ClientStack
|
|||
{
|
||||
|
||||
uint newPort = listenPort;
|
||||
for (uint i = 0; i < 10; i++)
|
||||
for (uint i = 0; i < 20; i++)
|
||||
{
|
||||
newPort = listenPort + i;
|
||||
m_log.Verbose("SERVER", "Opening UDP socket on " + listenIP.ToString() + " " + newPort + ". Allow alternate ports: " + Allow_Alternate_Port.ToString());
|
||||
|
|
|
@ -134,14 +134,14 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
|
|||
#if DEBUG
|
||||
Log.Debug(ScriptEngineName, "Refreshing configuration for all modules");
|
||||
#endif
|
||||
RefreshConfigFileSeconds = ScriptConfigSource.GetInt("RefreshConfig", 0);
|
||||
RefreshConfigFileSeconds = ScriptConfigSource.GetInt("RefreshConfig", 30);
|
||||
|
||||
// Reload from disk
|
||||
// Reload from disk? No!
|
||||
//ConfigSource.Reload();
|
||||
if (File.Exists(OpenSim.Application.iniFilePath))
|
||||
{
|
||||
//ConfigSource.Merge(new IniConfigSource(OpenSim.Application.iniFilePath));
|
||||
}
|
||||
//if (File.Exists(OpenSim.Application.iniFilePath))
|
||||
//{
|
||||
// //ConfigSource.Merge(new IniConfigSource(OpenSim.Application.iniFilePath));
|
||||
//}
|
||||
|
||||
|
||||
// Create a new object (probably not necessary?)
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue