aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSimMain.cs
diff options
context:
space:
mode:
authorlbsa712007-08-06 10:48:40 +0000
committerlbsa712007-08-06 10:48:40 +0000
commit9bdeb8af6f797e35b5322d6856ecc488340c9453 (patch)
treec937a183725603e2b5cdebc525308aee517de597 /OpenSim/Region/Application/OpenSimMain.cs
parentAnd its license file. (diff)
downloadopensim-SC_OLD-9bdeb8af6f797e35b5322d6856ecc488340c9453.zip
opensim-SC_OLD-9bdeb8af6f797e35b5322d6856ecc488340c9453.tar.gz
opensim-SC_OLD-9bdeb8af6f797e35b5322d6856ecc488340c9453.tar.bz2
opensim-SC_OLD-9bdeb8af6f797e35b5322d6856ecc488340c9453.tar.xz
* 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
Diffstat (limited to 'OpenSim/Region/Application/OpenSimMain.cs')
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs33
1 files changed, 13 insertions, 20 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index c68f75e..7fb48b0 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -120,30 +120,19 @@ namespace OpenSim
120 m_httpServer.AddStreamHandler(new SimStatusHandler()); 120 m_httpServer.AddStreamHandler(new SimStatusHandler());
121 } 121 }
122 122
123 if (m_sandbox) 123 string regionConfigPath = Path.Combine(Util.configDir(), "Regions");
124 { 124
125 m_commsManager = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache); 125 if (!Directory.Exists(regionConfigPath))
126 }
127 else
128 {
129 m_commsManager = new CommunicationsOGS1(m_networkServersInfo, m_httpServer, m_assetCache);
130 }
131
132
133 string path = Path.Combine(Util.configDir(), "Regions");
134 if (!Directory.Exists(path))
135 { 126 {
136 Directory.CreateDirectory(path); 127 Directory.CreateDirectory(regionConfigPath);
137 } 128 }
138 string[] configFiles = Directory.GetFiles(path, "*.xml"); 129
130 string[] configFiles = Directory.GetFiles(regionConfigPath, "*.xml");
139 131
140 if (configFiles.Length == 0) 132 if (configFiles.Length == 0)
141 { 133 {
142 string path2 = Path.Combine(Util.configDir(), "Regions"); 134 CreateDefaultRegionInfoXml(Path.Combine(regionConfigPath, "default.xml"));
143 string path3 = Path.Combine(path2, "default.xml"); 135 configFiles = Directory.GetFiles(regionConfigPath, "*.xml");
144
145 RegionInfo regionInfo = new RegionInfo("DEFAULT REGION CONFIG", path3);
146 configFiles = Directory.GetFiles(path, "*.xml");
147 } 136 }
148 137
149 for (int i = 0; i < configFiles.Length; i++) 138 for (int i = 0; i < configFiles.Length; i++)
@@ -156,7 +145,6 @@ namespace OpenSim
156 145
157 m_localScenes.Add(scene); 146 m_localScenes.Add(scene);
158 147
159
160 m_udpServers.Add(udpServer); 148 m_udpServers.Add(udpServer);
161 m_regionData.Add(regionInfo); 149 m_regionData.Add(regionInfo);
162 } 150 }
@@ -170,6 +158,11 @@ namespace OpenSim
170 158
171 } 159 }
172 160
161 private static void CreateDefaultRegionInfoXml(string fileName)
162 {
163 new RegionInfo("DEFAULT REGION CONFIG", fileName);
164 }
165
173 protected override StorageManager CreateStorageManager(RegionInfo regionInfo) 166 protected override StorageManager CreateStorageManager(RegionInfo regionInfo)
174 { 167 {
175 return new StorageManager("OpenSim.DataStore.NullStorage.dll", regionInfo.DataStore, regionInfo.RegionName); 168 return new StorageManager("OpenSim.DataStore.NullStorage.dll", regionInfo.DataStore, regionInfo.RegionName);