From cacc02883526d6913be13d745215d7367708412e Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 17 Nov 2011 21:03:08 +0000
Subject: If the entire simulator is shutting down then don't bother to unload
the scripts from the appdomain in XEngine.
All the other actions (script state save, etc.) still occur.
This makes shutdown where there are many scripts vastly quicker.
---
OpenSim/Region/Framework/Scenes/EventManager.cs | 26 +++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes')
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index 4906665..4a4d98f 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -98,9 +98,10 @@ namespace OpenSim.Region.Framework.Scenes
public event OnPluginConsoleDelegate OnPluginConsole;
- public delegate void OnShutdownDelegate();
-
- public event OnShutdownDelegate OnShutdown;
+ ///
+ /// Triggered when the entire simulator is shutdown.
+ ///
+ public event Action OnShutdown;
public delegate void ObjectDeGrabDelegate(uint localID, uint originalID, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs);
public delegate void ScriptResetDelegate(uint localID, UUID itemID);
@@ -113,9 +114,14 @@ namespace OpenSim.Region.Framework.Scenes
public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
- public delegate void SceneShuttingDownDelegate(Scene scene);
-
- public event SceneShuttingDownDelegate OnSceneShuttingDown;
+ ///
+ /// Triggered when an individual scene is shutdown.
+ ///
+ ///
+ /// This does not automatically mean that the entire simulator is shutting down. Listen to OnShutdown for that
+ /// notification.
+ ///
+ public event Action OnSceneShuttingDown;
///
/// Fired when an object is touched/grabbed.
@@ -869,10 +875,10 @@ namespace OpenSim.Region.Framework.Scenes
public void TriggerShutdown()
{
- OnShutdownDelegate handlerShutdown = OnShutdown;
+ Action handlerShutdown = OnShutdown;
if (handlerShutdown != null)
{
- foreach (OnShutdownDelegate d in handlerShutdown.GetInvocationList())
+ foreach (Action d in handlerShutdown.GetInvocationList())
{
try
{
@@ -2212,10 +2218,10 @@ namespace OpenSim.Region.Framework.Scenes
public void TriggerSceneShuttingDown(Scene s)
{
- SceneShuttingDownDelegate handler = OnSceneShuttingDown;
+ Action handler = OnSceneShuttingDown;
if (handler != null)
{
- foreach (SceneShuttingDownDelegate d in handler.GetInvocationList())
+ foreach (Action d in handler.GetInvocationList())
{
try
{
--
cgit v1.1
From 01ae916bad672722aa62ee712b7b580d6f5f4370 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 19 Nov 2011 00:07:34 +0000
Subject: Don't register a region twice on both official registration and
maptile regeneration.
Maptile storage appears orthogonal to region registration
---
OpenSim/Region/Framework/Scenes/Scene.cs | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index f10789b..47450ed 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -5017,18 +5017,16 @@ namespace OpenSim.Region.Framework.Scenes
return offsets.ToArray();
}
+ ///
+ /// Regenerate the maptile for this scene.
+ ///
+ ///
+ ///
public void RegenerateMaptile(object sender, ElapsedEventArgs e)
{
IWorldMapModule mapModule = RequestModuleInterface();
if (mapModule != null)
- {
mapModule.GenerateMaptile();
-
- string error = GridService.RegisterRegion(RegionInfo.ScopeID, new GridRegion(RegionInfo));
-
- if (error != String.Empty)
- throw new Exception(error);
- }
}
// This method is called across the simulation connector to
--
cgit v1.1
From 10a23a823edb261af2c0b7895ce0898ea6918ef1 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 19 Nov 2011 01:16:07 +0000
Subject: Get rid of the spurious [WEB UTIL] couldn't decode : Invalid character 'O' in input string
messages
These are just the result of an attempt to canonicalize received messages - it's not important that we constantly log them.
Also finally get the deregister grid service message working properly
---
OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes')
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
index 0e22156..d76ed3e 100644
--- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
@@ -174,7 +174,6 @@ namespace OpenSim.Region.Framework.Scenes
{
// We're ignoring a collection was modified error because this data gets old and outdated fast.
}
-
}
///
@@ -182,13 +181,18 @@ namespace OpenSim.Region.Framework.Scenes
///
protected void SendCloseChildAgent(UUID agentID, ulong regionHandle)
{
- m_log.Debug("[INTERGRID]: Sending close agent to " + regionHandle);
// let's do our best, but there's not much we can do if the neighbour doesn't accept.
//m_commsProvider.InterRegion.TellRegionToCloseChildConnection(regionHandle, agentID);
uint x = 0, y = 0;
Utils.LongToUInts(regionHandle, out x, out y);
+
GridRegion destination = m_scene.GridService.GetRegionByPosition(m_regionInfo.ScopeID, (int)x, (int)y);
+
+ m_log.DebugFormat(
+ "[INTERGRID]: Sending close agent {0} to region at {1}-{2}",
+ agentID, destination.RegionCoordX, destination.RegionCoordY);
+
m_scene.SimulationService.CloseAgent(destination, agentID);
}
--
cgit v1.1