aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs31
-rw-r--r--OpenSim/Region/Application/Application.cs1
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs14
3 files changed, 23 insertions, 23 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 2cb5375..fed7d9b 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -218,9 +218,6 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
218 Hashtable responseData = new Hashtable(); 218 Hashtable responseData = new Hashtable();
219 219
220 try { 220 try {
221 checkStringParameters(request, new string[] { "password", "shutdown" });
222 checkIntegerParams(request, new string[] { "milliseconds"});
223
224 if (requiredPassword != String.Empty && 221 if (requiredPassword != String.Empty &&
225 (!requestData.Contains("password") || (string) requestData["password"] != requiredPassword)) 222 (!requestData.Contains("password") || (string) requestData["password"] != requiredPassword))
226 throw new Exception("wrong password"); 223 throw new Exception("wrong password");
@@ -228,28 +225,28 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
228 responseData["accepted"] = "true"; 225 responseData["accepted"] = "true";
229 response.Value = responseData; 226 response.Value = responseData;
230 227
231 if ((string) requestData["shutdown"] == "delayed") 228 int timeout = 2000;
229
230 if (requestData.ContainsKey("shutdown") &&
231 ((string) requestData["shutdown"] == "delayed") &&
232 requestData.ContainsKey("milliseconds"))
232 { 233 {
233 int timeout = (Int32) requestData["milliseconds"]; 234 timeout = (Int32) requestData["milliseconds"];
234 m_app.SceneManager.SendGeneralMessage("Region is going down in " + ((int) (timeout/1000)).ToString() + 235 m_app.SceneManager.SendGeneralMessage("Region is going down in " + ((int) (timeout/1000)).ToString() +
235 " second(s). Please save what you are doing and log out."); 236 " second(s). Please save what you are doing and log out.");
236
237 // Perform shutdown
238 Timer shutdownTimer = new Timer(timeout); // Wait before firing
239 shutdownTimer.AutoReset = false;
240 shutdownTimer.Elapsed += new ElapsedEventHandler(shutdownTimer_Elapsed);
241 shutdownTimer.Start();
242 } 237 }
243 else 238 else
244 { 239 {
245 m_app.SceneManager.SendGeneralMessage("Region is going down now."); 240 m_app.SceneManager.SendGeneralMessage("Region is going down now.");
246
247 // Perform shutdown
248 Timer shutdownTimer = new Timer(2000); // Wait 2 seconds before firing
249 shutdownTimer.AutoReset = false;
250 shutdownTimer.Elapsed += new ElapsedEventHandler(shutdownTimer_Elapsed);
251 shutdownTimer.Start();
252 } 241 }
242
243 // Perform shutdown
244 Timer shutdownTimer = new Timer(timeout); // Wait before firing
245 shutdownTimer.AutoReset = false;
246 shutdownTimer.Elapsed += new ElapsedEventHandler(shutdownTimer_Elapsed);
247 shutdownTimer.Start();
248
249 responseData["success"] = "true";
253 } 250 }
254 catch (Exception e) 251 catch (Exception e)
255 { 252 {
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs
index 828490a..bdce0f0 100644
--- a/OpenSim/Region/Application/Application.cs
+++ b/OpenSim/Region/Application/Application.cs
@@ -83,7 +83,6 @@ namespace OpenSim
83 83
84 if (background) 84 if (background)
85 { 85 {
86 Console.WriteLine("background mode");
87 OpenSimMain sim = new OpenSimMain(configSource); 86 OpenSimMain sim = new OpenSimMain(configSource);
88 sim.StartUp(); 87 sim.StartUp();
89 } 88 }
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index 3bee7f3..d05a632 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -323,15 +323,19 @@ namespace OpenSim
323 // 323 //
324 // Called from app startup (OpenSim.Application) 324 // Called from app startup (OpenSim.Application)
325 // 325 //
326 326 m_log.Info("====================================================================");
327 m_log.Info("[OPENSIM]: Starting Opensim"); 327 m_log.Info("========================= STARTING OPENSIM =========================");
328 m_log.InfoFormat("[OPENSIM MAIN]: Running in {0} mode", (m_sandbox ? "sandbox" : "grid")); 328 m_log.Info("====================================================================");
329 m_log.InfoFormat("[OPENSIM MAIN]: Running in background {0} mode", m_sandbox ? "sandbox" : "grid");
329 330
330 InternalStartUp(); 331 InternalStartUp();
331 332
332 // We are done with startup 333 // We are done with startup
333 m_log.Info("[OPENSIM MAIN]: Startup complete, serving " + m_udpServers.Count.ToString() + " region(s)"); 334 m_log.InfoFormat("[OPENSIM MAIN]: Startup complete, serving {0} region{1}",
335 m_udpServers.Count.ToString(), m_udpServers.Count > 1 ? "s" : "");
334 WorldHasComeToAnEnd.WaitOne(); 336 WorldHasComeToAnEnd.WaitOne();
337 m_log.Info("[OPENSIM MAIN]: Shutdown complete, goodbye.");
338 Environment.Exit(0);
335 } 339 }
336 340
337 341
@@ -684,7 +688,7 @@ namespace OpenSim
684 public virtual void Shutdown() 688 public virtual void Shutdown()
685 { 689 {
686 InternalShutdown(); 690 InternalShutdown();
687 Environment.Exit(0); 691 ApocalypseNow();
688 } 692 }
689 693
690 /// <summary> 694 /// <summary>