aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
diff options
context:
space:
mode:
authorUbitUmarov2017-04-25 17:59:53 +0100
committerUbitUmarov2017-04-25 17:59:53 +0100
commita680d8b8d700f78beb1a9eea98b52d59118efe2e (patch)
treedd084e74fb61400c704a14dcfa8689670acb9ec2 /OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
parentMerge branch 'master' into httptests (diff)
parentmove mesh pbs creation code out of mesh upload code into to PrimitiveBaseShap... (diff)
downloadopensim-SC-a680d8b8d700f78beb1a9eea98b52d59118efe2e.zip
opensim-SC-a680d8b8d700f78beb1a9eea98b52d59118efe2e.tar.gz
opensim-SC-a680d8b8d700f78beb1a9eea98b52d59118efe2e.tar.bz2
opensim-SC-a680d8b8d700f78beb1a9eea98b52d59118efe2e.tar.xz
fix merge
Diffstat (limited to '')
-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..1ee2468 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 && !sp.IsNPC)
374 agents++;
375 }
376 }
377 }
378 else
379 {
380 foreach (ScenePresence sp in rebootedScene.GetScenePresences())
381 {
382 if (!sp.IsChildAgent && !sp.IsNPC)
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");