* Cleanup and CCC (Code Convention Conformance)
parent
63a5a01945
commit
91a096dca6
|
@ -51,7 +51,8 @@ namespace OpenSim
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
// First line
|
// First line
|
||||||
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
|
AppDomain.CurrentDomain.UnhandledException +=
|
||||||
|
new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
|
||||||
|
|
||||||
XmlConfigurator.Configure();
|
XmlConfigurator.Configure();
|
||||||
|
|
||||||
|
@ -143,7 +144,7 @@ namespace OpenSim
|
||||||
msg += "\r\n";
|
msg += "\r\n";
|
||||||
|
|
||||||
msg += "Exception: " + e.ExceptionObject.ToString() + "\r\n";
|
msg += "Exception: " + e.ExceptionObject.ToString() + "\r\n";
|
||||||
Exception ex = (Exception)e.ExceptionObject;
|
Exception ex = (Exception) e.ExceptionObject;
|
||||||
if (ex.InnerException != null)
|
if (ex.InnerException != null)
|
||||||
{
|
{
|
||||||
msg += "InnerException: " + ex.InnerException.ToString() + "\r\n";
|
msg += "InnerException: " + ex.InnerException.ToString() + "\r\n";
|
||||||
|
@ -177,7 +178,7 @@ namespace OpenSim
|
||||||
m_log.ErrorFormat("[CRASH LOGGER CRASHED]: {0}", e2);
|
m_log.ErrorFormat("[CRASH LOGGER CRASHED]: {0}", e2);
|
||||||
}
|
}
|
||||||
|
|
||||||
_IsHandlingException=false;
|
_IsHandlingException = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -48,7 +48,8 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public OpenSimConfigSource LoadConfigSettings(IConfigSource configSource, out ConfigSettings configSettings, out NetworkServersInfo networkInfo)
|
public OpenSimConfigSource LoadConfigSettings(IConfigSource configSource, out ConfigSettings configSettings,
|
||||||
|
out NetworkServersInfo networkInfo)
|
||||||
{
|
{
|
||||||
m_configSettings = configSettings = new ConfigSettings();
|
m_configSettings = configSettings = new ConfigSettings();
|
||||||
m_networkServersInfo = networkInfo = new NetworkServersInfo();
|
m_networkServersInfo = networkInfo = new NetworkServersInfo();
|
||||||
|
@ -79,7 +80,8 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[CONFIG] Reading config master file {0}", masterfilePath);
|
m_log.InfoFormat("[CONFIG] Reading config master file {0}", masterfilePath);
|
||||||
|
|
||||||
bool isMasterUri = Uri.TryCreate(masterFileName, UriKind.Absolute, out configUri) && configUri.Scheme == Uri.UriSchemeHttp;
|
bool isMasterUri = Uri.TryCreate(masterFileName, UriKind.Absolute, out configUri) &&
|
||||||
|
configUri.Scheme == Uri.UriSchemeHttp;
|
||||||
|
|
||||||
if (!ReadConfig(masterFileName, masterfilePath, m_config, isMasterUri))
|
if (!ReadConfig(masterFileName, masterfilePath, m_config, isMasterUri))
|
||||||
{
|
{
|
||||||
|
@ -103,7 +105,8 @@ namespace OpenSim
|
||||||
|
|
||||||
// Check for .INI file (either default or name passed on command
|
// Check for .INI file (either default or name passed on command
|
||||||
// line) or XML config source over http
|
// line) or XML config source over http
|
||||||
bool isIniUri = Uri.TryCreate(iniFileName, UriKind.Absolute, out configUri) && configUri.Scheme == Uri.UriSchemeHttp;
|
bool isIniUri = Uri.TryCreate(iniFileName, UriKind.Absolute, out configUri) &&
|
||||||
|
configUri.Scheme == Uri.UriSchemeHttp;
|
||||||
iniFileExists = ReadConfig(iniFileName, Application.iniFilePath, m_config, isIniUri);
|
iniFileExists = ReadConfig(iniFileName, Application.iniFilePath, m_config, isIniUri);
|
||||||
|
|
||||||
if (!iniFileExists)
|
if (!iniFileExists)
|
||||||
|
|
|
@ -33,11 +33,7 @@ using log4net;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
using OpenSim.Framework.Communications;
|
||||||
using OpenSim.Framework.Communications.Cache;
|
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Framework.Servers;
|
|
||||||
using OpenSim.Region.Communications.Hypergrid;
|
|
||||||
using OpenSim.Region.Communications.Local;
|
|
||||||
using OpenSim.Region.Framework;
|
using OpenSim.Region.Framework;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Region.Framework.Scenes.Hypergrid;
|
using OpenSim.Region.Framework.Scenes.Hypergrid;
|
||||||
|
@ -68,13 +64,15 @@ namespace OpenSim
|
||||||
|
|
||||||
base.StartupSpecific();
|
base.StartupSpecific();
|
||||||
|
|
||||||
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [<x> <y>] <cr>", "Set local coordinate to map HG regions to", RunCommand);
|
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [<x> <y>] <cr>",
|
||||||
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", "link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>] <cr>", "Link a hypergrid region", RunCommand);
|
"Set local coordinate to map HG regions to", RunCommand);
|
||||||
|
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region",
|
||||||
|
"link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>] <cr>",
|
||||||
|
"Link a hypergrid region", RunCommand);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager,
|
protected override Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager,
|
||||||
AgentCircuitManager circuitManager)
|
AgentCircuitManager circuitManager)
|
||||||
{
|
{
|
||||||
HGSceneCommunicationService sceneGridService = new HGSceneCommunicationService(m_commsManager, HGServices);
|
HGSceneCommunicationService sceneGridService = new HGSceneCommunicationService(m_commsManager, HGServices);
|
||||||
|
|
||||||
|
@ -85,7 +83,7 @@ namespace OpenSim
|
||||||
m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version);
|
m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version);
|
||||||
}
|
}
|
||||||
|
|
||||||
new void RunCommand(string module, string[] cp)
|
private new void RunCommand(string module, string[] cp)
|
||||||
{
|
{
|
||||||
List<string> cmdparams = new List<string>(cp);
|
List<string> cmdparams = new List<string>(cp);
|
||||||
if (cmdparams.Count < 1)
|
if (cmdparams.Count < 1)
|
||||||
|
@ -128,7 +126,8 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmdparams[2].Contains(":"))
|
if (cmdparams[2].Contains(":"))
|
||||||
{ // New format
|
{
|
||||||
|
// New format
|
||||||
uint xloc, yloc;
|
uint xloc, yloc;
|
||||||
string mapName;
|
string mapName;
|
||||||
try
|
try
|
||||||
|
@ -154,7 +153,8 @@ namespace OpenSim
|
||||||
HGHyperlink.TryLinkRegionToCoords(m_sceneManager.CurrentOrFirstScene, null, mapName, xloc, yloc);
|
HGHyperlink.TryLinkRegionToCoords(m_sceneManager.CurrentOrFirstScene, null, mapName, xloc, yloc);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // old format
|
{
|
||||||
|
// old format
|
||||||
RegionInfo regInfo;
|
RegionInfo regInfo;
|
||||||
uint xloc, yloc;
|
uint xloc, yloc;
|
||||||
uint externalPort;
|
uint externalPort;
|
||||||
|
@ -205,7 +205,7 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
string excludeString = cmdparams[1].ToLower();
|
string excludeString = cmdparams[1].ToLower();
|
||||||
excludeString = excludeString.Remove(0, 12);
|
excludeString = excludeString.Remove(0, 12);
|
||||||
char[] splitter = { ';' };
|
char[] splitter = {';'};
|
||||||
|
|
||||||
excludeSections = excludeString.Split(splitter);
|
excludeSections = excludeString.Split(splitter);
|
||||||
}
|
}
|
||||||
|
@ -255,13 +255,17 @@ namespace OpenSim
|
||||||
|
|
||||||
if (m_enableAutoMapping)
|
if (m_enableAutoMapping)
|
||||||
{
|
{
|
||||||
xloc = (uint)((xloc % 100) + m_autoMappingX);
|
xloc = (uint) ((xloc%100) + m_autoMappingX);
|
||||||
yloc = (uint)((yloc % 100) + m_autoMappingY);
|
yloc = (uint) ((yloc%100) + m_autoMappingY);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((realXLoc == 0) && (realYLoc == 0)) || (((realXLoc - xloc < 3896) || (xloc - realXLoc < 3896)) && ((realYLoc - yloc < 3896) || (yloc - realYLoc < 3896))))
|
if (((realXLoc == 0) && (realYLoc == 0)) ||
|
||||||
|
(((realXLoc - xloc < 3896) || (xloc - realXLoc < 3896)) &&
|
||||||
|
((realYLoc - yloc < 3896) || (yloc - realYLoc < 3896))))
|
||||||
{
|
{
|
||||||
if (HGHyperlink.TryCreateLink(m_sceneManager.CurrentOrFirstScene, null, xloc, yloc, "", externalPort, externalHostName, out regInfo))
|
if (
|
||||||
|
HGHyperlink.TryCreateLink(m_sceneManager.CurrentOrFirstScene, null, xloc, yloc, "", externalPort,
|
||||||
|
externalHostName, out regInfo))
|
||||||
{
|
{
|
||||||
regInfo.RegionName = config.GetString("localName", "");
|
regInfo.RegionName = config.GetString("localName", "");
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,11 +38,16 @@ namespace OpenSim
|
||||||
public class ApplicationPluginInitialiser : PluginInitialiserBase
|
public class ApplicationPluginInitialiser : PluginInitialiserBase
|
||||||
{
|
{
|
||||||
private OpenSimBase server;
|
private OpenSimBase server;
|
||||||
public ApplicationPluginInitialiser (OpenSimBase s) { server = s; }
|
|
||||||
public override void Initialise (IPlugin plugin)
|
public ApplicationPluginInitialiser(OpenSimBase s)
|
||||||
|
{
|
||||||
|
server = s;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Initialise(IPlugin plugin)
|
||||||
{
|
{
|
||||||
IApplicationPlugin p = plugin as IApplicationPlugin;
|
IApplicationPlugin p = plugin as IApplicationPlugin;
|
||||||
p.Initialise (server);
|
p.Initialise(server);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -85,7 +85,8 @@ namespace OpenSim
|
||||||
m_log.Info("====================================================================");
|
m_log.Info("====================================================================");
|
||||||
m_log.Info("========================= STARTING OPENSIM =========================");
|
m_log.Info("========================= STARTING OPENSIM =========================");
|
||||||
m_log.Info("====================================================================");
|
m_log.Info("====================================================================");
|
||||||
m_log.InfoFormat("[OPENSIM MAIN]: Running in {0} mode", (ConfigurationSettings.Standalone ? "sandbox" : "grid"));
|
m_log.InfoFormat("[OPENSIM MAIN]: Running in {0} mode",
|
||||||
|
(ConfigurationSettings.Standalone ? "sandbox" : "grid"));
|
||||||
//m_log.InfoFormat("[OPENSIM MAIN]: GC Is Server GC: {0}", GCSettings.IsServerGC.ToString());
|
//m_log.InfoFormat("[OPENSIM MAIN]: GC Is Server GC: {0}", GCSettings.IsServerGC.ToString());
|
||||||
// http://msdn.microsoft.com/en-us/library/bb384202.aspx
|
// http://msdn.microsoft.com/en-us/library/bb384202.aspx
|
||||||
//GCSettings.LatencyMode = GCLatencyMode.Batch;
|
//GCSettings.LatencyMode = GCLatencyMode.Batch;
|
||||||
|
@ -100,7 +101,7 @@ namespace OpenSim
|
||||||
base.StartupSpecific();
|
base.StartupSpecific();
|
||||||
|
|
||||||
//Run Startup Commands
|
//Run Startup Commands
|
||||||
if (String.IsNullOrEmpty( m_startupCommandsFile ))
|
if (String.IsNullOrEmpty(m_startupCommandsFile))
|
||||||
{
|
{
|
||||||
m_log.Info("[STARTUP]: No startup command script specified. Moving on...");
|
m_log.Info("[STARTUP]: No startup command script specified. Moving on...");
|
||||||
}
|
}
|
||||||
|
@ -114,7 +115,7 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
m_scriptTimer = new Timer();
|
m_scriptTimer = new Timer();
|
||||||
m_scriptTimer.Enabled = true;
|
m_scriptTimer.Enabled = true;
|
||||||
m_scriptTimer.Interval = 1200 * 1000;
|
m_scriptTimer.Interval = 1200*1000;
|
||||||
m_scriptTimer.Elapsed += RunAutoTimerScript;
|
m_scriptTimer.Elapsed += RunAutoTimerScript;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,7 +123,8 @@ namespace OpenSim
|
||||||
|
|
||||||
// For now, start at the 'root' level by default
|
// For now, start at the 'root' level by default
|
||||||
if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it
|
if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it
|
||||||
ChangeSelectedRegion("region", new string[] {"change", "region", m_sceneManager.Scenes[0].RegionInfo.RegionName});
|
ChangeSelectedRegion("region",
|
||||||
|
new string[] {"change", "region", m_sceneManager.Scenes[0].RegionInfo.RegionName});
|
||||||
else
|
else
|
||||||
ChangeSelectedRegion("region", new string[] {"change", "region", "root"});
|
ChangeSelectedRegion("region", new string[] {"change", "region", "root"});
|
||||||
}
|
}
|
||||||
|
@ -130,164 +132,164 @@ namespace OpenSim
|
||||||
private void RegisterConsoleCommands()
|
private void RegisterConsoleCommands()
|
||||||
{
|
{
|
||||||
m_console.Commands.AddCommand("region", false, "clear assets",
|
m_console.Commands.AddCommand("region", false, "clear assets",
|
||||||
"clear assets",
|
"clear assets",
|
||||||
"Clear the asset cache", HandleClearAssets);
|
"Clear the asset cache", HandleClearAssets);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "force update",
|
m_console.Commands.AddCommand("region", false, "force update",
|
||||||
"force update",
|
"force update",
|
||||||
"Force the update of all objects on clients",
|
"Force the update of all objects on clients",
|
||||||
HandleForceUpdate);
|
HandleForceUpdate);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "debug packet",
|
m_console.Commands.AddCommand("region", false, "debug packet",
|
||||||
"debug packet <level>",
|
"debug packet <level>",
|
||||||
"Turn on packet debugging", Debug);
|
"Turn on packet debugging", Debug);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "debug scene",
|
m_console.Commands.AddCommand("region", false, "debug scene",
|
||||||
"debug scene <cripting> <collisions> <physics>",
|
"debug scene <cripting> <collisions> <physics>",
|
||||||
"Turn on scene debugging", Debug);
|
"Turn on scene debugging", Debug);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "change region",
|
m_console.Commands.AddCommand("region", false, "change region",
|
||||||
"change region <region name>",
|
"change region <region name>",
|
||||||
"Change current console region", ChangeSelectedRegion);
|
"Change current console region", ChangeSelectedRegion);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "save xml",
|
m_console.Commands.AddCommand("region", false, "save xml",
|
||||||
"save xml",
|
"save xml",
|
||||||
"Save a region's data in XML format", SaveXml);
|
"Save a region's data in XML format", SaveXml);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "save xml2",
|
m_console.Commands.AddCommand("region", false, "save xml2",
|
||||||
"save xml2",
|
"save xml2",
|
||||||
"Save a region's data in XML2 format", SaveXml2);
|
"Save a region's data in XML2 format", SaveXml2);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "load xml",
|
m_console.Commands.AddCommand("region", false, "load xml",
|
||||||
"load xml [-newIDs [<x> <y> <z>]]",
|
"load xml [-newIDs [<x> <y> <z>]]",
|
||||||
"Load a region's data from XML format", LoadXml);
|
"Load a region's data from XML format", LoadXml);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "load xml2",
|
m_console.Commands.AddCommand("region", false, "load xml2",
|
||||||
"load xml2",
|
"load xml2",
|
||||||
"Load a region's data from XML2 format", LoadXml2);
|
"Load a region's data from XML2 format", LoadXml2);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "save prims xml2",
|
m_console.Commands.AddCommand("region", false, "save prims xml2",
|
||||||
"save prims xml2 [<prim name> <file name>]",
|
"save prims xml2 [<prim name> <file name>]",
|
||||||
"Save named prim to XML2", SavePrimsXml2);
|
"Save named prim to XML2", SavePrimsXml2);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "load oar",
|
m_console.Commands.AddCommand("region", false, "load oar",
|
||||||
"load oar <oar name>",
|
"load oar <oar name>",
|
||||||
"Load a region's data from OAR archive", LoadOar);
|
"Load a region's data from OAR archive", LoadOar);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "save oar",
|
m_console.Commands.AddCommand("region", false, "save oar",
|
||||||
"save oar <oar name>",
|
"save oar <oar name>",
|
||||||
"Save a region's data to an OAR archive",
|
"Save a region's data to an OAR archive",
|
||||||
"More information on forthcoming options here soon", SaveOar);
|
"More information on forthcoming options here soon", SaveOar);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "edit scale",
|
m_console.Commands.AddCommand("region", false, "edit scale",
|
||||||
"edit scale <name> <x> <y> <z>",
|
"edit scale <name> <x> <y> <z>",
|
||||||
"Change the scale of a named prim", HandleEditScale);
|
"Change the scale of a named prim", HandleEditScale);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "kick user",
|
m_console.Commands.AddCommand("region", false, "kick user",
|
||||||
"kick user <first> <last>",
|
"kick user <first> <last>",
|
||||||
"Kick a user off the simulator", KickUserCommand);
|
"Kick a user off the simulator", KickUserCommand);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "show assets",
|
m_console.Commands.AddCommand("region", false, "show assets",
|
||||||
"show assets",
|
"show assets",
|
||||||
"Show asset data", HandleShow);
|
"Show asset data", HandleShow);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "show users",
|
m_console.Commands.AddCommand("region", false, "show users",
|
||||||
"show users [full]",
|
"show users [full]",
|
||||||
"Show user data", HandleShow);
|
"Show user data", HandleShow);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "show users full",
|
m_console.Commands.AddCommand("region", false, "show users full",
|
||||||
"show users full",
|
"show users full",
|
||||||
String.Empty, HandleShow);
|
String.Empty, HandleShow);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "show modules",
|
m_console.Commands.AddCommand("region", false, "show modules",
|
||||||
"show modules",
|
"show modules",
|
||||||
"Show module data", HandleShow);
|
"Show module data", HandleShow);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "show regions",
|
m_console.Commands.AddCommand("region", false, "show regions",
|
||||||
"show regions",
|
"show regions",
|
||||||
"Show region data", HandleShow);
|
"Show region data", HandleShow);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "show queues",
|
m_console.Commands.AddCommand("region", false, "show queues",
|
||||||
"show queues",
|
"show queues",
|
||||||
"Show queue data", HandleShow);
|
"Show queue data", HandleShow);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "backup",
|
m_console.Commands.AddCommand("region", false, "backup",
|
||||||
"backup",
|
"backup",
|
||||||
"Persist objects to the database now", RunCommand);
|
"Persist objects to the database now", RunCommand);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "create region",
|
m_console.Commands.AddCommand("region", false, "create region",
|
||||||
"create region",
|
"create region",
|
||||||
"Create a new region", HandleCreateRegion);
|
"Create a new region", HandleCreateRegion);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "login enable",
|
m_console.Commands.AddCommand("region", false, "login enable",
|
||||||
"login enable",
|
"login enable",
|
||||||
"Enable logins to the simulator", HandleLoginEnable);
|
"Enable logins to the simulator", HandleLoginEnable);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "login disable",
|
m_console.Commands.AddCommand("region", false, "login disable",
|
||||||
"login disable",
|
"login disable",
|
||||||
"Disable logins to the simulator", HandleLoginDisable);
|
"Disable logins to the simulator", HandleLoginDisable);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "login status",
|
m_console.Commands.AddCommand("region", false, "login status",
|
||||||
"login status",
|
"login status",
|
||||||
"Display status of logins", HandleLoginStatus);
|
"Display status of logins", HandleLoginStatus);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "restart",
|
m_console.Commands.AddCommand("region", false, "restart",
|
||||||
"restart",
|
"restart",
|
||||||
"Restart all sims in this instance", RunCommand);
|
"Restart all sims in this instance", RunCommand);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "config set",
|
m_console.Commands.AddCommand("region", false, "config set",
|
||||||
"config set <section> <field> <value>",
|
"config set <section> <field> <value>",
|
||||||
"Set a config option", HandleConfig);
|
"Set a config option", HandleConfig);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "config get",
|
m_console.Commands.AddCommand("region", false, "config get",
|
||||||
"config get <section> <field>",
|
"config get <section> <field>",
|
||||||
"Read a config option", HandleConfig);
|
"Read a config option", HandleConfig);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "config save",
|
m_console.Commands.AddCommand("region", false, "config save",
|
||||||
"config save",
|
"config save",
|
||||||
"Save current configuration", HandleConfig);
|
"Save current configuration", HandleConfig);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "command-script",
|
m_console.Commands.AddCommand("region", false, "command-script",
|
||||||
"command-script <script>",
|
"command-script <script>",
|
||||||
"Run a command script from file", RunCommand);
|
"Run a command script from file", RunCommand);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "remove-region",
|
m_console.Commands.AddCommand("region", false, "remove-region",
|
||||||
"remove-region <name>",
|
"remove-region <name>",
|
||||||
"Remove a region from this simulator", RunCommand);
|
"Remove a region from this simulator", RunCommand);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "delete-region",
|
m_console.Commands.AddCommand("region", false, "delete-region",
|
||||||
"delete-region <name>",
|
"delete-region <name>",
|
||||||
"Delete a region from disk", RunCommand);
|
"Delete a region from disk", RunCommand);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "predecode-j2k",
|
m_console.Commands.AddCommand("region", false, "predecode-j2k",
|
||||||
"predecode-j2k [<num threads>]>",
|
"predecode-j2k [<num threads>]>",
|
||||||
"Precache assets,decode j2k layerdata", RunCommand);
|
"Precache assets,decode j2k layerdata", RunCommand);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "modules list",
|
m_console.Commands.AddCommand("region", false, "modules list",
|
||||||
"modules list",
|
"modules list",
|
||||||
"List modules", HandleModules);
|
"List modules", HandleModules);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "modules load",
|
m_console.Commands.AddCommand("region", false, "modules load",
|
||||||
"modules load <name>",
|
"modules load <name>",
|
||||||
"Load a module", HandleModules);
|
"Load a module", HandleModules);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "modules unload",
|
m_console.Commands.AddCommand("region", false, "modules unload",
|
||||||
"modules unload <name>",
|
"modules unload <name>",
|
||||||
"Unload a module", HandleModules);
|
"Unload a module", HandleModules);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "Add-InventoryHost",
|
m_console.Commands.AddCommand("region", false, "Add-InventoryHost",
|
||||||
"Add-InventoryHost <host>",
|
"Add-InventoryHost <host>",
|
||||||
String.Empty, RunCommand);
|
String.Empty, RunCommand);
|
||||||
|
|
||||||
if (ConfigurationSettings.Standalone)
|
if (ConfigurationSettings.Standalone)
|
||||||
{
|
{
|
||||||
m_console.Commands.AddCommand("region", false, "create user",
|
m_console.Commands.AddCommand("region", false, "create user",
|
||||||
"create user [<first> [<last> [<pass> [<x> <y> [<email>]]]]]",
|
"create user [<first> [<last> [<pass> [<x> <y> [<email>]]]]]",
|
||||||
"Create a new user", HandleCreateUser);
|
"Create a new user", HandleCreateUser);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "reset user password",
|
m_console.Commands.AddCommand("region", false, "reset user password",
|
||||||
"reset user password [<first> [<last> [<password>]]]",
|
"reset user password [<first> [<last> [<password>]]]",
|
||||||
"Reset a user password", HandleResetUserPassword);
|
"Reset a user password", HandleResetUserPassword);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -321,15 +323,16 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
RegionInfo regionInfo = m_sceneManager.GetRegionInfo(presence.RegionHandle);
|
RegionInfo regionInfo = m_sceneManager.GetRegionInfo(presence.RegionHandle);
|
||||||
|
|
||||||
if (presence.Firstname.ToLower().Contains(cmdparams[2].ToLower()) && presence.Lastname.ToLower().Contains(cmdparams[3].ToLower()))
|
if (presence.Firstname.ToLower().Contains(cmdparams[2].ToLower()) &&
|
||||||
|
presence.Lastname.ToLower().Contains(cmdparams[3].ToLower()))
|
||||||
{
|
{
|
||||||
m_console.Notice(
|
m_console.Notice(
|
||||||
String.Format(
|
String.Format(
|
||||||
"Kicking user: {0,-16}{1,-16}{2,-37} in region: {3,-16}",
|
"Kicking user: {0,-16}{1,-16}{2,-37} in region: {3,-16}",
|
||||||
presence.Firstname,
|
presence.Firstname,
|
||||||
presence.Lastname,
|
presence.Lastname,
|
||||||
presence.UUID,
|
presence.UUID,
|
||||||
regionInfo.RegionName));
|
regionInfo.RegionName));
|
||||||
|
|
||||||
presence.Scene.IncomingCloseAgent(presence.UUID);
|
presence.Scene.IncomingCloseAgent(presence.UUID);
|
||||||
}
|
}
|
||||||
|
@ -458,9 +461,9 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// IConfig c = DefaultConfig().Configs[cmdparams[1]];
|
// IConfig c = DefaultConfig().Configs[cmdparams[1]];
|
||||||
// if (c == null)
|
// if (c == null)
|
||||||
// c = DefaultConfig().AddConfig(cmdparams[1]);
|
// c = DefaultConfig().AddConfig(cmdparams[1]);
|
||||||
IConfig c;
|
IConfig c;
|
||||||
IConfigSource source = new IniConfigSource();
|
IConfigSource source = new IniConfigSource();
|
||||||
c = source.AddConfig(cmdparams[1]);
|
c = source.AddConfig(cmdparams[1]);
|
||||||
|
@ -471,7 +474,7 @@ namespace OpenSim
|
||||||
m_config.Source.Merge(source);
|
m_config.Source.Merge(source);
|
||||||
|
|
||||||
m_console.Error(n, n + " " + n + " " + cmdparams[1] + " " + cmdparams[2] + " " +
|
m_console.Error(n, n + " " + n + " " + cmdparams[1] + " " + cmdparams[2] + " " +
|
||||||
_value);
|
_value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -541,7 +544,6 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
foreach (Scene s in new ArrayList(m_sceneManager.Scenes))
|
foreach (Scene s in new ArrayList(m_sceneManager.Scenes))
|
||||||
{
|
{
|
||||||
|
|
||||||
m_console.Notice("Loading module: " + cmdparams[1]);
|
m_console.Notice("Loading module: " + cmdparams[1]);
|
||||||
m_moduleLoader.LoadRegionModules(cmdparams[1], s);
|
m_moduleLoader.LoadRegionModules(cmdparams[1], s);
|
||||||
}
|
}
|
||||||
|
@ -569,58 +571,58 @@ namespace OpenSim
|
||||||
|
|
||||||
switch (command)
|
switch (command)
|
||||||
{
|
{
|
||||||
case "command-script":
|
case "command-script":
|
||||||
if (cmdparams.Length > 0)
|
if (cmdparams.Length > 0)
|
||||||
{
|
{
|
||||||
RunCommandScript(cmdparams[0]);
|
RunCommandScript(cmdparams[0]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "backup":
|
case "backup":
|
||||||
m_sceneManager.BackupCurrentScene();
|
m_sceneManager.BackupCurrentScene();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "remove-region":
|
case "remove-region":
|
||||||
string regRemoveName = CombineParams(cmdparams, 0);
|
string regRemoveName = CombineParams(cmdparams, 0);
|
||||||
|
|
||||||
Scene removeScene;
|
Scene removeScene;
|
||||||
if (m_sceneManager.TryGetScene(regRemoveName, out removeScene))
|
if (m_sceneManager.TryGetScene(regRemoveName, out removeScene))
|
||||||
RemoveRegion(removeScene, false);
|
RemoveRegion(removeScene, false);
|
||||||
else
|
else
|
||||||
m_console.Error("no region with that name");
|
m_console.Error("no region with that name");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "delete-region":
|
case "delete-region":
|
||||||
string regDeleteName = CombineParams(cmdparams, 0);
|
string regDeleteName = CombineParams(cmdparams, 0);
|
||||||
|
|
||||||
Scene killScene;
|
Scene killScene;
|
||||||
if (m_sceneManager.TryGetScene(regDeleteName, out killScene))
|
if (m_sceneManager.TryGetScene(regDeleteName, out killScene))
|
||||||
RemoveRegion(killScene, true);
|
RemoveRegion(killScene, true);
|
||||||
else
|
else
|
||||||
m_console.Error("no region with that name");
|
m_console.Error("no region with that name");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "restart":
|
case "restart":
|
||||||
m_sceneManager.RestartCurrentScene();
|
m_sceneManager.RestartCurrentScene();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "Add-InventoryHost":
|
case "Add-InventoryHost":
|
||||||
if (cmdparams.Length > 0)
|
if (cmdparams.Length > 0)
|
||||||
{
|
{
|
||||||
m_commsManager.AddInventoryService(cmdparams[0]);
|
m_commsManager.AddInventoryService(cmdparams[0]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "predecode-j2k":
|
case "predecode-j2k":
|
||||||
if (cmdparams.Length > 0)
|
if (cmdparams.Length > 0)
|
||||||
{
|
{
|
||||||
m_sceneManager.CacheJ2kDecode(Convert.ToInt32(cmdparams[0]));
|
m_sceneManager.CacheJ2kDecode(Convert.ToInt32(cmdparams[0]));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_sceneManager.CacheJ2kDecode(1);
|
m_sceneManager.CacheJ2kDecode(1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -743,7 +745,7 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
|
|
||||||
// see BaseOpenSimServer
|
// see BaseOpenSimServer
|
||||||
override public void HandleShow(string mod, string[] cmd)
|
public override void HandleShow(string mod, string[] cmd)
|
||||||
{
|
{
|
||||||
base.HandleShow(mod, cmd);
|
base.HandleShow(mod, cmd);
|
||||||
|
|
||||||
|
@ -812,11 +814,12 @@ namespace OpenSim
|
||||||
case "regions":
|
case "regions":
|
||||||
m_sceneManager.ForEachScene(
|
m_sceneManager.ForEachScene(
|
||||||
delegate(Scene scene)
|
delegate(Scene scene)
|
||||||
{
|
{
|
||||||
m_console.Notice("Region Name: " + scene.RegionInfo.RegionName + " , Region XLoc: " +
|
m_console.Notice("Region Name: " + scene.RegionInfo.RegionName + " , Region XLoc: " +
|
||||||
scene.RegionInfo.RegionLocX + " , Region YLoc: " +
|
scene.RegionInfo.RegionLocX + " , Region YLoc: " +
|
||||||
scene.RegionInfo.RegionLocY + " , Region Port: " + scene.RegionInfo.InternalEndPoint.Port.ToString());
|
scene.RegionInfo.RegionLocY + " , Region Port: " +
|
||||||
});
|
scene.RegionInfo.InternalEndPoint.Port.ToString());
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "queues":
|
case "queues":
|
||||||
|
@ -842,16 +845,16 @@ namespace OpenSim
|
||||||
(IStatsCollector) client;
|
(IStatsCollector) client;
|
||||||
|
|
||||||
report = report + string.Format("{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7}\n",
|
report = report + string.Format("{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7}\n",
|
||||||
"Send",
|
"Send",
|
||||||
"In",
|
"In",
|
||||||
"Out",
|
"Out",
|
||||||
"Resend",
|
"Resend",
|
||||||
"Land",
|
"Land",
|
||||||
"Wind",
|
"Wind",
|
||||||
"Cloud",
|
"Cloud",
|
||||||
"Task",
|
"Task",
|
||||||
"Texture",
|
"Texture",
|
||||||
"Asset");
|
"Asset");
|
||||||
report = report + stats.Report() +
|
report = report + stats.Report() +
|
||||||
"\n\n";
|
"\n\n";
|
||||||
}
|
}
|
||||||
|
@ -878,7 +881,7 @@ namespace OpenSim
|
||||||
firstName = MainConsole.Instance.CmdPrompt("First name", "Default");
|
firstName = MainConsole.Instance.CmdPrompt("First name", "Default");
|
||||||
else firstName = cmdparams[2];
|
else firstName = cmdparams[2];
|
||||||
|
|
||||||
if ( cmdparams.Length < 4 )
|
if (cmdparams.Length < 4)
|
||||||
lastName = MainConsole.Instance.CmdPrompt("Last name", "User");
|
lastName = MainConsole.Instance.CmdPrompt("Last name", "User");
|
||||||
else lastName = cmdparams[3];
|
else lastName = cmdparams[3];
|
||||||
|
|
||||||
|
@ -886,11 +889,11 @@ namespace OpenSim
|
||||||
password = MainConsole.Instance.PasswdPrompt("Password");
|
password = MainConsole.Instance.PasswdPrompt("Password");
|
||||||
else password = cmdparams[4];
|
else password = cmdparams[4];
|
||||||
|
|
||||||
if ( cmdparams.Length < 6 )
|
if (cmdparams.Length < 6)
|
||||||
regX = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region X", regX.ToString()));
|
regX = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region X", regX.ToString()));
|
||||||
else regX = Convert.ToUInt32(cmdparams[5]);
|
else regX = Convert.ToUInt32(cmdparams[5]);
|
||||||
|
|
||||||
if ( cmdparams.Length < 7 )
|
if (cmdparams.Length < 7)
|
||||||
regY = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region Y", regY.ToString()));
|
regY = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region Y", regY.ToString()));
|
||||||
else regY = Convert.ToUInt32(cmdparams[6]);
|
else regY = Convert.ToUInt32(cmdparams[6]);
|
||||||
|
|
||||||
|
@ -922,11 +925,11 @@ namespace OpenSim
|
||||||
firstName = MainConsole.Instance.CmdPrompt("First name");
|
firstName = MainConsole.Instance.CmdPrompt("First name");
|
||||||
else firstName = cmdparams[3];
|
else firstName = cmdparams[3];
|
||||||
|
|
||||||
if ( cmdparams.Length < 5 )
|
if (cmdparams.Length < 5)
|
||||||
lastName = MainConsole.Instance.CmdPrompt("Last name");
|
lastName = MainConsole.Instance.CmdPrompt("Last name");
|
||||||
else lastName = cmdparams[4];
|
else lastName = cmdparams[4];
|
||||||
|
|
||||||
if ( cmdparams.Length < 6 )
|
if (cmdparams.Length < 6)
|
||||||
newPassword = MainConsole.Instance.PasswdPrompt("New password");
|
newPassword = MainConsole.Instance.PasswdPrompt("New password");
|
||||||
else newPassword = cmdparams[5];
|
else newPassword = cmdparams[5];
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,8 @@ namespace OpenSim
|
||||||
m_log.Info("====================================================================");
|
m_log.Info("====================================================================");
|
||||||
m_log.Info("========================= STARTING OPENSIM =========================");
|
m_log.Info("========================= STARTING OPENSIM =========================");
|
||||||
m_log.Info("====================================================================");
|
m_log.Info("====================================================================");
|
||||||
m_log.InfoFormat("[OPENSIM MAIN]: Running in background {0} mode", ConfigurationSettings.Standalone ? "sandbox" : "grid");
|
m_log.InfoFormat("[OPENSIM MAIN]: Running in background {0} mode",
|
||||||
|
ConfigurationSettings.Standalone ? "sandbox" : "grid");
|
||||||
|
|
||||||
base.Startup();
|
base.Startup();
|
||||||
|
|
||||||
|
|
|
@ -41,8 +41,6 @@ using OpenSim.Framework.Console;
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Framework.Statistics;
|
using OpenSim.Framework.Statistics;
|
||||||
using OpenSim.Region.ClientStack;
|
using OpenSim.Region.ClientStack;
|
||||||
using OpenSim.Region.Communications.Local;
|
|
||||||
using OpenSim.Region.Communications.OGS1;
|
|
||||||
using OpenSim.Region.Framework;
|
using OpenSim.Region.Framework;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
@ -60,7 +58,7 @@ namespace OpenSim
|
||||||
// These are the names of the plugin-points extended by this
|
// These are the names of the plugin-points extended by this
|
||||||
// class during system startup.
|
// class during system startup.
|
||||||
|
|
||||||
private const string PLUGIN_ASSET_CACHE = "/OpenSim/AssetCache";
|
private const string PLUGIN_ASSET_CACHE = "/OpenSim/AssetCache";
|
||||||
private const string PLUGIN_ASSET_SERVER_CLIENT = "/OpenSim/AssetClient";
|
private const string PLUGIN_ASSET_SERVER_CLIENT = "/OpenSim/AssetClient";
|
||||||
|
|
||||||
protected string proxyUrl;
|
protected string proxyUrl;
|
||||||
|
@ -83,6 +81,7 @@ namespace OpenSim
|
||||||
get { return m_configSettings; }
|
get { return m_configSettings; }
|
||||||
set { m_configSettings = value; }
|
set { m_configSettings = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ConfigSettings m_configSettings;
|
protected ConfigSettings m_configSettings;
|
||||||
|
|
||||||
protected ConfigurationLoader m_configLoader;
|
protected ConfigurationLoader m_configLoader;
|
||||||
|
@ -101,12 +100,14 @@ namespace OpenSim
|
||||||
get { return m_config; }
|
get { return m_config; }
|
||||||
set { m_config = value; }
|
set { m_config = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
protected OpenSimConfigSource m_config;
|
protected OpenSimConfigSource m_config;
|
||||||
|
|
||||||
public List<IClientNetworkServer> ClientServers
|
public List<IClientNetworkServer> ClientServers
|
||||||
{
|
{
|
||||||
get { return m_clientServers; }
|
get { return m_clientServers; }
|
||||||
}
|
}
|
||||||
|
|
||||||
protected List<IClientNetworkServer> m_clientServers = new List<IClientNetworkServer>();
|
protected List<IClientNetworkServer> m_clientServers = new List<IClientNetworkServer>();
|
||||||
|
|
||||||
public new BaseHttpServer HttpServer
|
public new BaseHttpServer HttpServer
|
||||||
|
@ -124,6 +125,7 @@ namespace OpenSim
|
||||||
get { return m_moduleLoader; }
|
get { return m_moduleLoader; }
|
||||||
set { m_moduleLoader = value; }
|
set { m_moduleLoader = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ModuleLoader m_moduleLoader;
|
protected ModuleLoader m_moduleLoader;
|
||||||
|
|
||||||
protected IRegistryCore m_applicationRegistry = new RegistryCore();
|
protected IRegistryCore m_applicationRegistry = new RegistryCore();
|
||||||
|
@ -216,14 +218,14 @@ namespace OpenSim
|
||||||
foreach (string topic in topics)
|
foreach (string topic in topics)
|
||||||
{
|
{
|
||||||
m_console.Commands.AddCommand("plugin", false, "help " + topic,
|
m_console.Commands.AddCommand("plugin", false, "help " + topic,
|
||||||
"help " + topic,
|
"help " + topic,
|
||||||
"Get help on plugin command '" + topic + "'",
|
"Get help on plugin command '" + topic + "'",
|
||||||
HandleCommanderHelp);
|
HandleCommanderHelp);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("plugin", false, topic,
|
m_console.Commands.AddCommand("plugin", false, topic,
|
||||||
topic,
|
topic,
|
||||||
"Execute subcommand for plugin '" + topic + "'",
|
"Execute subcommand for plugin '" + topic + "'",
|
||||||
null);
|
null);
|
||||||
|
|
||||||
ICommander commander = null;
|
ICommander commander = null;
|
||||||
|
|
||||||
|
@ -241,9 +243,9 @@ namespace OpenSim
|
||||||
foreach (string command in commander.Commands.Keys)
|
foreach (string command in commander.Commands.Keys)
|
||||||
{
|
{
|
||||||
m_console.Commands.AddCommand(topic, false,
|
m_console.Commands.AddCommand(topic, false,
|
||||||
topic + " " + command,
|
topic + " " + command,
|
||||||
topic + " " + commander.Commands[command].ShortHelp(),
|
topic + " " + commander.Commands[command].ShortHelp(),
|
||||||
String.Empty, HandleCommanderCommand);
|
String.Empty, HandleCommanderCommand);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -288,80 +290,82 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
LegacyAssetClientPluginInitialiser linit = null;
|
LegacyAssetClientPluginInitialiser linit = null;
|
||||||
CryptoAssetClientPluginInitialiser cinit = null;
|
CryptoAssetClientPluginInitialiser cinit = null;
|
||||||
AssetClientPluginInitialiser init = null;
|
AssetClientPluginInitialiser init = null;
|
||||||
|
|
||||||
IAssetServer assetServer = null;
|
IAssetServer assetServer = null;
|
||||||
string mode = m_configSettings.AssetStorage;
|
string mode = m_configSettings.AssetStorage;
|
||||||
|
|
||||||
if (mode == null | mode == String.Empty)
|
if (mode == null | mode == String.Empty)
|
||||||
mode = "default";
|
mode = "default";
|
||||||
|
|
||||||
// If "default" is specified, then the value is adjusted
|
// If "default" is specified, then the value is adjusted
|
||||||
// according to whether or not the server is running in
|
// according to whether or not the server is running in
|
||||||
// standalone mode.
|
// standalone mode.
|
||||||
if (mode.ToLower() == "default")
|
if (mode.ToLower() == "default")
|
||||||
{
|
{
|
||||||
if (m_configSettings.Standalone == false)
|
if (m_configSettings.Standalone == false)
|
||||||
mode = "grid";
|
mode = "grid";
|
||||||
else
|
else
|
||||||
mode = "local";
|
mode = "local";
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (mode.ToLower())
|
switch (mode.ToLower())
|
||||||
{
|
{
|
||||||
// If grid is specified then the grid server is chose regardless
|
// If grid is specified then the grid server is chose regardless
|
||||||
// of whether the server is standalone.
|
// of whether the server is standalone.
|
||||||
case "grid" :
|
case "grid":
|
||||||
linit = new LegacyAssetClientPluginInitialiser(m_configSettings, m_networkServersInfo.AssetURL);
|
linit = new LegacyAssetClientPluginInitialiser(m_configSettings, m_networkServersInfo.AssetURL);
|
||||||
assetServer = loadAssetServer("Grid", linit);
|
assetServer = loadAssetServer("Grid", linit);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// If cryptogrid is specified then the cryptogrid server is chose regardless
|
// If cryptogrid is specified then the cryptogrid server is chose regardless
|
||||||
// of whether the server is standalone.
|
// of whether the server is standalone.
|
||||||
case "cryptogrid" :
|
case "cryptogrid":
|
||||||
cinit = new CryptoAssetClientPluginInitialiser(m_configSettings, m_networkServersInfo.AssetURL,
|
cinit = new CryptoAssetClientPluginInitialiser(m_configSettings, m_networkServersInfo.AssetURL,
|
||||||
Environment.CurrentDirectory, true);
|
Environment.CurrentDirectory, true);
|
||||||
assetServer = loadAssetServer("Crypto", cinit);
|
assetServer = loadAssetServer("Crypto", cinit);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// If cryptogrid_eou is specified then the cryptogrid_eou server is chose regardless
|
// If cryptogrid_eou is specified then the cryptogrid_eou server is chose regardless
|
||||||
// of whether the server is standalone.
|
// of whether the server is standalone.
|
||||||
case "cryptogrid_eou" :
|
case "cryptogrid_eou":
|
||||||
cinit = new CryptoAssetClientPluginInitialiser(m_configSettings, m_networkServersInfo.AssetURL,
|
cinit = new CryptoAssetClientPluginInitialiser(m_configSettings, m_networkServersInfo.AssetURL,
|
||||||
Environment.CurrentDirectory, false);
|
Environment.CurrentDirectory, false);
|
||||||
assetServer = loadAssetServer("Crypto", cinit);
|
assetServer = loadAssetServer("Crypto", cinit);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// If file is specified then the file server is chose regardless
|
// If file is specified then the file server is chose regardless
|
||||||
// of whether the server is standalone.
|
// of whether the server is standalone.
|
||||||
case "file" :
|
case "file":
|
||||||
linit = new LegacyAssetClientPluginInitialiser(m_configSettings, m_networkServersInfo.AssetURL);
|
linit = new LegacyAssetClientPluginInitialiser(m_configSettings, m_networkServersInfo.AssetURL);
|
||||||
assetServer = loadAssetServer("File", linit);
|
assetServer = loadAssetServer("File", linit);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// If local is specified then we're going to use the local SQL server
|
// If local is specified then we're going to use the local SQL server
|
||||||
// implementation. We drop through, because that will be the fallback
|
// implementation. We drop through, because that will be the fallback
|
||||||
// for the following default clause too.
|
// for the following default clause too.
|
||||||
case "local" :
|
case "local":
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// If the asset_database value is none of the previously mentioned strings, then we
|
// If the asset_database value is none of the previously mentioned strings, then we
|
||||||
// try to load a turnkey plugin that matches this value. If not we drop through to
|
// try to load a turnkey plugin that matches this value. If not we drop through to
|
||||||
// a local default.
|
// a local default.
|
||||||
default :
|
default:
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
init = new AssetClientPluginInitialiser(m_configSettings);
|
init = new AssetClientPluginInitialiser(m_configSettings);
|
||||||
assetServer = loadAssetServer(m_configSettings.AssetStorage, init);
|
assetServer = loadAssetServer(m_configSettings.AssetStorage, init);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
catch {}
|
catch
|
||||||
|
{
|
||||||
|
}
|
||||||
m_log.Info("[OPENSIMBASE] Default assetserver will be used");
|
m_log.Info("[OPENSIMBASE] Default assetserver will be used");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Open the local SQL-based database asset server
|
// Open the local SQL-based database asset server
|
||||||
if (assetServer == null)
|
if (assetServer == null)
|
||||||
{
|
{
|
||||||
init = new AssetClientPluginInitialiser(m_configSettings);
|
init = new AssetClientPluginInitialiser(m_configSettings);
|
||||||
SQLAssetServer sqlAssetServer = (SQLAssetServer) loadAssetServer("SQL", init);
|
SQLAssetServer sqlAssetServer = (SQLAssetServer) loadAssetServer("SQL", init);
|
||||||
|
@ -426,7 +430,7 @@ namespace OpenSim
|
||||||
loader.AddFilter(PLUGIN_ASSET_CACHE, new PluginProviderFilter(m_configSettings.AssetCache));
|
loader.AddFilter(PLUGIN_ASSET_CACHE, new PluginProviderFilter(m_configSettings.AssetCache));
|
||||||
|
|
||||||
loader.Load(PLUGIN_ASSET_CACHE);
|
loader.Load(PLUGIN_ASSET_CACHE);
|
||||||
if (loader.Plugins.Count > 0)
|
if (loader.Plugins.Count > 0)
|
||||||
assetCache = (IAssetCache) loader.Plugins[0];
|
assetCache = (IAssetCache) loader.Plugins[0];
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
@ -624,7 +628,7 @@ namespace OpenSim
|
||||||
//if (!IPAddress.TryParse(regionInfo.InternalEndPoint, out listenIP))
|
//if (!IPAddress.TryParse(regionInfo.InternalEndPoint, out listenIP))
|
||||||
// listenIP = IPAddress.Parse("0.0.0.0");
|
// listenIP = IPAddress.Parse("0.0.0.0");
|
||||||
|
|
||||||
uint port = (uint)regionInfo.InternalEndPoint.Port;
|
uint port = (uint) regionInfo.InternalEndPoint.Port;
|
||||||
|
|
||||||
if (m_autoCreateClientStack)
|
if (m_autoCreateClientStack)
|
||||||
{
|
{
|
||||||
|
@ -638,7 +642,7 @@ namespace OpenSim
|
||||||
clientServer = null;
|
clientServer = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
regionInfo.InternalEndPoint.Port = (int)port;
|
regionInfo.InternalEndPoint.Port = (int) port;
|
||||||
|
|
||||||
Scene scene = CreateScene(regionInfo, m_storageManager, circuitManager);
|
Scene scene = CreateScene(regionInfo, m_storageManager, circuitManager);
|
||||||
|
|
||||||
|
@ -651,7 +655,7 @@ namespace OpenSim
|
||||||
|
|
||||||
scene.PhysicsScene = GetPhysicsScene(scene.RegionInfo.RegionName);
|
scene.PhysicsScene = GetPhysicsScene(scene.RegionInfo.RegionName);
|
||||||
scene.PhysicsScene.SetTerrain(scene.Heightmap.GetFloatsSerialised());
|
scene.PhysicsScene.SetTerrain(scene.Heightmap.GetFloatsSerialised());
|
||||||
scene.PhysicsScene.SetWaterLevel((float)regionInfo.RegionSettings.WaterHeight);
|
scene.PhysicsScene.SetWaterLevel((float) regionInfo.RegionSettings.WaterHeight);
|
||||||
|
|
||||||
// TODO: Remove this cruft once MasterAvatar is fully deprecated
|
// TODO: Remove this cruft once MasterAvatar is fully deprecated
|
||||||
//Master Avatar Setup
|
//Master Avatar Setup
|
||||||
|
@ -687,7 +691,8 @@ namespace OpenSim
|
||||||
|
|
||||||
protected override StorageManager CreateStorageManager()
|
protected override StorageManager CreateStorageManager()
|
||||||
{
|
{
|
||||||
return CreateStorageManager(m_configSettings.StorageConnectionString, m_configSettings.EstateConnectionString);
|
return
|
||||||
|
CreateStorageManager(m_configSettings.StorageConnectionString, m_configSettings.EstateConnectionString);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected StorageManager CreateStorageManager(string connectionstring, string estateconnectionstring)
|
protected StorageManager CreateStorageManager(string connectionstring, string estateconnectionstring)
|
||||||
|
@ -840,12 +845,12 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
if (Source is IniConfigSource)
|
if (Source is IniConfigSource)
|
||||||
{
|
{
|
||||||
IniConfigSource iniCon = (IniConfigSource)Source;
|
IniConfigSource iniCon = (IniConfigSource) Source;
|
||||||
iniCon.Save(path);
|
iniCon.Save(path);
|
||||||
}
|
}
|
||||||
else if (Source is XmlConfigSource)
|
else if (Source is XmlConfigSource)
|
||||||
{
|
{
|
||||||
XmlConfigSource xmlCon = (XmlConfigSource)Source;
|
XmlConfigSource xmlCon = (XmlConfigSource) Source;
|
||||||
xmlCon.Save(path);
|
xmlCon.Save(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue