aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs40
1 files changed, 38 insertions, 2 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 597b439..e5fbc69 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -359,6 +359,42 @@ namespace OpenSim.ApplicationPlugins.RemoteController
359 notice = false; 359 notice = false;
360 } 360 }
361 361
362 if (startupConfig.GetBoolean("SkipDelayOnEmptyRegion", false))
363 {
364 m_log.Info("[RADMIN]: Counting affected avatars");
365 int agents = 0;
366
367 if (restartAll)
368 {
369 foreach (Scene s in m_application.SceneManager.Scenes)
370 {
371 foreach (ScenePresence sp in s.GetScenePresences())
372 {
373 if (!sp.IsChildAgent)
374 agents++;
375 }
376 }
377 }
378 else
379 {
380 foreach (ScenePresence sp in rebootedScene.GetScenePresences())
381 {
382 if (!sp.IsChildAgent)
383 agents++;
384 }
385 }
386
387 m_log.InfoFormat("[RADMIN]: Avatars in region: {0}", agents);
388
389 if (agents == 0)
390 {
391 m_log.Info("[RADMIN]: No avatars detected, shutting down without delay");
392
393 times.Clear();
394 times.Add(0);
395 }
396 }
397
362 List<Scene> restartList; 398 List<Scene> restartList;
363 399
364 if (restartAll) 400 if (restartAll)
@@ -376,10 +412,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
376 } 412 }
377 catch (Exception e) 413 catch (Exception e)
378 { 414 {
379// m_log.ErrorFormat("[RADMIN]: Restart region: failed: {0} {1}", e.Message, e.StackTrace); 415 m_log.ErrorFormat("[RADMIN]: Restart region: failed: {0} {1}", e.Message, e.StackTrace);
380 responseData["rebooting"] = false; 416 responseData["rebooting"] = false;
381 417
382 throw e; 418 throw;
383 } 419 }
384 420
385 m_log.Info("[RADMIN]: Restart Region request complete"); 421 m_log.Info("[RADMIN]: Restart Region request complete");