diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 33 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/RegionApplicationBase.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Communications/Local/LocalUserServices.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Examples/SimpleApp/Program.cs | 5 |
4 files changed, 18 insertions, 26 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); |
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index 008b4c7..5683b31 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs | |||
@@ -41,6 +41,7 @@ using libsecondlife; | |||
41 | using OpenSim.Region.Environment.Scenes; | 41 | using OpenSim.Region.Environment.Scenes; |
42 | using OpenSim.Framework.Communications; | 42 | using OpenSim.Framework.Communications; |
43 | using OpenSim.Framework.Communications.Caches; | 43 | using OpenSim.Framework.Communications.Caches; |
44 | using OpenSim.Region.Communications.Local; | ||
44 | 45 | ||
45 | namespace OpenSim.Region.ClientStack | 46 | namespace OpenSim.Region.ClientStack |
46 | { | 47 | { |
@@ -78,6 +79,7 @@ namespace OpenSim.Region.ClientStack | |||
78 | m_httpServer.Start(); | 79 | m_httpServer.Start(); |
79 | 80 | ||
80 | m_inventoryCache = new InventoryCache(); | 81 | m_inventoryCache = new InventoryCache(); |
82 | m_commsManager = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache); | ||
81 | } | 83 | } |
82 | 84 | ||
83 | protected abstract void Initialize(); | 85 | protected abstract void Initialize(); |
diff --git a/OpenSim/Region/Communications/Local/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs index c351451..cc80c81 100644 --- a/OpenSim/Region/Communications/Local/LocalUserServices.cs +++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs | |||
@@ -16,10 +16,10 @@ namespace OpenSim.Region.Communications.Local | |||
16 | private uint defaultHomeX ; | 16 | private uint defaultHomeX ; |
17 | private uint defaultHomeY; | 17 | private uint defaultHomeY; |
18 | 18 | ||
19 | public LocalUserServices(CommunicationsLocal parent, NetworkServersInfo serversData) | 19 | public LocalUserServices(CommunicationsLocal parent, NetworkServersInfo serversInfo) |
20 | { | 20 | { |
21 | m_Parent = parent; | 21 | m_Parent = parent; |
22 | this.serversInfo = serversData; | 22 | this.serversInfo = serversInfo; |
23 | defaultHomeX = this.serversInfo.DefaultHomeLocX; | 23 | defaultHomeX = this.serversInfo.DefaultHomeLocX; |
24 | defaultHomeY = this.serversInfo.DefaultHomeLocY; | 24 | defaultHomeY = this.serversInfo.DefaultHomeLocY; |
25 | } | 25 | } |
diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs index a27cc0c..50b0780 100644 --- a/OpenSim/Region/Examples/SimpleApp/Program.cs +++ b/OpenSim/Region/Examples/SimpleApp/Program.cs | |||
@@ -35,8 +35,7 @@ namespace SimpleApp | |||
35 | 35 | ||
36 | StartLog(); | 36 | StartLog(); |
37 | 37 | ||
38 | m_networkServersInfo = new NetworkServersInfo( ); | 38 | m_networkServersInfo = new NetworkServersInfo( 1000, 1000 ); |
39 | |||
40 | 39 | ||
41 | LocalAssetServer assetServer = new LocalAssetServer(); | 40 | LocalAssetServer assetServer = new LocalAssetServer(); |
42 | assetServer.SetServerInfo("http://localhost:8003/", ""); | 41 | assetServer.SetServerInfo("http://localhost:8003/", ""); |
@@ -48,8 +47,6 @@ namespace SimpleApp | |||
48 | { | 47 | { |
49 | base.StartUp(); | 48 | base.StartUp(); |
50 | 49 | ||
51 | m_commsManager = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache); | ||
52 | |||
53 | m_log.Notice(m_log.LineInfo); | 50 | m_log.Notice(m_log.LineInfo); |
54 | 51 | ||
55 | ScenePresence.PhysicsEngineFlying = true; | 52 | ScenePresence.PhysicsEngineFlying = true; |