aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
authorTeravus Ovares2007-11-25 04:52:14 +0000
committerTeravus Ovares2007-11-25 04:52:14 +0000
commitd263a044b1ebb13477b2b391637ccc2da4368838 (patch)
tree6288ef8e8f2a1c073705b23db8aba8603a28c34d /OpenSim/Region/Application
parentIgnore nullreferenceexception in removeclient. The avatar is already gone. (diff)
downloadopensim-SC_OLD-d263a044b1ebb13477b2b391637ccc2da4368838.zip
opensim-SC_OLD-d263a044b1ebb13477b2b391637ccc2da4368838.tar.gz
opensim-SC_OLD-d263a044b1ebb13477b2b391637ccc2da4368838.tar.bz2
opensim-SC_OLD-d263a044b1ebb13477b2b391637ccc2da4368838.tar.xz
* Added the ability to restart your individual sims from within them using the estate tools.
* The sims properly restart, however they don't yet notify the existing avatars that they are up. To see the sim again, you'll need to log-out and back in until I can figure out how to get the proper data to the sims and to the avatar so they reconnect again.
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs46
1 files changed, 45 insertions, 1 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index ed16cd4..8edfc6f 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -320,7 +320,7 @@ namespace OpenSim
320 plugin.Initialise(this); 320 plugin.Initialise(this);
321 m_plugins.Add(plugin); 321 m_plugins.Add(plugin);
322 } 322 }
323 323
324 // Start UDP servers 324 // Start UDP servers
325 for (int i = 0; i < m_udpServers.Count; i++) 325 for (int i = 0; i < m_udpServers.Count; i++)
326 { 326 {
@@ -412,6 +412,50 @@ namespace OpenSim
412 412
413 m_assetCache = new AssetCache(assetServer, m_log); 413 m_assetCache = new AssetCache(assetServer, m_log);
414 // m_assetCache = new assetCache("OpenSim.Region.GridInterfaces.Local.dll", m_networkServersInfo.AssetURL, m_networkServersInfo.AssetSendKey); 414 // m_assetCache = new assetCache("OpenSim.Region.GridInterfaces.Local.dll", m_networkServersInfo.AssetURL, m_networkServersInfo.AssetSendKey);
415 m_sceneManager.OnReStartSim += handleReStartRegion;
416
417 }
418 public void handleReStartRegion(RegionInfo whichRegion)
419 {
420 MainLog.Instance.Error("MAIN", "Got Restart Singlal from SceneManager");
421 // Shutting down the UDP server
422 bool foundUDPServer = false;
423 int UDPServerElement = 0;
424
425 for (int i = 0; i < m_udpServers.Count; i++)
426 {
427
428 if (m_udpServers[i].RegionHandle == whichRegion.RegionHandle)
429 {
430 UDPServerElement = i;
431 foundUDPServer = true;
432 break;
433 }
434 }
435 if (foundUDPServer)
436 {
437 // m_udpServers[UDPServerElement].Server.End
438 m_udpServers[UDPServerElement].Server.Close();
439 m_udpServers.RemoveAt(UDPServerElement);
440 }
441
442 //Removing the region from the sim's database of regions..
443 int RegionHandleElement = -1;
444 for (int i = 0; i < m_regionData.Count; i++)
445 {
446 if (whichRegion.RegionHandle == m_regionData[i].RegionHandle)
447 {
448 RegionHandleElement = i;
449 }
450 }
451 if (RegionHandleElement >= 0)
452 {
453 m_regionData.RemoveAt(RegionHandleElement);
454 }
455 UDPServer restartingRegion = CreateRegion(whichRegion);
456 restartingRegion.ServerListener();
457 m_sceneManager.SendSimOnlineNotification(restartingRegion.RegionHandle);
458
415 } 459 }
416 460
417 protected override LogBase CreateLog() 461 protected override LogBase CreateLog()