aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.RegionServer/OpenSimMain.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim.RegionServer/OpenSimMain.cs48
1 files changed, 28 insertions, 20 deletions
diff --git a/OpenSim.RegionServer/OpenSimMain.cs b/OpenSim.RegionServer/OpenSimMain.cs
index 0be9d83..836f57f 100644
--- a/OpenSim.RegionServer/OpenSimMain.cs
+++ b/OpenSim.RegionServer/OpenSimMain.cs
@@ -159,6 +159,34 @@ namespace OpenSim
159 159
160 PacketServer packetServer = new PacketServer(this); 160 PacketServer packetServer = new PacketServer(this);
161 161
162
163 //should be passing a IGenericConfig object to these so they can read the config data they want from it
164 GridServers.AssetServer.SetServerInfo(regionData.AssetURL, regionData.AssetSendKey);
165 IGridServer gridServer = GridServers.GridServer;
166 gridServer.SetServerInfo(regionData.GridURL, regionData.GridSendKey, regionData.GridRecvKey);
167
168 if (!m_sandbox)
169 {
170 if (GridServers.GridServer.RequestConnection(regionData.SimUUID, regionData.IPListenAddr, (uint)regionData.IPListenPort))
171 {
172 m_console.WriteLine("Main.cs:Startup() - Success: Got a grid connection OK!");
173 }
174 else
175 {
176 m_console.WriteLine("Main.cs:Startup() - FAILED: Unable to get connection to grid. Shutting down.");
177 Shutdown();
178 }
179
180 GridServers.AssetServer.SetServerInfo((string)((RemoteGridBase)GridServers.GridServer).GridData["asset_url"], (string)((RemoteGridBase)GridServers.GridServer).GridData["asset_sendkey"]);
181
182 // If we are being told to load a file, load it.
183 if (((string)((RemoteGridBase)GridServers.GridServer).GridData["data_uri"]) != "")
184 {
185 this.LocalWorld.m_datastore = ((string)((RemoteGridBase)GridServers.GridServer).GridData["data_uri"]);
186 }
187 }
188
189
162 m_console.WriteLine("Main.cs:Startup() - We are " + regionData.RegionName + " at " + regionData.RegionLocX.ToString() + "," + regionData.RegionLocY.ToString()); 190 m_console.WriteLine("Main.cs:Startup() - We are " + regionData.RegionName + " at " + regionData.RegionLocX.ToString() + "," + regionData.RegionLocY.ToString());
163 m_console.WriteLine("Initialising world"); 191 m_console.WriteLine("Initialising world");
164 LocalWorld = new World(this._packetServer.ClientThreads, regionData.RegionHandle, regionData.RegionName); 192 LocalWorld = new World(this._packetServer.ClientThreads, regionData.RegionHandle, regionData.RegionName);
@@ -180,26 +208,6 @@ namespace OpenSim
180 LocalWorld.PhysScene = this.physManager.GetPhysicsScene(this.m_physicsEngine); //should be reading from the config file what physics engine to use 208 LocalWorld.PhysScene = this.physManager.GetPhysicsScene(this.m_physicsEngine); //should be reading from the config file what physics engine to use
181 LocalWorld.PhysScene.SetTerrain(LocalWorld.Terrain.getHeights1D()); 209 LocalWorld.PhysScene.SetTerrain(LocalWorld.Terrain.getHeights1D());
182 210
183 //should be passing a IGenericConfig object to these so they can read the config data they want from it
184 GridServers.AssetServer.SetServerInfo(regionData.AssetURL, regionData.AssetSendKey);
185 IGridServer gridServer = GridServers.GridServer;
186 gridServer.SetServerInfo(regionData.GridURL, regionData.GridSendKey, regionData.GridRecvKey);
187
188 if (!m_sandbox)
189 {
190 if (GridServers.GridServer.RequestConnection(regionData.SimUUID, regionData.IPListenAddr, (uint)regionData.IPListenPort))
191 {
192 m_console.WriteLine("Main.cs:Startup() - Got a grid connection OK!");
193 }
194 else
195 {
196 m_console.WriteLine("AAAAAAAAAAAAARRRRRRRRRRGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!");
197 m_console.WriteLine("I LOST MY GRID!!!!!!!!!!!!! AAAAAAAARRRRRRRRGGGGGGGGHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!");
198 Shutdown();
199 }
200
201 GridServers.AssetServer.SetServerInfo((string)((RemoteGridBase)GridServers.GridServer).GridData["asset_url"], (string)((RemoteGridBase)GridServers.GridServer).GridData["asset_sendkey"]);
202 }
203 211
204 LocalWorld.LoadPrimsFromStorage(); 212 LocalWorld.LoadPrimsFromStorage();
205 213