* Cleanup and CCC (Code Convention Conformance)
parent
63a5a01945
commit
91a096dca6
|
@ -51,7 +51,8 @@ namespace OpenSim
|
|||
public static void Main(string[] args)
|
||||
{
|
||||
// First line
|
||||
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
|
||||
AppDomain.CurrentDomain.UnhandledException +=
|
||||
new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
|
||||
|
||||
XmlConfigurator.Configure();
|
||||
|
||||
|
|
|
@ -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_networkServersInfo = networkInfo = new NetworkServersInfo();
|
||||
|
@ -79,7 +80,8 @@ namespace OpenSim
|
|||
{
|
||||
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))
|
||||
{
|
||||
|
@ -103,7 +105,8 @@ namespace OpenSim
|
|||
|
||||
// Check for .INI file (either default or name passed on command
|
||||
// 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);
|
||||
|
||||
if (!iniFileExists)
|
||||
|
|
|
@ -33,11 +33,7 @@ using log4net;
|
|||
using Nini.Config;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Communications;
|
||||
using OpenSim.Framework.Communications.Cache;
|
||||
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.Scenes;
|
||||
using OpenSim.Region.Framework.Scenes.Hypergrid;
|
||||
|
@ -68,9 +64,11 @@ namespace OpenSim
|
|||
|
||||
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-region", "link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>] <cr>", "Link a hypergrid region", RunCommand);
|
||||
|
||||
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-region",
|
||||
"link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>] <cr>",
|
||||
"Link a hypergrid region", RunCommand);
|
||||
}
|
||||
|
||||
protected override Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager,
|
||||
|
@ -85,7 +83,7 @@ namespace OpenSim
|
|||
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);
|
||||
if (cmdparams.Count < 1)
|
||||
|
@ -128,7 +126,8 @@ namespace OpenSim
|
|||
}
|
||||
|
||||
if (cmdparams[2].Contains(":"))
|
||||
{ // New format
|
||||
{
|
||||
// New format
|
||||
uint xloc, yloc;
|
||||
string mapName;
|
||||
try
|
||||
|
@ -154,7 +153,8 @@ namespace OpenSim
|
|||
HGHyperlink.TryLinkRegionToCoords(m_sceneManager.CurrentOrFirstScene, null, mapName, xloc, yloc);
|
||||
}
|
||||
else
|
||||
{ // old format
|
||||
{
|
||||
// old format
|
||||
RegionInfo regInfo;
|
||||
uint xloc, yloc;
|
||||
uint externalPort;
|
||||
|
@ -259,9 +259,13 @@ namespace OpenSim
|
|||
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", "");
|
||||
}
|
||||
|
|
|
@ -38,7 +38,12 @@ namespace OpenSim
|
|||
public class ApplicationPluginInitialiser : PluginInitialiserBase
|
||||
{
|
||||
private OpenSimBase server;
|
||||
public ApplicationPluginInitialiser (OpenSimBase s) { server = s; }
|
||||
|
||||
public ApplicationPluginInitialiser(OpenSimBase s)
|
||||
{
|
||||
server = s;
|
||||
}
|
||||
|
||||
public override void Initialise(IPlugin plugin)
|
||||
{
|
||||
IApplicationPlugin p = plugin as IApplicationPlugin;
|
||||
|
|
|
@ -85,7 +85,8 @@ namespace OpenSim
|
|||
m_log.Info("====================================================================");
|
||||
m_log.Info("========================= STARTING OPENSIM =========================");
|
||||
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());
|
||||
// http://msdn.microsoft.com/en-us/library/bb384202.aspx
|
||||
//GCSettings.LatencyMode = GCLatencyMode.Batch;
|
||||
|
@ -122,7 +123,8 @@ namespace OpenSim
|
|||
|
||||
// For now, start at the 'root' level by default
|
||||
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
|
||||
ChangeSelectedRegion("region", new string[] {"change", "region", "root"});
|
||||
}
|
||||
|
@ -321,7 +323,8 @@ namespace OpenSim
|
|||
{
|
||||
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(
|
||||
String.Format(
|
||||
|
@ -541,7 +544,6 @@ namespace OpenSim
|
|||
{
|
||||
foreach (Scene s in new ArrayList(m_sceneManager.Scenes))
|
||||
{
|
||||
|
||||
m_console.Notice("Loading module: " + cmdparams[1]);
|
||||
m_moduleLoader.LoadRegionModules(cmdparams[1], s);
|
||||
}
|
||||
|
@ -743,7 +745,7 @@ namespace OpenSim
|
|||
}
|
||||
|
||||
// see BaseOpenSimServer
|
||||
override public void HandleShow(string mod, string[] cmd)
|
||||
public override void HandleShow(string mod, string[] cmd)
|
||||
{
|
||||
base.HandleShow(mod, cmd);
|
||||
|
||||
|
@ -815,7 +817,8 @@ namespace OpenSim
|
|||
{
|
||||
m_console.Notice("Region Name: " + scene.RegionInfo.RegionName + " , Region XLoc: " +
|
||||
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;
|
||||
|
||||
|
|
|
@ -56,7 +56,8 @@ namespace OpenSim
|
|||
m_log.Info("====================================================================");
|
||||
m_log.Info("========================= STARTING OPENSIM =========================");
|
||||
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();
|
||||
|
||||
|
|
|
@ -41,8 +41,6 @@ using OpenSim.Framework.Console;
|
|||
using OpenSim.Framework.Servers;
|
||||
using OpenSim.Framework.Statistics;
|
||||
using OpenSim.Region.ClientStack;
|
||||
using OpenSim.Region.Communications.Local;
|
||||
using OpenSim.Region.Communications.OGS1;
|
||||
using OpenSim.Region.Framework;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
|
@ -83,6 +81,7 @@ namespace OpenSim
|
|||
get { return m_configSettings; }
|
||||
set { m_configSettings = value; }
|
||||
}
|
||||
|
||||
protected ConfigSettings m_configSettings;
|
||||
|
||||
protected ConfigurationLoader m_configLoader;
|
||||
|
@ -101,12 +100,14 @@ namespace OpenSim
|
|||
get { return m_config; }
|
||||
set { m_config = value; }
|
||||
}
|
||||
|
||||
protected OpenSimConfigSource m_config;
|
||||
|
||||
public List<IClientNetworkServer> ClientServers
|
||||
{
|
||||
get { return m_clientServers; }
|
||||
}
|
||||
|
||||
protected List<IClientNetworkServer> m_clientServers = new List<IClientNetworkServer>();
|
||||
|
||||
public new BaseHttpServer HttpServer
|
||||
|
@ -124,6 +125,7 @@ namespace OpenSim
|
|||
get { return m_moduleLoader; }
|
||||
set { m_moduleLoader = value; }
|
||||
}
|
||||
|
||||
protected ModuleLoader m_moduleLoader;
|
||||
|
||||
protected IRegistryCore m_applicationRegistry = new RegistryCore();
|
||||
|
@ -355,7 +357,9 @@ namespace OpenSim
|
|||
assetServer = loadAssetServer(m_configSettings.AssetStorage, init);
|
||||
break;
|
||||
}
|
||||
catch {}
|
||||
catch
|
||||
{
|
||||
}
|
||||
m_log.Info("[OPENSIMBASE] Default assetserver will be used");
|
||||
break;
|
||||
}
|
||||
|
@ -687,7 +691,8 @@ namespace OpenSim
|
|||
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue