mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 11:33:28 +08:00
Merge branch 'master' into careminster-presence-refactor
The modules will need to be updated for this to compile and run again. Please don't use until I do the companion commit to modules later on.
This commit is contained in:
@@ -225,7 +225,7 @@ namespace OpenSim
|
||||
}
|
||||
}
|
||||
MainConsole.Instance = null;
|
||||
}
|
||||
}
|
||||
*/
|
||||
configSource.Alias.AddAlias("On", true);
|
||||
configSource.Alias.AddAlias("Off", false);
|
||||
|
||||
@@ -345,10 +345,6 @@ namespace OpenSim
|
||||
|
||||
m_configSettings.StorageDll = startupConfig.GetString("storage_plugin");
|
||||
|
||||
m_configSettings.StorageConnectionString
|
||||
= startupConfig.GetString("storage_connection_string");
|
||||
m_configSettings.EstateConnectionString
|
||||
= startupConfig.GetString("estate_connection_string", m_configSettings.StorageConnectionString);
|
||||
m_configSettings.ClientstackDll
|
||||
= startupConfig.GetString("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll");
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ namespace OpenSim
|
||||
RegisterConsoleCommands();
|
||||
|
||||
base.StartupSpecific();
|
||||
|
||||
|
||||
MainServer.Instance.AddStreamHandler(new OpenSim.SimStatusHandler());
|
||||
MainServer.Instance.AddStreamHandler(new OpenSim.XSimStatusHandler(this));
|
||||
if (userStatsURI != String.Empty)
|
||||
@@ -192,7 +192,7 @@ namespace OpenSim
|
||||
// Hook up to the watchdog timer
|
||||
Watchdog.OnWatchdogTimeout += WatchdogTimeoutHandler;
|
||||
|
||||
PrintFileToConsole("startuplogo.txt");
|
||||
PrintFileToConsole("startuplogo.txt");
|
||||
|
||||
// For now, start at the 'root' level by default
|
||||
if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it
|
||||
@@ -218,8 +218,8 @@ namespace OpenSim
|
||||
|
||||
m_console.Commands.AddCommand("region", false, "debug packet",
|
||||
"debug packet <level>",
|
||||
"Turn on packet debugging",
|
||||
"If level > 255 then all incoming and outgoing packets are logged.\n"
|
||||
"Turn on packet debugging",
|
||||
"If level > 255 then all incoming and outgoing packets are logged.\n"
|
||||
+ "If level <= 255 then incoming AgentUpdate and outgoing SimStats and SimulatorViewerTimeMessage packets are not logged.\n"
|
||||
+ "If level <= 200 then incoming RequestImage and outgoing ImagePacket, ImageData, LayerData and CoarseLocationUpdate packets are not logged.\n"
|
||||
+ "If level <= 100 then incoming ViewerEffect and AgentAnimation and outgoing ViewerEffect and AvatarAnimation packets are not logged.\n"
|
||||
@@ -316,7 +316,7 @@ namespace OpenSim
|
||||
m_console.Commands.AddCommand("region", false, "create region",
|
||||
"create region [\"region name\"] <region_file.ini>",
|
||||
"Create a new region.",
|
||||
"The settings for \"region name\" are read from <region_file.ini>."
|
||||
"The settings for \"region name\" are read from <region_file.ini> in your Regions directory."
|
||||
+ " If \"region name\" does not exist in <region_file.ini>, it will be added." + Environment.NewLine
|
||||
+ "Without \"region name\", the first region found in <region_file.ini> will be created." + Environment.NewLine
|
||||
+ "If <region_file.ini> does not exist, it will be created.",
|
||||
@@ -552,19 +552,20 @@ namespace OpenSim
|
||||
regionFile = Path.Combine(regionsDir, regionFile);
|
||||
}
|
||||
|
||||
RegionInfo regInfo;
|
||||
RegionInfo regInfo;
|
||||
if (isXml)
|
||||
{
|
||||
regInfo = new RegionInfo(regionName, regionFile, false, ConfigSource.Source);
|
||||
regInfo = new RegionInfo(regionName, regionFile, false, ConfigSource.Source);
|
||||
}
|
||||
else
|
||||
{
|
||||
regInfo = new RegionInfo(regionName, regionFile, false, ConfigSource.Source, regionName);
|
||||
regInfo = new RegionInfo(regionName, regionFile, false, ConfigSource.Source, regionName);
|
||||
}
|
||||
|
||||
IScene scene;
|
||||
PopulateRegionEstateInfo(regInfo);
|
||||
CreateRegion(regInfo, true, out scene);
|
||||
regInfo.EstateSettings.Save();
|
||||
PopulateRegionEstateInfo(regInfo);
|
||||
CreateRegion(regInfo, true, out scene);
|
||||
regInfo.EstateSettings.Save();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -942,7 +943,7 @@ namespace OpenSim
|
||||
delegate(Scene scene)
|
||||
{
|
||||
MainConsole.Instance.Output(String.Format(
|
||||
"Region Name: {0}, Region XLoc: {1}, Region YLoc: {2}, Region Port: {3}",
|
||||
"Region Name: {0}, Region XLoc: {1}, Region YLoc: {2}, Region Port: {3}",
|
||||
scene.RegionInfo.RegionName,
|
||||
scene.RegionInfo.RegionLocX,
|
||||
scene.RegionInfo.RegionLocY,
|
||||
|
||||
@@ -45,6 +45,7 @@ using OpenSim.Region.Framework;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Region.Physics.Manager;
|
||||
using OpenSim.Server.Base;
|
||||
|
||||
namespace OpenSim
|
||||
{
|
||||
@@ -195,6 +196,24 @@ namespace OpenSim
|
||||
m_permsModules = new List<string>(permissionModules.Split(','));
|
||||
}
|
||||
|
||||
// Load the simulation data service
|
||||
IConfig simDataConfig = m_config.Source.Configs["SimulationDataStore"];
|
||||
if (simDataConfig == null)
|
||||
throw new Exception("Configuration file is missing the [SimulationDataStore] section");
|
||||
string module = simDataConfig.GetString("LocalServiceModule", String.Empty);
|
||||
if (String.IsNullOrEmpty(module))
|
||||
throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [SimulationDataStore] section");
|
||||
m_simulationDataService = ServerUtils.LoadPlugin<ISimulationDataService>(module, new object[] { m_config.Source });
|
||||
|
||||
// Load the estate data service
|
||||
IConfig estateDataConfig = m_config.Source.Configs["EstateDataStore"];
|
||||
if (estateDataConfig == null)
|
||||
throw new Exception("Configuration file is missing the [EstateDataStore] section");
|
||||
module = estateDataConfig.GetString("LocalServiceModule", String.Empty);
|
||||
if (String.IsNullOrEmpty(module))
|
||||
throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [EstateDataStore] section");
|
||||
m_estateDataService = ServerUtils.LoadPlugin<IEstateDataService>(module, new object[] { m_config.Source });
|
||||
|
||||
base.StartupSpecific();
|
||||
|
||||
m_stats = StatsManager.StartCollectingSimExtraStats();
|
||||
@@ -612,7 +631,7 @@ namespace OpenSim
|
||||
|
||||
regionInfo.InternalEndPoint.Port = (int) port;
|
||||
|
||||
Scene scene = CreateScene(regionInfo, m_storageManager, circuitManager);
|
||||
Scene scene = CreateScene(regionInfo, m_simulationDataService, m_estateDataService, circuitManager);
|
||||
|
||||
if (m_autoCreateClientStack)
|
||||
{
|
||||
@@ -628,30 +647,19 @@ namespace OpenSim
|
||||
return scene;
|
||||
}
|
||||
|
||||
protected override StorageManager CreateStorageManager()
|
||||
{
|
||||
return
|
||||
CreateStorageManager(m_configSettings.StorageConnectionString, m_configSettings.EstateConnectionString);
|
||||
}
|
||||
|
||||
protected StorageManager CreateStorageManager(string connectionstring, string estateconnectionstring)
|
||||
{
|
||||
return new StorageManager(m_configSettings.StorageDll, connectionstring, estateconnectionstring);
|
||||
}
|
||||
|
||||
protected override ClientStackManager CreateClientStackManager()
|
||||
{
|
||||
return new ClientStackManager(m_configSettings.ClientstackDll);
|
||||
}
|
||||
|
||||
protected override Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager,
|
||||
AgentCircuitManager circuitManager)
|
||||
protected override Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService,
|
||||
IEstateDataService estateDataService, AgentCircuitManager circuitManager)
|
||||
{
|
||||
SceneCommunicationService sceneGridService = new SceneCommunicationService();
|
||||
|
||||
return new Scene(
|
||||
regionInfo, circuitManager, sceneGridService,
|
||||
storageManager, m_moduleLoader, false, m_configSettings.PhysicalPrim,
|
||||
simDataService, estateDataService, m_moduleLoader, false, m_configSettings.PhysicalPrim,
|
||||
m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version);
|
||||
}
|
||||
|
||||
@@ -868,21 +876,23 @@ namespace OpenSim
|
||||
/// </param>
|
||||
public void PopulateRegionEstateInfo(RegionInfo regInfo)
|
||||
{
|
||||
if (m_storageManager.EstateDataStore != null)
|
||||
IEstateDataService estateDataService = EstateDataService;
|
||||
|
||||
if (estateDataService != null)
|
||||
{
|
||||
regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(regInfo.RegionID, false);
|
||||
regInfo.EstateSettings = estateDataService.LoadEstateSettings(regInfo.RegionID, false);
|
||||
}
|
||||
|
||||
|
||||
if (regInfo.EstateSettings.EstateID == 0) // No record at all
|
||||
{
|
||||
MainConsole.Instance.Output("Your region is not part of an estate.");
|
||||
while (true)
|
||||
{
|
||||
string response = MainConsole.Instance.CmdPrompt("Do you wish to join an existing estate?", "no", new List<string>() {"yes", "no"});
|
||||
string response = MainConsole.Instance.CmdPrompt("Do you wish to join an existing estate?", "no", new List<string>() { "yes", "no" });
|
||||
if (response == "no")
|
||||
{
|
||||
// Create a new estate
|
||||
regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(regInfo.RegionID, true);
|
||||
regInfo.EstateSettings = estateDataService.LoadEstateSettings(regInfo.RegionID, true);
|
||||
|
||||
regInfo.EstateSettings.EstateName = MainConsole.Instance.CmdPrompt("New estate name", regInfo.EstateSettings.EstateName);
|
||||
//regInfo.EstateSettings.Save();
|
||||
@@ -894,7 +904,7 @@ namespace OpenSim
|
||||
if (response == "None")
|
||||
continue;
|
||||
|
||||
List<int> estateIDs = m_storageManager.EstateDataStore.GetEstates(response);
|
||||
List<int> estateIDs = estateDataService.GetEstates(response);
|
||||
if (estateIDs.Count < 1)
|
||||
{
|
||||
MainConsole.Instance.Output("The name you have entered matches no known estate. Please try again");
|
||||
@@ -903,9 +913,9 @@ namespace OpenSim
|
||||
|
||||
int estateID = estateIDs[0];
|
||||
|
||||
regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(estateID);
|
||||
regInfo.EstateSettings = estateDataService.LoadEstateSettings(estateID);
|
||||
|
||||
if (m_storageManager.EstateDataStore.LinkRegion(regInfo.RegionID, estateID))
|
||||
if (estateDataService.LinkRegion(regInfo.RegionID, estateID))
|
||||
break;
|
||||
|
||||
MainConsole.Instance.Output("Joining the estate failed. Please try again.");
|
||||
|
||||
Reference in New Issue
Block a user