parent
743e336bf3
commit
4920e52f11
|
@ -150,8 +150,7 @@ namespace OpenSim
|
|||
set { m_moduleLoader = value; }
|
||||
}
|
||||
|
||||
public OpenSimBase(IConfigSource configSource)
|
||||
: base()
|
||||
public OpenSimBase(IConfigSource configSource) : base()
|
||||
{
|
||||
IConfig startupConfig = configSource.Configs["Startup"];
|
||||
|
||||
|
@ -179,7 +178,7 @@ namespace OpenSim
|
|||
{
|
||||
if (File.Exists("OpenSim.xml"))
|
||||
{
|
||||
//check for a xml config file
|
||||
// check for a xml config file
|
||||
Application.iniFilePath = "OpenSim.xml";
|
||||
m_config.Source = new XmlConfigSource();
|
||||
m_config.Source.Merge(new XmlConfigSource(Application.iniFilePath));
|
||||
|
@ -187,9 +186,7 @@ namespace OpenSim
|
|||
}
|
||||
else
|
||||
{
|
||||
//Application.iniFilePath = "OpenSim.xml";
|
||||
// m_config.ConfigSource = new XmlConfigSource();
|
||||
// no default config files, so set default values, and save it
|
||||
// using OpenSim.ini instead
|
||||
m_config.Source.Merge(DefaultConfig());
|
||||
m_config.Source.Merge(configSource);
|
||||
m_config.Save(Application.iniFilePath);
|
||||
|
@ -293,7 +290,6 @@ namespace OpenSim
|
|||
}
|
||||
|
||||
return DefaultConfig;
|
||||
|
||||
}
|
||||
|
||||
protected virtual void ReadConfigSettings()
|
||||
|
@ -354,14 +350,15 @@ namespace OpenSim
|
|||
protected void LoadPlugins()
|
||||
{
|
||||
PluginLoader<IApplicationPlugin> loader =
|
||||
new PluginLoader<IApplicationPlugin> (new ApplicationPluginInitialiser (this));
|
||||
new PluginLoader<IApplicationPlugin>(new ApplicationPluginInitialiser(this));
|
||||
|
||||
loader.Load ("/OpenSim/Startup");
|
||||
loader.Load("/OpenSim/Startup");
|
||||
m_plugins = loader.Plugins;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs initialisation of the scene, such as loading configuration from disk.
|
||||
/// Performs startup specific to this region server, including initialization of the scene
|
||||
/// such as loading configuration from disk.
|
||||
/// </summary>
|
||||
protected override void StartupSpecific()
|
||||
{
|
||||
|
@ -501,9 +498,7 @@ namespace OpenSim
|
|||
regionInfo.originRegionID = regionInfo.RegionID;
|
||||
|
||||
// set initial ServerURI
|
||||
regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName
|
||||
+ ":" + regionInfo.InternalEndPoint.Port.ToString();
|
||||
|
||||
regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.InternalEndPoint.Port;
|
||||
regionInfo.HttpPort = m_httpServerPort;
|
||||
|
||||
if ((proxyUrl.Length > 0) && (portadd_flag))
|
||||
|
@ -514,11 +509,12 @@ namespace OpenSim
|
|||
}
|
||||
|
||||
IClientNetworkServer clientServer;
|
||||
Scene scene = SetupScene(regionInfo, proxyOffset, out clientServer);
|
||||
Scene scene = SetupScene(regionInfo, proxyOffset, null, out clientServer);
|
||||
|
||||
m_log.Info("[MODULES]: Loading Region's modules");
|
||||
|
||||
List<IRegionModule> modules = m_moduleLoader.PickupModules(scene, ".");
|
||||
|
||||
// This needs to be ahead of the script engine load, so the
|
||||
// script module can pick up events exposed by a module
|
||||
m_moduleLoader.InitialiseSharedModules(scene);
|
||||
|
@ -530,7 +526,7 @@ namespace OpenSim
|
|||
|
||||
scene.StartTimer();
|
||||
|
||||
//moved these here as the terrain texture has to be created after the modules are initialized
|
||||
// moved these here as the terrain texture has to be created after the modules are initialized
|
||||
// and has to happen before the region is registered with the grid.
|
||||
scene.CreateTerrainTexture(false);
|
||||
|
||||
|
|
|
@ -65,11 +65,45 @@ namespace OpenSim.Region.Environment
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a server that can set up sessions for virtual world client <-> server communications
|
||||
/// </summary>
|
||||
/// <param name="_listenIP"></param>
|
||||
/// <param name="port"></param>
|
||||
/// <param name="proxyPortOffset"></param>
|
||||
/// <param name="allow_alternate_port"></param>
|
||||
/// <param name="assetCache"></param>
|
||||
/// <param name="authenticateClass"></param>
|
||||
/// <returns></returns>
|
||||
public IClientNetworkServer CreateServer(
|
||||
IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port,
|
||||
AssetCache assetCache, AgentCircuitManager authenticateClass)
|
||||
{
|
||||
return CreateServer(
|
||||
_listenIP, ref port, proxyPortOffset, allow_alternate_port, null, assetCache, authenticateClass);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a server that can set up sessions for virtual world client <-> server communications
|
||||
/// </summary>
|
||||
/// <param name="_listenIP"></param>
|
||||
/// <param name="port"></param>
|
||||
/// <param name="proxyPortOffset"></param>
|
||||
/// <param name="allow_alternate_port"></param>
|
||||
/// <param name="settings">
|
||||
/// Can be null, in which case default values are used
|
||||
/// </param>
|
||||
/// <param name="assetCache"></param>
|
||||
/// <param name="authenticateClass"></param>
|
||||
/// <returns></returns>
|
||||
public IClientNetworkServer CreateServer(
|
||||
IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port, ClientStackUserSettings settings,
|
||||
AssetCache assetCache, AgentCircuitManager authenticateClass)
|
||||
{
|
||||
if (null == settings)
|
||||
settings = new ClientStackUserSettings();
|
||||
|
||||
if (plugin != null)
|
||||
{
|
||||
IClientNetworkServer server =
|
||||
|
|
|
@ -392,8 +392,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
/// <param name="sessionId"></param>
|
||||
/// <param name="circuitCode"></param>
|
||||
/// <param name="proxyEP"></param>
|
||||
public LLClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, LLPacketServer packServer,
|
||||
AgentCircuitManager authenSessions, UUID agentId, UUID sessionId, uint circuitCode, EndPoint proxyEP)
|
||||
public LLClientView(
|
||||
EndPoint remoteEP, IScene scene, AssetCache assetCache, LLPacketServer packServer,
|
||||
AgentCircuitManager authenSessions, UUID agentId, UUID sessionId, uint circuitCode, EndPoint proxyEP,
|
||||
ClientStackUserSettings userSettings)
|
||||
{
|
||||
m_moneyBalance = 1000;
|
||||
|
||||
|
@ -422,7 +424,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
// in it to process. It's an on-purpose threadlock though because
|
||||
// without it, the clientloop will suck up all sim resources.
|
||||
|
||||
m_PacketHandler = new LLPacketHandler(this, m_networkServer);
|
||||
m_PacketHandler = new LLPacketHandler(this, m_networkServer, userSettings);
|
||||
m_PacketHandler.SynchronizeClient = SynchronizeClient;
|
||||
|
||||
RegisterLocalPacketHandlers();
|
||||
|
|
|
@ -70,6 +70,13 @@ namespace OpenSim.Region.ClientStack
|
|||
{
|
||||
get { return m_sceneManager; }
|
||||
}
|
||||
|
||||
protected abstract void Initialize();
|
||||
protected abstract PhysicsScene GetPhysicsScene();
|
||||
protected abstract StorageManager CreateStorageManager(string connectionstring, string estateconnectionstring);
|
||||
protected abstract ClientStackManager CreateClientStackManager();
|
||||
protected abstract Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager,
|
||||
AgentCircuitManager circuitManager);
|
||||
|
||||
protected override void StartupSpecific()
|
||||
{
|
||||
|
@ -79,7 +86,11 @@ namespace OpenSim.Region.ClientStack
|
|||
|
||||
Initialize();
|
||||
|
||||
m_httpServer = new BaseHttpServer(m_httpServerPort,m_networkServersInfo.HttpUsesSSL,m_networkServersInfo.httpSSLPort, m_networkServersInfo.HttpSSLCN);
|
||||
m_httpServer
|
||||
= new BaseHttpServer(
|
||||
m_httpServerPort, m_networkServersInfo.HttpUsesSSL, m_networkServersInfo.httpSSLPort,
|
||||
m_networkServersInfo.HttpSSLCN);
|
||||
|
||||
if (m_networkServersInfo.HttpUsesSSL && (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort))
|
||||
{
|
||||
m_log.Error("[HTTP]: HTTP Server config failed. HTTP Server and HTTPS server must be on different ports");
|
||||
|
@ -89,19 +100,6 @@ namespace OpenSim.Region.ClientStack
|
|||
m_httpServer.Start();
|
||||
}
|
||||
|
||||
protected abstract void Initialize();
|
||||
|
||||
// protected void StartConsole()
|
||||
// {
|
||||
// m_console = CreateConsole();
|
||||
// MainConsole.Instance = m_console;
|
||||
// }
|
||||
|
||||
// protected abstract ConsoleBase CreateConsole();
|
||||
protected abstract PhysicsScene GetPhysicsScene();
|
||||
protected abstract StorageManager CreateStorageManager(string connectionstring, string estateconnectionstring);
|
||||
protected abstract ClientStackManager CreateClientStackManager();
|
||||
|
||||
protected PhysicsScene GetPhysicsScene(string engine, string meshEngine, IConfigSource config)
|
||||
{
|
||||
PhysicsPluginManager physicsPluginManager;
|
||||
|
@ -110,12 +108,28 @@ namespace OpenSim.Region.ClientStack
|
|||
return physicsPluginManager.GetPhysicsScene(engine, meshEngine, config);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a scene and its initial base structures.
|
||||
/// </summary>
|
||||
/// <param name="regionInfo"></param>
|
||||
/// <param name="clientServer"> </param>
|
||||
/// <returns></returns>
|
||||
protected Scene SetupScene(RegionInfo regionInfo, out IClientNetworkServer clientServer)
|
||||
{
|
||||
return SetupScene(regionInfo, 0, out clientServer);
|
||||
return SetupScene(regionInfo, 0, null, out clientServer);
|
||||
}
|
||||
|
||||
protected Scene SetupScene(RegionInfo regionInfo, int proxyOffset, out IClientNetworkServer clientServer)
|
||||
/// <summary>
|
||||
/// Create a scene and its initial base structures.
|
||||
/// </summary>
|
||||
/// <param name="regionInfo"></param>
|
||||
/// <param name="proxyOffset"></param>
|
||||
/// <param name="clientStackUserSettings"></param>
|
||||
/// <param name="clientServer"> </param>
|
||||
/// <returns></returns>
|
||||
protected Scene SetupScene(
|
||||
RegionInfo regionInfo, int proxyOffset, ClientStackUserSettings clientStackUserSettings,
|
||||
out IClientNetworkServer clientServer)
|
||||
{
|
||||
AgentCircuitManager circuitManager = new AgentCircuitManager();
|
||||
IPAddress listenIP = regionInfo.InternalEndPoint.Address;
|
||||
|
@ -126,7 +140,7 @@ namespace OpenSim.Region.ClientStack
|
|||
|
||||
clientServer
|
||||
= m_clientStackManager.CreateServer(
|
||||
listenIP, ref port, proxyOffset, regionInfo.m_allow_alternate_ports, new ClientStackUserSettings(),
|
||||
listenIP, ref port, proxyOffset, regionInfo.m_allow_alternate_ports, clientStackUserSettings,
|
||||
m_assetCache, circuitManager);
|
||||
|
||||
regionInfo.InternalEndPoint.Port = (int)port;
|
||||
|
@ -172,8 +186,5 @@ namespace OpenSim.Region.ClientStack
|
|||
|
||||
return scene;
|
||||
}
|
||||
|
||||
protected abstract Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager,
|
||||
AgentCircuitManager circuitManager);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue