several changes to simulatorfeatures, special url ones. Centralize those on scene gridinfo. Do host and dns checks, etc. Grid can override local settings, but currently same old mess. Grid login and info fecth should happen before loading anything in scene, specially modules

This commit is contained in:
UbitUmarov
2020-11-12 00:30:20 +00:00
parent ddc1083383
commit 20695be8cd
5 changed files with 308 additions and 71 deletions

View File

@@ -406,6 +406,13 @@ namespace OpenSim
/// <returns></returns>
public void CreateRegion(RegionInfo regionInfo, bool portadd_flag, bool do_post_init, out IScene mscene)
{
IRegionModulesController controller;
if (!ApplicationRegistry.TryGet(out controller))
{
m_log.Fatal("REGIONMODULES]: The new RegionModulesController is missing...");
Environment.Exit(0);
}
int port = regionInfo.InternalEndPoint.Port;
// set initial RegionID to originRegionID in RegionInfo. (it needs for loding prims)
@@ -429,7 +436,6 @@ namespace OpenSim
regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName +
":" + regionInfo.HttpPort.ToString() + "/";
regionInfo.osSecret = m_osSecret;
if ((proxyUrl.Length > 0) && (portadd_flag))
@@ -442,16 +448,9 @@ namespace OpenSim
Scene scene = SetupScene(regionInfo, proxyOffset, Config);
m_log.Info("[MODULES]: Loading Region's modules (old style)");
// Use this in the future, the line above will be deprecated soon
m_log.Info("[REGIONMODULES]: Loading Region's modules (new style)");
IRegionModulesController controller;
if (ApplicationRegistry.TryGet(out controller))
{
m_log.Info("[REGIONMODULES]: Loading Region's modules");
if (controller != null)
controller.AddRegionToModules(scene);
}
else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing...");
if (m_securePermissionsLoading)
{
@@ -520,8 +519,7 @@ namespace OpenSim
scene.SnmpService.BootInfo("Grid Registration done", scene);
}
// We need to do this after we've initialized the
// scripting engines.
// We need to do this after we've initialized the scripting engines.
scene.CreateScriptInstances();
if (scene.SnmpService != null)