diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 46 |
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() |