mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 09:16:28 +08:00
fix merge
This commit is contained in:
@@ -86,9 +86,9 @@ namespace OpenSim
|
||||
if (logConfigFile != String.Empty)
|
||||
{
|
||||
XmlConfigurator.Configure(new System.IO.FileInfo(logConfigFile));
|
||||
m_log.InfoFormat("[OPENSIM MAIN]: configured log4net using \"{0}\" as configuration file",
|
||||
m_log.InfoFormat("[OPENSIM MAIN]: configured log4net using \"{0}\" as configuration file",
|
||||
logConfigFile);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
XmlConfigurator.Configure();
|
||||
@@ -104,22 +104,22 @@ namespace OpenSim
|
||||
"[OPENSIM MAIN]: Environment variable MONO_THREADS_PER_CPU is {0}", monoThreadsPerCpu ?? "unset");
|
||||
|
||||
// Verify the Threadpool allocates or uses enough worker and IO completion threads
|
||||
// .NET 2.0, workerthreads default to 50 * numcores
|
||||
// .NET 3.0, workerthreads defaults to 250 * numcores
|
||||
// .NET 4.0, workerthreads are dynamic based on bitness and OS resources
|
||||
// .NET 2.0, workerthreads default to 50 * numcores
|
||||
// .NET 3.0, workerthreads defaults to 250 * numcores
|
||||
// .NET 4.0, workerthreads are dynamic based on bitness and OS resources
|
||||
// Max IO Completion threads are 1000 on all 3 CLRs
|
||||
//
|
||||
// Mono 2.10.9 to at least Mono 3.1, workerthreads default to 100 * numcores, iocp threads to 4 * numcores
|
||||
int workerThreadsMin = 500;
|
||||
int workerThreadsMax = 1000; // may need further adjustment to match other CLR
|
||||
int iocpThreadsMin = 1000;
|
||||
int iocpThreadsMax = 2000; // may need further adjustment to match other CLR
|
||||
int workerThreadsMin = 500;
|
||||
int workerThreadsMax = 1000; // may need further adjustment to match other CLR
|
||||
int iocpThreadsMin = 1000;
|
||||
int iocpThreadsMax = 2000; // may need further adjustment to match other CLR
|
||||
|
||||
{
|
||||
int currentMinWorkerThreads, currentMinIocpThreads;
|
||||
System.Threading.ThreadPool.GetMinThreads(out currentMinWorkerThreads, out currentMinIocpThreads);
|
||||
m_log.InfoFormat(
|
||||
"[OPENSIM MAIN]: Runtime gave us {0} min worker threads and {1} min IOCP threads",
|
||||
"[OPENSIM MAIN]: Runtime gave us {0} min worker threads and {1} min IOCP threads",
|
||||
currentMinWorkerThreads, currentMinIocpThreads);
|
||||
}
|
||||
|
||||
@@ -138,30 +138,30 @@ namespace OpenSim
|
||||
m_log.InfoFormat("[OPENSIM MAIN]: Limiting max worker threads to {0}",workerThreads);
|
||||
}
|
||||
|
||||
// Increase the number of IOCP threads available.
|
||||
// Mono defaults to a tragically low number (24 on 6-core / 8GB Fedora 17)
|
||||
if (iocpThreads < iocpThreadsMin)
|
||||
// Increase the number of IOCP threads available.
|
||||
// Mono defaults to a tragically low number (24 on 6-core / 8GB Fedora 17)
|
||||
if (iocpThreads < iocpThreadsMin)
|
||||
{
|
||||
iocpThreads = iocpThreadsMin;
|
||||
m_log.InfoFormat("[OPENSIM MAIN]: Bumping up max IOCP threads to {0}",iocpThreads);
|
||||
}
|
||||
// Make sure we don't overallocate IOCP threads and thrash system resources
|
||||
// Make sure we don't overallocate IOCP threads and thrash system resources
|
||||
if ( iocpThreads > iocpThreadsMax )
|
||||
{
|
||||
iocpThreads = iocpThreadsMax;
|
||||
m_log.InfoFormat("[OPENSIM MAIN]: Limiting max IOCP completion threads to {0}",iocpThreads);
|
||||
}
|
||||
// set the resulting worker and IO completion thread counts back to ThreadPool
|
||||
// set the resulting worker and IO completion thread counts back to ThreadPool
|
||||
if ( System.Threading.ThreadPool.SetMaxThreads(workerThreads, iocpThreads) )
|
||||
{
|
||||
m_log.InfoFormat(
|
||||
{
|
||||
m_log.InfoFormat(
|
||||
"[OPENSIM MAIN]: Threadpool set to {0} max worker threads and {1} max IOCP threads",
|
||||
workerThreads, iocpThreads);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.Warn("[OPENSIM MAIN]: Threadpool reconfiguration failed, runtime defaults still in effect.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.Warn("[OPENSIM MAIN]: Threadpool reconfiguration failed, runtime defaults still in effect.");
|
||||
}
|
||||
|
||||
// Check if the system is compatible with OpenSimulator.
|
||||
// Ensures that the minimum system requirements are met
|
||||
@@ -179,7 +179,7 @@ namespace OpenSim
|
||||
Culture.SetCurrentCulture();
|
||||
|
||||
// Validate that the user has the most basic configuration done
|
||||
// If not, offer to do the most basic configuration for them warning them along the way of the importance of
|
||||
// If not, offer to do the most basic configuration for them warning them along the way of the importance of
|
||||
// reading these files.
|
||||
/*
|
||||
m_log.Info("Checking for reguired configuration...\n");
|
||||
@@ -188,13 +188,13 @@ namespace OpenSim
|
||||
|| (File.Exists(Path.Combine(Util.configDir(), "opensim.ini")))
|
||||
|| (File.Exists(Path.Combine(Util.configDir(), "openSim.ini")))
|
||||
|| (File.Exists(Path.Combine(Util.configDir(), "Opensim.ini")));
|
||||
|
||||
|
||||
bool StanaloneCommon_ProperCased = File.Exists(Path.Combine(Path.Combine(Util.configDir(), "config-include"), "StandaloneCommon.ini"));
|
||||
bool StanaloneCommon_lowercased = File.Exists(Path.Combine(Path.Combine(Util.configDir(), "config-include"), "standalonecommon.ini"));
|
||||
bool GridCommon_ProperCased = File.Exists(Path.Combine(Path.Combine(Util.configDir(), "config-include"), "GridCommon.ini"));
|
||||
bool GridCommon_lowerCased = File.Exists(Path.Combine(Path.Combine(Util.configDir(), "config-include"), "gridcommon.ini"));
|
||||
|
||||
if ((OpenSim_Ini)
|
||||
if ((OpenSim_Ini)
|
||||
&& (
|
||||
(StanaloneCommon_ProperCased
|
||||
|| StanaloneCommon_lowercased
|
||||
@@ -212,7 +212,7 @@ namespace OpenSim
|
||||
"yes");
|
||||
if (resp == "yes")
|
||||
{
|
||||
|
||||
|
||||
if (!(OpenSim_Ini))
|
||||
{
|
||||
try
|
||||
@@ -312,7 +312,7 @@ namespace OpenSim
|
||||
m_saveCrashDumps = configSource.Configs["Startup"].GetBoolean("save_crashes", false);
|
||||
|
||||
// load Crash directory config
|
||||
m_crashDir = configSource.Configs["Startup"].GetString("crash_dir", m_crashDir);
|
||||
m_crashDir = configSource.Configs["Startup"].GetString("crash_dir", m_crashDir);
|
||||
|
||||
if (background)
|
||||
{
|
||||
@@ -320,9 +320,9 @@ namespace OpenSim
|
||||
m_sim.Startup();
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
m_sim = new OpenSim(configSource);
|
||||
|
||||
|
||||
m_sim.Startup();
|
||||
|
||||
while (true)
|
||||
|
||||
@@ -43,10 +43,10 @@ namespace OpenSim
|
||||
public class ConfigurationLoader
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Various Config settings the region needs to start
|
||||
/// Physics Engine, Mesh Engine, GridMode, PhysicsPrim allowed, Neighbor,
|
||||
/// Physics Engine, Mesh Engine, GridMode, PhysicsPrim allowed, Neighbor,
|
||||
/// StorageDLL, Storage Connection String, Estate connection String, Client Stack
|
||||
/// Standalone settings.
|
||||
/// </summary>
|
||||
@@ -188,7 +188,7 @@ namespace OpenSim
|
||||
{
|
||||
iniFileExists = true;
|
||||
AddIncludes(overrideConfig, overrideSources);
|
||||
}
|
||||
}
|
||||
}
|
||||
m_config.Source.Merge(overrideConfig.Source);
|
||||
}
|
||||
@@ -198,7 +198,7 @@ namespace OpenSim
|
||||
{
|
||||
m_log.FatalFormat("[CONFIG]: Could not load any configuration");
|
||||
Environment.Exit(1);
|
||||
}
|
||||
}
|
||||
else if (!iniFileExists)
|
||||
{
|
||||
m_log.FatalFormat("[CONFIG]: Could not load any configuration");
|
||||
@@ -257,14 +257,14 @@ namespace OpenSim
|
||||
string path = Path.Combine(basepath, chunkWithoutWildcards);
|
||||
path = Path.GetFullPath(path) + chunkWithWildcards;
|
||||
string[] paths = Util.Glob(path);
|
||||
|
||||
|
||||
// If the include path contains no wildcards, then warn the user that it wasn't found.
|
||||
if (wildcardIndex == -1 && paths.Length == 0)
|
||||
{
|
||||
m_log.WarnFormat("[CONFIG]: Could not find include file {0}", path);
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
foreach (string p in paths)
|
||||
{
|
||||
if (!sources.Contains(p))
|
||||
@@ -377,7 +377,7 @@ namespace OpenSim
|
||||
m_configSettings.PhysicsEngine = startupConfig.GetString("physics");
|
||||
m_configSettings.MeshEngineName = startupConfig.GetString("meshing");
|
||||
|
||||
m_configSettings.ClientstackDll
|
||||
m_configSettings.ClientstackDll
|
||||
= startupConfig.GetString("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll");
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace OpenSim
|
||||
void Initialise(OpenSimBase openSim);
|
||||
|
||||
/// <summary>
|
||||
/// Called when the application loading is completed
|
||||
/// Called when the application loading is completed
|
||||
/// </summary>
|
||||
void PostInitialise();
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ namespace OpenSim
|
||||
{
|
||||
// Wait for a signal to be delivered
|
||||
int index = Mono.Unix.UnixSignal.WaitAny (signals, -1);
|
||||
|
||||
|
||||
//Mono.Unix.Native.Signum signal = signals [index].Signum;
|
||||
MainConsole.Instance.RunCommand("shutdown");
|
||||
}
|
||||
@@ -273,17 +273,17 @@ namespace OpenSim
|
||||
|
||||
m_console.Commands.AddCommand("General", false, "change region",
|
||||
"change region <region name>",
|
||||
"Change current console region",
|
||||
"Change current console region",
|
||||
ChangeSelectedRegion);
|
||||
|
||||
m_console.Commands.AddCommand("Archiving", false, "save xml",
|
||||
"save xml [<file name>]",
|
||||
"Save a region's data in XML format",
|
||||
"Save a region's data in XML format",
|
||||
SaveXml);
|
||||
|
||||
m_console.Commands.AddCommand("Archiving", false, "save xml2",
|
||||
"save xml2 [<file name>]",
|
||||
"Save a region's data in XML2 format",
|
||||
"Save a region's data in XML2 format",
|
||||
SaveXml2);
|
||||
|
||||
m_console.Commands.AddCommand("Archiving", false, "load xml",
|
||||
@@ -293,12 +293,12 @@ namespace OpenSim
|
||||
|
||||
m_console.Commands.AddCommand("Archiving", false, "load xml2",
|
||||
"load xml2 [<file name>]",
|
||||
"Load a region's data from XML2 format",
|
||||
"Load a region's data from XML2 format",
|
||||
LoadXml2);
|
||||
|
||||
m_console.Commands.AddCommand("Archiving", false, "save prims xml2",
|
||||
"save prims xml2 [<prim name> <file name>]",
|
||||
"Save named prim to XML2",
|
||||
"Save named prim to XML2",
|
||||
SavePrimsXml2);
|
||||
|
||||
m_console.Commands.AddCommand("Archiving", false, "load oar",
|
||||
@@ -352,7 +352,7 @@ namespace OpenSim
|
||||
|
||||
m_console.Commands.AddCommand("Objects", false, "edit scale",
|
||||
"edit scale <name> <x> <y> <z>",
|
||||
"Change the scale of a named prim",
|
||||
"Change the scale of a named prim",
|
||||
HandleEditScale);
|
||||
|
||||
m_console.Commands.AddCommand("Objects", false, "rotate scene",
|
||||
@@ -379,44 +379,44 @@ namespace OpenSim
|
||||
|
||||
m_console.Commands.AddCommand("Users", false, "show users",
|
||||
"show users [full]",
|
||||
"Show user data for users currently on the region",
|
||||
"Show user data for users currently on the region",
|
||||
"Without the 'full' option, only users actually on the region are shown."
|
||||
+ " With the 'full' option child agents of users in neighbouring regions are also shown.",
|
||||
HandleShow);
|
||||
|
||||
m_console.Commands.AddCommand("Comms", false, "show connections",
|
||||
"show connections",
|
||||
"Show connection data",
|
||||
"Show connection data",
|
||||
HandleShow);
|
||||
|
||||
m_console.Commands.AddCommand("Comms", false, "show circuits",
|
||||
"show circuits",
|
||||
"Show agent circuit data",
|
||||
"Show agent circuit data",
|
||||
HandleShow);
|
||||
|
||||
m_console.Commands.AddCommand("Comms", false, "show pending-objects",
|
||||
"show pending-objects",
|
||||
"Show # of objects on the pending queues of all scene viewers",
|
||||
"Show # of objects on the pending queues of all scene viewers",
|
||||
HandleShow);
|
||||
|
||||
m_console.Commands.AddCommand("General", false, "show modules",
|
||||
"show modules",
|
||||
"Show module data",
|
||||
"Show module data",
|
||||
HandleShow);
|
||||
|
||||
m_console.Commands.AddCommand("Regions", false, "show regions",
|
||||
"show regions",
|
||||
"Show region data",
|
||||
"Show region data",
|
||||
HandleShow);
|
||||
|
||||
|
||||
m_console.Commands.AddCommand("Regions", false, "show ratings",
|
||||
"show ratings",
|
||||
"Show rating data",
|
||||
"Show rating data",
|
||||
HandleShow);
|
||||
|
||||
m_console.Commands.AddCommand("Objects", false, "backup",
|
||||
"backup",
|
||||
"Persist currently unsaved object changes immediately instead of waiting for the normal persistence call.",
|
||||
"Persist currently unsaved object changes immediately instead of waiting for the normal persistence call.",
|
||||
RunCommand);
|
||||
|
||||
m_console.Commands.AddCommand("Regions", false, "create region",
|
||||
@@ -430,22 +430,22 @@ namespace OpenSim
|
||||
|
||||
m_console.Commands.AddCommand("Regions", false, "restart",
|
||||
"restart",
|
||||
"Restart the currently selected region(s) in this instance",
|
||||
"Restart the currently selected region(s) in this instance",
|
||||
RunCommand);
|
||||
|
||||
m_console.Commands.AddCommand("General", false, "command-script",
|
||||
"command-script <script>",
|
||||
"Run a command script from file",
|
||||
"Run a command script from file",
|
||||
RunCommand);
|
||||
|
||||
m_console.Commands.AddCommand("Regions", false, "remove-region",
|
||||
"remove-region <name>",
|
||||
"Remove a region from this simulator",
|
||||
"Remove a region from this simulator",
|
||||
RunCommand);
|
||||
|
||||
m_console.Commands.AddCommand("Regions", false, "delete-region",
|
||||
"delete-region <name>",
|
||||
"Delete a region from disk",
|
||||
"Delete a region from disk",
|
||||
RunCommand);
|
||||
|
||||
m_console.Commands.AddCommand("Estates", false, "estate create",
|
||||
@@ -476,7 +476,7 @@ namespace OpenSim
|
||||
{
|
||||
RunCommandScript(m_shutdownCommandsFile);
|
||||
}
|
||||
|
||||
|
||||
base.ShutdownSpecific();
|
||||
}
|
||||
|
||||
@@ -515,7 +515,7 @@ namespace OpenSim
|
||||
private void KickUserCommand(string module, string[] cmdparams)
|
||||
{
|
||||
bool force = false;
|
||||
|
||||
|
||||
OptionSet options = new OptionSet().Add("f|force", delegate (string v) { force = v != null; });
|
||||
|
||||
List<string> mainParams = options.Parse(cmdparams);
|
||||
@@ -612,7 +612,7 @@ namespace OpenSim
|
||||
MainConsole.Instance.Output(usage);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
float angle = (float)(Convert.ToSingle(args[2]) / 180.0 * Math.PI);
|
||||
OpenMetaverse.Quaternion rot = OpenMetaverse.Quaternion.CreateFromAxisAngle(0, 0, 1, angle);
|
||||
|
||||
@@ -624,7 +624,7 @@ namespace OpenSim
|
||||
|
||||
Vector3 center = new Vector3(centerX, centerY, 0.0f);
|
||||
|
||||
SceneManager.ForEachSelectedScene(delegate(Scene scene)
|
||||
SceneManager.ForEachSelectedScene(delegate(Scene scene)
|
||||
{
|
||||
scene.ForEachSOG(delegate(SceneObjectGroup sog)
|
||||
{
|
||||
@@ -776,8 +776,8 @@ namespace OpenSim
|
||||
CreateRegion(regInfo, true, out scene);
|
||||
|
||||
if (changed)
|
||||
m_estateDataService.StoreEstateSettings(regInfo.EstateSettings);
|
||||
|
||||
m_estateDataService.StoreEstateSettings(regInfo.EstateSettings);
|
||||
|
||||
scene.Start();
|
||||
}
|
||||
|
||||
@@ -880,8 +880,8 @@ namespace OpenSim
|
||||
protected override void HandleRestartRegion(RegionInfo whichRegion)
|
||||
{
|
||||
base.HandleRestartRegion(whichRegion);
|
||||
|
||||
// Where we are restarting multiple scenes at once, a previous call to RefreshPrompt may have set the
|
||||
|
||||
// Where we are restarting multiple scenes at once, a previous call to RefreshPrompt may have set the
|
||||
// m_console.ConsoleScene to null (indicating all scenes).
|
||||
if (m_console.ConsoleScene != null && whichRegion.RegionName == ((Scene)m_console.ConsoleScene).Name)
|
||||
SceneManager.TrySetCurrentScene(whichRegion.RegionName);
|
||||
@@ -914,7 +914,7 @@ namespace OpenSim
|
||||
{
|
||||
agents = SceneManager.GetCurrentSceneAvatars();
|
||||
}
|
||||
|
||||
|
||||
MainConsole.Instance.Output(String.Format("\nAgents connected: {0}\n", agents.Count));
|
||||
|
||||
MainConsole.Instance.Output(
|
||||
@@ -960,7 +960,7 @@ namespace OpenSim
|
||||
|
||||
case "modules":
|
||||
SceneManager.ForEachSelectedScene(
|
||||
scene =>
|
||||
scene =>
|
||||
{
|
||||
MainConsole.Instance.OutputFormat("Loaded region modules in {0} are:", scene.Name);
|
||||
|
||||
@@ -996,16 +996,16 @@ namespace OpenSim
|
||||
cdt.AddColumn("Ready?", 6);
|
||||
cdt.AddColumn("Estate", ConsoleDisplayUtil.EstateNameSize);
|
||||
SceneManager.ForEachScene(
|
||||
scene =>
|
||||
{
|
||||
RegionInfo ri = scene.RegionInfo;
|
||||
scene =>
|
||||
{
|
||||
RegionInfo ri = scene.RegionInfo;
|
||||
cdt.AddRow(
|
||||
ri.RegionName,
|
||||
ri.RegionID,
|
||||
string.Format("{0},{1}", ri.RegionLocX, ri.RegionLocY),
|
||||
ri.RegionName,
|
||||
ri.RegionID,
|
||||
string.Format("{0},{1}", ri.RegionLocX, ri.RegionLocY),
|
||||
string.Format("{0}x{1}", ri.RegionSizeX, ri.RegionSizeY),
|
||||
ri.InternalEndPoint.Port,
|
||||
scene.Ready ? "Yes" : "No",
|
||||
ri.InternalEndPoint.Port,
|
||||
scene.Ready ? "Yes" : "No",
|
||||
ri.EstateSettings.EstateName);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace OpenSim
|
||||
|
||||
protected string proxyUrl;
|
||||
protected int proxyOffset = 0;
|
||||
|
||||
|
||||
public string userStatsURI = String.Empty;
|
||||
public string managedStatsURI = String.Empty;
|
||||
|
||||
@@ -125,7 +125,7 @@ namespace OpenSim
|
||||
{
|
||||
get { return m_EnvConfigSource; }
|
||||
}
|
||||
|
||||
|
||||
public uint HttpServerPort
|
||||
{
|
||||
get { return m_httpServerPort; }
|
||||
@@ -210,7 +210,7 @@ namespace OpenSim
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs startup specific to the region server, including initialization of the scene
|
||||
/// Performs startup specific to the region server, including initialization of the scene
|
||||
/// such as loading configuration from disk.
|
||||
/// </summary>
|
||||
protected override void StartupSpecific()
|
||||
@@ -228,7 +228,7 @@ namespace OpenSim
|
||||
string pidFile = startupConfig.GetString("PIDFile", String.Empty);
|
||||
if (pidFile != String.Empty)
|
||||
CreatePIDFile(pidFile);
|
||||
|
||||
|
||||
userStatsURI = startupConfig.GetString("Stats_URI", String.Empty);
|
||||
|
||||
m_securePermissionsLoading = startupConfig.GetBoolean("SecurePermissionsLoading", true);
|
||||
@@ -254,11 +254,11 @@ namespace OpenSim
|
||||
if (m_simulationDataService == null)
|
||||
throw new Exception(
|
||||
string.Format(
|
||||
"Could not load an ISimulationDataService implementation from {0}, as configured in the LocalServiceModule parameter of the [SimulationDataStore] config section.",
|
||||
"Could not load an ISimulationDataService implementation from {0}, as configured in the LocalServiceModule parameter of the [SimulationDataStore] config section.",
|
||||
module));
|
||||
|
||||
// Load the estate data service
|
||||
module = Util.GetConfigVarFromSections<string>(Config, "LocalServiceModule", new string[]{"EstateDataStore", "EstateService"}, String.Empty);
|
||||
module = Util.GetConfigVarFromSections<string>(Config, "LocalServiceModule", new string[]{"EstateDataStore", "EstateService"}, String.Empty);
|
||||
if (String.IsNullOrEmpty(module))
|
||||
throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [EstateDataStore] or [EstateService] section");
|
||||
|
||||
@@ -268,7 +268,7 @@ namespace OpenSim
|
||||
if (m_estateDataService == null)
|
||||
throw new Exception(
|
||||
string.Format(
|
||||
"Could not load an IEstateDataService implementation from {0}, as configured in the LocalServiceModule parameter of the [EstateDataStore] config section.",
|
||||
"Could not load an IEstateDataService implementation from {0}, as configured in the LocalServiceModule parameter of the [EstateDataStore] config section.",
|
||||
module));
|
||||
}
|
||||
|
||||
@@ -427,9 +427,9 @@ namespace OpenSim
|
||||
regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName +
|
||||
":" + regionInfo.HttpPort.ToString() + "/";
|
||||
|
||||
|
||||
|
||||
regionInfo.osSecret = m_osSecret;
|
||||
|
||||
|
||||
if ((proxyUrl.Length > 0) && (portadd_flag))
|
||||
{
|
||||
// set proxy url to RegionInfo
|
||||
@@ -483,17 +483,17 @@ namespace OpenSim
|
||||
|
||||
// Prims have to be loaded after module configuration since some modules may be invoked during the load
|
||||
scene.LoadPrimsFromStorage(regionInfo.originRegionID);
|
||||
|
||||
|
||||
// TODO : Try setting resource for region xstats here on scene
|
||||
MainServer.Instance.AddStreamHandler(new RegionStatsHandler(regionInfo));
|
||||
|
||||
|
||||
scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID);
|
||||
scene.EventManager.TriggerParcelPrimCountUpdate();
|
||||
|
||||
if (scene.SnmpService != null)
|
||||
{
|
||||
scene.SnmpService.BootInfo("Grid Registration in progress", scene);
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
@@ -502,7 +502,7 @@ namespace OpenSim
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}",
|
||||
"[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}",
|
||||
e.Message, e.StackTrace);
|
||||
|
||||
if (scene.SnmpService != null)
|
||||
@@ -630,7 +630,7 @@ namespace OpenSim
|
||||
|
||||
if (rawEstateOwnerUuid == null)
|
||||
rawEstateOwnerUuid = MainConsole.Instance.CmdPrompt("User ID", UUID.Random().ToString());
|
||||
|
||||
|
||||
UUID estateOwnerUuid = UUID.Zero;
|
||||
if (!UUID.TryParse(rawEstateOwnerUuid, out estateOwnerUuid))
|
||||
{
|
||||
@@ -693,7 +693,7 @@ namespace OpenSim
|
||||
scene.DeleteAllSceneObjects();
|
||||
SceneManager.CloseScene(scene);
|
||||
//ShutdownClientServer(scene.RegionInfo);
|
||||
|
||||
|
||||
if (!cleanup)
|
||||
return;
|
||||
|
||||
@@ -755,7 +755,7 @@ namespace OpenSim
|
||||
SceneManager.CloseScene(scene);
|
||||
//ShutdownClientServer(scene.RegionInfo);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Remove a region from the simulator without deleting it permanently.
|
||||
/// </summary>
|
||||
@@ -767,7 +767,7 @@ namespace OpenSim
|
||||
if (SceneManager.TryGetScene(name, out target))
|
||||
CloseRegion(target);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Create a scene and its initial base structures.
|
||||
/// </summary>
|
||||
@@ -803,15 +803,15 @@ namespace OpenSim
|
||||
IEstateDataService estateDataService, AgentCircuitManager circuitManager)
|
||||
{
|
||||
return new Scene(
|
||||
regionInfo, circuitManager,
|
||||
regionInfo, circuitManager,
|
||||
simDataService, estateDataService,
|
||||
Config, m_version);
|
||||
}
|
||||
|
||||
|
||||
protected virtual void HandleRestartRegion(RegionInfo whichRegion)
|
||||
{
|
||||
m_log.InfoFormat(
|
||||
"[OPENSIM]: Got restart signal from SceneManager for region {0} ({1},{2})",
|
||||
"[OPENSIM]: Got restart signal from SceneManager for region {0} ({1},{2})",
|
||||
whichRegion.RegionName, whichRegion.RegionLocX, whichRegion.RegionLocY);
|
||||
|
||||
//ShutdownClientServer(whichRegion);
|
||||
@@ -846,18 +846,18 @@ namespace OpenSim
|
||||
|
||||
/// <summary>
|
||||
/// Handler to supply the current extended status of this sim
|
||||
/// Sends the statistical data in a json serialization
|
||||
/// Sends the statistical data in a json serialization
|
||||
/// </summary>
|
||||
public class XSimStatusHandler : BaseStreamHandler
|
||||
{
|
||||
OpenSimBase m_opensim;
|
||||
|
||||
public XSimStatusHandler(OpenSimBase sim)
|
||||
|
||||
public XSimStatusHandler(OpenSimBase sim)
|
||||
: base("GET", "/" + Util.SHA1Hash(sim.osSecret), "XSimStatus", "Simulator XStatus")
|
||||
{
|
||||
m_opensim = sim;
|
||||
}
|
||||
|
||||
|
||||
protected override byte[] ProcessRequest(string path, Stream request,
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
@@ -872,20 +872,20 @@ namespace OpenSim
|
||||
|
||||
/// <summary>
|
||||
/// Handler to supply the current extended status of this sim to a user configured URI
|
||||
/// Sends the statistical data in a json serialization
|
||||
/// If the request contains a key, "callback" the response will be wrappend in the
|
||||
/// Sends the statistical data in a json serialization
|
||||
/// If the request contains a key, "callback" the response will be wrappend in the
|
||||
/// associated value for jsonp used with ajax/javascript
|
||||
/// </summary>
|
||||
protected class UXSimStatusHandler : BaseStreamHandler
|
||||
{
|
||||
OpenSimBase m_opensim;
|
||||
|
||||
|
||||
public UXSimStatusHandler(OpenSimBase sim)
|
||||
: base("GET", "/" + sim.userStatsURI, "UXSimStatus", "Simulator UXStatus")
|
||||
{
|
||||
m_opensim = sim;
|
||||
m_opensim = sim;
|
||||
}
|
||||
|
||||
|
||||
protected override byte[] ProcessRequest(string path, Stream request,
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
@@ -978,7 +978,7 @@ namespace OpenSim
|
||||
{
|
||||
regionnum = SceneManager.Scenes.Count;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Create an estate with an initial region.
|
||||
/// </summary>
|
||||
@@ -1005,19 +1005,19 @@ namespace OpenSim
|
||||
MainConsole.Instance.OutputFormat("An estate named {0} already exists. Please try again.", newName);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
regInfo.EstateSettings.EstateName = newName;
|
||||
|
||||
|
||||
// FIXME: Later on, the scene constructor will reload the estate settings no matter what.
|
||||
// Therefore, we need to do an initial save here otherwise the new estate name will be reset
|
||||
// back to the default. The reloading of estate settings by scene could be eliminated if it
|
||||
// knows that the passed in settings in RegionInfo are already valid. Also, it might be
|
||||
// knows that the passed in settings in RegionInfo are already valid. Also, it might be
|
||||
// possible to eliminate some additional later saves made by callers of this method.
|
||||
EstateDataService.StoreEstateSettings(regInfo.EstateSettings);
|
||||
|
||||
EstateDataService.StoreEstateSettings(regInfo.EstateSettings);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Load the estate information for the provided RegionInfo object.
|
||||
/// </summary>
|
||||
@@ -1031,8 +1031,8 @@ namespace OpenSim
|
||||
return false; // estate info in the database did not change
|
||||
|
||||
m_log.WarnFormat("[ESTATE] Region {0} is not part of an estate.", regInfo.RegionName);
|
||||
|
||||
List<EstateSettings> estates = EstateDataService.LoadEstateSettingsAll();
|
||||
|
||||
List<EstateSettings> estates = EstateDataService.LoadEstateSettingsAll();
|
||||
Dictionary<string, EstateSettings> estatesByName = new Dictionary<string, EstateSettings>();
|
||||
|
||||
foreach (EstateSettings estate in estates)
|
||||
@@ -1130,7 +1130,7 @@ namespace OpenSim
|
||||
return true; // need to update the database
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class OpenSimConfigSource
|
||||
{
|
||||
public IConfigSource Source;
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using Mono.Addins;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenSim")]
|
||||
@@ -15,8 +15,8 @@ using Mono.Addins;
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
@@ -26,7 +26,7 @@ using Mono.Addins;
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
|
||||
@@ -58,9 +58,9 @@ namespace OpenSim
|
||||
public NetworkServersInfo NetServersInfo { get { return m_networkServersInfo; } }
|
||||
public ISimulationDataService SimulationDataService { get { return m_simulationDataService; } }
|
||||
public IEstateDataService EstateDataService { get { return m_estateDataService; } }
|
||||
|
||||
|
||||
protected abstract void Initialize();
|
||||
|
||||
|
||||
protected abstract Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService, IEstateDataService estateDataService, AgentCircuitManager circuitManager);
|
||||
|
||||
protected override void StartupSpecific()
|
||||
@@ -125,7 +125,7 @@ namespace OpenSim
|
||||
MainServer.AddHttpServer(server);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
base.StartupSpecific();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user