mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 11:57:03 +08:00
* SimpleApp works again:
* NetworkServersInfo settable without config file * DefaultHomeLoc throws if getted before setted * Removed nonsensical sandbox distinction * Refactored default config file creation * Some more small refactorings on shapes
This commit is contained in:
@@ -120,30 +120,19 @@ namespace OpenSim
|
||||
m_httpServer.AddStreamHandler(new SimStatusHandler());
|
||||
}
|
||||
|
||||
if (m_sandbox)
|
||||
string regionConfigPath = Path.Combine(Util.configDir(), "Regions");
|
||||
|
||||
if (!Directory.Exists(regionConfigPath))
|
||||
{
|
||||
m_commsManager = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache);
|
||||
Directory.CreateDirectory(regionConfigPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_commsManager = new CommunicationsOGS1(m_networkServersInfo, m_httpServer, m_assetCache);
|
||||
}
|
||||
|
||||
|
||||
string path = Path.Combine(Util.configDir(), "Regions");
|
||||
if (!Directory.Exists(path))
|
||||
{
|
||||
Directory.CreateDirectory(path);
|
||||
}
|
||||
string[] configFiles = Directory.GetFiles(path, "*.xml");
|
||||
|
||||
string[] configFiles = Directory.GetFiles(regionConfigPath, "*.xml");
|
||||
|
||||
if (configFiles.Length == 0)
|
||||
{
|
||||
string path2 = Path.Combine(Util.configDir(), "Regions");
|
||||
string path3 = Path.Combine(path2, "default.xml");
|
||||
|
||||
RegionInfo regionInfo = new RegionInfo("DEFAULT REGION CONFIG", path3);
|
||||
configFiles = Directory.GetFiles(path, "*.xml");
|
||||
CreateDefaultRegionInfoXml(Path.Combine(regionConfigPath, "default.xml"));
|
||||
configFiles = Directory.GetFiles(regionConfigPath, "*.xml");
|
||||
}
|
||||
|
||||
for (int i = 0; i < configFiles.Length; i++)
|
||||
@@ -156,7 +145,6 @@ namespace OpenSim
|
||||
|
||||
m_localScenes.Add(scene);
|
||||
|
||||
|
||||
m_udpServers.Add(udpServer);
|
||||
m_regionData.Add(regionInfo);
|
||||
}
|
||||
@@ -170,6 +158,11 @@ namespace OpenSim
|
||||
|
||||
}
|
||||
|
||||
private static void CreateDefaultRegionInfoXml(string fileName)
|
||||
{
|
||||
new RegionInfo("DEFAULT REGION CONFIG", fileName);
|
||||
}
|
||||
|
||||
protected override StorageManager CreateStorageManager(RegionInfo regionInfo)
|
||||
{
|
||||
return new StorageManager("OpenSim.DataStore.NullStorage.dll", regionInfo.DataStore, regionInfo.RegionName);
|
||||
|
||||
Reference in New Issue
Block a user