aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.RegionServer/OpenSimMain.cs
diff options
context:
space:
mode:
authorlbsa712007-03-29 18:21:04 +0000
committerlbsa712007-03-29 18:21:04 +0000
commit761db20c5fdc155a8319c1a3efcad05eafe9acc2 (patch)
treefeb207190c56754ff6e18d02c5967e88d6c86f97 /OpenSim.RegionServer/OpenSimMain.cs
parent* added user account info to README.txt (diff)
downloadopensim-SC_OLD-761db20c5fdc155a8319c1a3efcad05eafe9acc2.zip
opensim-SC_OLD-761db20c5fdc155a8319c1a3efcad05eafe9acc2.tar.gz
opensim-SC_OLD-761db20c5fdc155a8319c1a3efcad05eafe9acc2.tar.bz2
opensim-SC_OLD-761db20c5fdc155a8319c1a3efcad05eafe9acc2.tar.xz
* Tried to make the sandbox/useraccount sim setup a bit simpler
* Removed some comments
Diffstat (limited to '')
-rw-r--r--OpenSim.RegionServer/OpenSimMain.cs51
1 files changed, 25 insertions, 26 deletions
diff --git a/OpenSim.RegionServer/OpenSimMain.cs b/OpenSim.RegionServer/OpenSimMain.cs
index 651c0c6..51ec12b 100644
--- a/OpenSim.RegionServer/OpenSimMain.cs
+++ b/OpenSim.RegionServer/OpenSimMain.cs
@@ -73,7 +73,7 @@ namespace OpenSim
73 private EndPoint epSender; 73 private EndPoint epSender;
74 private AsyncCallback ReceivedData; 74 private AsyncCallback ReceivedData;
75 75
76 private System.Timers.Timer timer1 = new System.Timers.Timer(); 76 private System.Timers.Timer m_heartbeatTimer = new System.Timers.Timer();
77 private string ConfigDll = "OpenSim.Config.SimConfigDb4o.dll"; 77 private string ConfigDll = "OpenSim.Config.SimConfigDb4o.dll";
78 public string m_physicsEngine; 78 public string m_physicsEngine;
79 public bool m_sandbox = false; 79 public bool m_sandbox = false;
@@ -176,40 +176,39 @@ namespace OpenSim
176 176
177 177
178 LoginServer loginServer = null; 178 LoginServer loginServer = null;
179 if (m_loginserver && m_sandbox) 179 LoginServer adminLoginServer = null;
180
181 bool sandBoxWithLoginServer = m_loginserver && m_sandbox;
182 if (sandBoxWithLoginServer)
180 { 183 {
181 loginServer = new LoginServer(gridServer, Cfg.IPListenAddr, Cfg.IPListenPort, this.user_accounts); 184 loginServer = new LoginServer(gridServer, Cfg.IPListenAddr, Cfg.IPListenPort, this.user_accounts);
182 loginServer.Startup(); 185 loginServer.Startup();
183 186
184 } 187 if( user_accounts )
185 188 {
186 if ((m_loginserver) && (m_sandbox) && (user_accounts)) 189 //sandbox mode with loginserver using accounts
187 { 190 this.GridServers.UserServer = loginServer;
188 //sandbox mode with loginserver using accounts 191 adminLoginServer = loginServer;
189 this.GridServers.UserServer = loginServer; 192
190 HttpServer.AddRestHandler("Admin", new AdminWebFront("Admin", LocalWorld, loginServer)); 193 HttpServer.AddXmlRPCHandler("login_to_simulator", loginServer.LocalUserManager.XmlRpcLoginMethod);
191 HttpServer.AddXmlRPCHandler("login_to_simulator", loginServer.LocalUserManager.XmlRpcLoginMethod); 194 }
192 } 195 else
193 else if ((m_loginserver) && (m_sandbox)) 196 {
194 { 197 //sandbox mode with loginserver not using accounts
195 //sandbox mode with loginserver not using accounts 198 HttpServer.AddXmlRPCHandler("login_to_simulator", loginServer.XmlRpcLoginMethod);
196 HttpServer.AddRestHandler("Admin", new AdminWebFront("Admin", LocalWorld, null)); 199 }
197 HttpServer.AddXmlRPCHandler("login_to_simulator", loginServer.XmlRpcLoginMethod);
198 }
199 else
200 {
201 //not in sandbox mode so no loginserver, so we don't handle login attempts
202 HttpServer.AddRestHandler("Admin", new AdminWebFront("Admin", LocalWorld, null));
203 } 200 }
204 201
202 HttpServer.AddRestHandler("Admin", new AdminWebFront("Admin", LocalWorld, adminLoginServer ));
203
205 m_console.WriteLine("Main.cs:Startup() - Starting HTTP server"); 204 m_console.WriteLine("Main.cs:Startup() - Starting HTTP server");
206 HttpServer.Start(); 205 HttpServer.Start();
207 206
208 MainServerListener(); 207 MainServerListener();
209 208
210 timer1.Enabled = true; 209 m_heartbeatTimer.Enabled = true;
211 timer1.Interval = 100; 210 m_heartbeatTimer.Interval = 100;
212 timer1.Elapsed += new ElapsedEventHandler(this.Timer1Tick); 211 m_heartbeatTimer.Elapsed += new ElapsedEventHandler(this.Heartbeat);
213 } 212 }
214 213
215 private SimConfig LoadConfigDll(string dllName) 214 private SimConfig LoadConfigDll(string dllName)
@@ -340,7 +339,7 @@ namespace OpenSim
340 Environment.Exit(0); 339 Environment.Exit(0);
341 } 340 }
342 341
343 void Timer1Tick(object sender, System.EventArgs e) 342 void Heartbeat(object sender, System.EventArgs e)
344 { 343 {
345 LocalWorld.Update(); 344 LocalWorld.Update();
346 } 345 }