aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs2
-rw-r--r--OpenSim/Grid/GridServer/GridServerBase.cs2
-rw-r--r--OpenSim/Grid/MessagingServer/Main.cs2
-rw-r--r--OpenSim/Grid/UserServer/Main.cs2
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs24
-rw-r--r--OpenSim/Region/Application/OpenSimMainConsole.cs26
6 files changed, 11 insertions, 47 deletions
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index 2069c0e..af25ef4 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -52,7 +52,7 @@ namespace OpenSim.Framework.Servers
52 /// <summary> 52 /// <summary>
53 /// Should be overriden by descendents if they need to perform extra shutdown processing 53 /// Should be overriden by descendents if they need to perform extra shutdown processing
54 /// </summary> 54 /// </summary>
55 protected virtual void Shutdown() 55 public virtual void Shutdown()
56 { 56 {
57 m_console.Close(); 57 m_console.Close();
58 Environment.Exit(0); 58 Environment.Exit(0);
diff --git a/OpenSim/Grid/GridServer/GridServerBase.cs b/OpenSim/Grid/GridServer/GridServerBase.cs
index 49c53e9..5517953 100644
--- a/OpenSim/Grid/GridServer/GridServerBase.cs
+++ b/OpenSim/Grid/GridServer/GridServerBase.cs
@@ -178,7 +178,7 @@ namespace OpenSim.Grid.GridServer
178 */ 178 */
179 } 179 }
180 180
181 protected override void Shutdown() 181 public override void Shutdown()
182 { 182 {
183 foreach (IGridPlugin plugin in m_plugins) plugin.Close(); 183 foreach (IGridPlugin plugin in m_plugins) plugin.Close();
184 184
diff --git a/OpenSim/Grid/MessagingServer/Main.cs b/OpenSim/Grid/MessagingServer/Main.cs
index 22a7d9c..9020ca4 100644
--- a/OpenSim/Grid/MessagingServer/Main.cs
+++ b/OpenSim/Grid/MessagingServer/Main.cs
@@ -142,7 +142,7 @@ namespace OpenSim.Grid.MessagingServer
142 } 142 }
143 } 143 }
144 144
145 protected override void Shutdown() 145 public override void Shutdown()
146 { 146 {
147 msgsvc.deregisterWithUserServer(); 147 msgsvc.deregisterWithUserServer();
148 148
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs
index b6f59e1..e1ccd02 100644
--- a/OpenSim/Grid/UserServer/Main.cs
+++ b/OpenSim/Grid/UserServer/Main.cs
@@ -244,7 +244,7 @@ namespace OpenSim.Grid.UserServer
244 } 244 }
245 } 245 }
246 246
247 protected override void Shutdown() 247 public override void Shutdown()
248 { 248 {
249 m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation; 249 m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation;
250 250
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index adfddcb..ec26d9d 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -330,20 +330,14 @@ namespace OpenSim
330 // We are done with startup 330 // We are done with startup
331 m_log.InfoFormat("[OPENSIM MAIN]: Startup complete, serving {0} region{1}", 331 m_log.InfoFormat("[OPENSIM MAIN]: Startup complete, serving {0} region{1}",
332 m_clientServers.Count.ToString(), m_clientServers.Count > 1 ? "s" : ""); 332 m_clientServers.Count.ToString(), m_clientServers.Count > 1 ? "s" : "");
333
333 WorldHasComeToAnEnd.WaitOne(); 334 WorldHasComeToAnEnd.WaitOne();
334 m_log.Info("[OPENSIM MAIN]: Shutdown complete, goodbye."); 335 m_log.Info("[OPENSIM MAIN]: Shutdown complete, goodbye.");
336
335 Environment.Exit(0); 337 Environment.Exit(0);
336 } 338 }
337 339
338 /// <summary> 340 /// <summary>
339 /// Signal that the end of the world is now.
340 /// </summary>
341 public void ApocalypseNow()
342 {
343 WorldHasComeToAnEnd.Set();
344 }
345
346 /// <summary>
347 /// Print the version information available to the library. This include a subversion number if the root 341 /// Print the version information available to the library. This include a subversion number if the root
348 /// .svn/entries file is present. 342 /// .svn/entries file is present.
349 /// </summary> 343 /// </summary>
@@ -689,7 +683,7 @@ namespace OpenSim
689 /// <summary> 683 /// <summary>
690 /// Performs any last-minute sanity checking and shuts down the region server 684 /// Performs any last-minute sanity checking and shuts down the region server
691 /// </summary> 685 /// </summary>
692 protected virtual void InternalShutdown() 686 public override void Shutdown()
693 { 687 {
694 if (proxyUrl.Length > 0) 688 if (proxyUrl.Length > 0)
695 { 689 {
@@ -703,14 +697,10 @@ namespace OpenSim
703 m_log.Info("[SHUTDOWN]: Closing console and terminating"); 697 m_log.Info("[SHUTDOWN]: Closing console and terminating");
704 698
705 m_sceneManager.Close(); 699 m_sceneManager.Close();
706 // needs to be called by Shutdown() method 700
707 // Environment.Exit(0); 701 WorldHasComeToAnEnd.Set();
708 } 702
709 703 base.Shutdown();
710 public virtual void Shutdown()
711 {
712 InternalShutdown();
713 ApocalypseNow();
714 } 704 }
715 705
716 /// <summary> 706 /// <summary>
diff --git a/OpenSim/Region/Application/OpenSimMainConsole.cs b/OpenSim/Region/Application/OpenSimMainConsole.cs
index c02095c..f33441f 100644
--- a/OpenSim/Region/Application/OpenSimMainConsole.cs
+++ b/OpenSim/Region/Application/OpenSimMainConsole.cs
@@ -120,32 +120,6 @@ namespace OpenSim
120 return new ConsoleBase("Region", this); 120 return new ConsoleBase("Region", this);
121 } 121 }
122 122
123 /// <summary>
124 /// Performs any last-minute sanity checking and shuts down the region server
125 /// </summary>
126 public override void Shutdown()
127 {
128 if (m_startupCommandsFile != String.Empty)
129 {
130 RunCommandScript(m_shutdownCommandsFile);
131 }
132
133 if (proxyUrl.Length > 0)
134 {
135 Util.XmlRpcCommand(proxyUrl, "Stop");
136 }
137
138 m_log.Info("[SHUTDOWN]: Closing all threads");
139 m_log.Info("[SHUTDOWN]: Killing listener thread");
140 m_log.Info("[SHUTDOWN]: Killing clients");
141 // TODO: implement this
142 m_log.Info("[SHUTDOWN]: Closing console and terminating");
143
144 m_sceneManager.Close();
145
146 base.Shutdown();
147 }
148
149 private void RunAutoTimerScript(object sender, EventArgs e) 123 private void RunAutoTimerScript(object sender, EventArgs e)
150 { 124 {
151 if (m_timedScript != "disabled") 125 if (m_timedScript != "disabled")