From 7cf2d261b3063960d6a17cd43494712144972033 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Tue, 24 Nov 2015 12:51:58 +0000
Subject: reduce 'echos' on several regions per instance (mantis 7754)
---
OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
index fd6202a..ff2527e 100644
--- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
@@ -294,7 +294,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
s.ForEachScenePresence(
delegate(ScenePresence presence)
{
- if (destination != UUID.Zero && presence.UUID != destination)
+ if (destination != UUID.Zero &&
+ (presence.UUID != destination || receiverIDs.Contains(presence.UUID)))
return;
ILandObject Presencecheck = s.LandChannel.GetLandObject(presence.AbsolutePosition.X, presence.AbsolutePosition.Y);
if (Presencecheck != null)
--
cgit v1.1
From f45905851ab0a49dd29fdff0491cefb75cca4b35 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Tue, 24 Nov 2015 14:01:51 +0000
Subject: at end of teleport disable the sending simulator, not destiny
---
.../CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index ed93f05..3fe8171 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -1049,6 +1049,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
sp.HasMovedAway(!(OutSideViewRange || logout));
+ ulong sourceRegionHandle = sp.RegionHandle;
+
// Now let's make it officially a child agent
sp.MakeChildAgent(destinationHandle);
@@ -1067,7 +1069,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
// an agent cannot teleport back to this region if it has teleported away.
Thread.Sleep(2000);
if (m_eqModule != null && !sp.DoNotCloseAfterTeleport)
- m_eqModule.DisableSimulator(sp.RegionHandle,sp.UUID);
+ m_eqModule.DisableSimulator(sourceRegionHandle,sp.UUID);
Thread.Sleep(500);
sp.Scene.CloseAgent(sp.UUID, false);
}
@@ -1194,6 +1196,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
//HG hook
AgentHasMovedAway(sp, logout);
+ ulong sourceRegionHandle = sp.RegionHandle;
+
// Now let's make it officially a child agent
sp.MakeChildAgent(destinationHandle);
@@ -1215,7 +1219,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
Thread.Sleep(14000);
if (m_eqModule != null && !sp.DoNotCloseAfterTeleport)
- m_eqModule.DisableSimulator(sp.RegionHandle,sp.UUID);
+ m_eqModule.DisableSimulator(sourceRegionHandle,sp.UUID);
Thread.Sleep(1000);
// OK, it got this agent. Let's close everything
--
cgit v1.1
From 08d061d2018acfd44f904c82f734156d10914fe1 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Tue, 24 Nov 2015 14:28:35 +0000
Subject: reset control even prior to use
---
.../CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs | 2 ++
1 file changed, 2 insertions(+)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
index 3971da0..2ef86c9 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
@@ -556,6 +556,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
// In the future, we need to be able to do this programatically more predicably.
scene.EventManager.OnChatFromWorld += OnChatFromWorld;
+ m_chatEvent.Reset();
scene.AttachmentsModule.RezSingleAttachmentFromInventory(sp, userItem.ID, (uint)AttachmentPoint.Chest);
m_chatEvent.WaitOne(60000);
@@ -669,6 +670,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
// In the future, we need to be able to do this programatically more predicably.
scene.EventManager.OnChatFromWorld += OnChatFromWorld;
+ m_chatEvent.Reset();
SceneObjectGroup rezzedSo
= (SceneObjectGroup)(scene.AttachmentsModule.RezSingleAttachmentFromInventory(sp, userItem.ID, (uint)AttachmentPoint.Chest));
--
cgit v1.1
From a0c3297b37d2aa7c9c778e667380fbe31f41a243 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Tue, 24 Nov 2015 15:12:39 +0000
Subject: again chat echos, check repeats uncondicionally
---
OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
index ff2527e..3b56ca6 100644
--- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
@@ -294,9 +294,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
s.ForEachScenePresence(
delegate(ScenePresence presence)
{
- if (destination != UUID.Zero &&
- (presence.UUID != destination || receiverIDs.Contains(presence.UUID)))
+ if (receiverIDs.Contains(presence.UUID))
+ return; // already sent to this presence
+
+ if (destination != UUID.Zero && presence.UUID != destination)
return;
+
ILandObject Presencecheck = s.LandChannel.GetLandObject(presence.AbsolutePosition.X, presence.AbsolutePosition.Y);
if (Presencecheck != null)
{
--
cgit v1.1
From 6d5b405168b4fb9f137e63dae8669cfcf940d7b7 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Tue, 24 Nov 2015 17:28:05 +0000
Subject: simplify DeliverChatToAvatars(..) ( hopefully not breaking it )
---
.../Region/CoreModules/Avatar/Chat/ChatModule.cs | 135 ++++++++++-----------
1 file changed, 62 insertions(+), 73 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
index 3b56ca6..ee0a4f8 100644
--- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
@@ -206,7 +206,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
UUID fromID = UUID.Zero;
UUID ownerID = UUID.Zero;
string message = c.Message;
- IScene scene = c.Scene;
+ Scene scene = c.Scene as Scene;
UUID destination = c.Destination;
Vector3 fromPos = c.Position;
Vector3 regionPos = new Vector3(scene.RegionInfo.WorldLocX, scene.RegionInfo.WorldLocY, 0);
@@ -217,47 +217,48 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
if (c.Channel == DEBUG_CHANNEL) c.Type = ChatTypeEnum.DebugChannel;
+ if(!m_scenes.Contains(scene))
+ {
+ m_log.WarnFormat("[CHAT]: message from unkown scene {0} ignored",
+ scene.RegionInfo.RegionName);
+ return;
+ }
+
switch (sourceType)
{
- case ChatSourceType.Agent:
- if (!(scene is Scene))
- {
- m_log.WarnFormat("[CHAT]: scene {0} is not a Scene object, cannot obtain scene presence for {1}",
- scene.RegionInfo.RegionName, c.Sender.AgentId);
- return;
- }
- ScenePresence avatar = (scene as Scene).GetScenePresence(c.Sender.AgentId);
- fromPos = avatar.AbsolutePosition;
- fromName = avatar.Name;
- fromID = c.Sender.AgentId;
- if (avatar.GodLevel >= 200)
- { // let gods speak to outside or things may get confusing
- fromNamePrefix = m_adminPrefix;
- checkParcelHide = false;
- }
- else
- {
- checkParcelHide = true;
- }
- destination = UUID.Zero; // Avatars cant "SayTo"
- ownerID = c.Sender.AgentId;
+ case ChatSourceType.Agent:
+ ScenePresence avatar = (scene as Scene).GetScenePresence(c.Sender.AgentId);
+ fromPos = avatar.AbsolutePosition;
+ fromName = avatar.Name;
+ fromID = c.Sender.AgentId;
+ if (avatar.GodLevel >= 200)
+ { // let gods speak to outside or things may get confusing
+ fromNamePrefix = m_adminPrefix;
+ checkParcelHide = false;
+ }
+ else
+ {
+ checkParcelHide = true;
+ }
+ destination = UUID.Zero; // Avatars cant "SayTo"
+ ownerID = c.Sender.AgentId;
- hidePos = fromPos;
- break;
+ hidePos = fromPos;
+ break;
- case ChatSourceType.Object:
- fromID = c.SenderUUID;
+ case ChatSourceType.Object:
+ fromID = c.SenderUUID;
- if (c.SenderObject != null && c.SenderObject is SceneObjectPart)
- {
- ownerID = ((SceneObjectPart)c.SenderObject).OwnerID;
- if (((SceneObjectPart)c.SenderObject).ParentGroup.IsAttachment)
+ if (c.SenderObject != null && c.SenderObject is SceneObjectPart)
{
- checkParcelHide = true;
- hidePos = ((SceneObjectPart)c.SenderObject).ParentGroup.AbsolutePosition;
+ ownerID = ((SceneObjectPart)c.SenderObject).OwnerID;
+ if (((SceneObjectPart)c.SenderObject).ParentGroup.IsAttachment)
+ {
+ checkParcelHide = true;
+ hidePos = ((SceneObjectPart)c.SenderObject).ParentGroup.AbsolutePosition;
+ }
}
- }
- break;
+ break;
}
// TODO: iterate over message
@@ -275,7 +276,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
checkParcelHide = false;
if (c.Type < ChatTypeEnum.DebugChannel && destination == UUID.Zero)
{
- ILandObject srcland = (scene as Scene).LandChannel.GetLandObject(hidePos.X, hidePos.Y);
+ ILandObject srcland = scene.LandChannel.GetLandObject(hidePos.X, hidePos.Y);
if (srcland != null && !srcland.LandData.SeeAVs)
{
sourceParcelID = srcland.LandData.GlobalID;
@@ -284,54 +285,42 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
}
}
- foreach (Scene s in m_scenes)
- {
- // This should use ForEachClient, but clients don't have a position.
- // If camera is moved into client, then camera position can be used
- // MT: No, it can't, as chat is heard from the avatar position, not
- // the camera position.
-
- s.ForEachScenePresence(
- delegate(ScenePresence presence)
- {
- if (receiverIDs.Contains(presence.UUID))
- return; // already sent to this presence
+ scene.ForEachScenePresence(
+ delegate(ScenePresence presence)
+ {
+ if (destination != UUID.Zero && presence.UUID != destination)
+ return;
- if (destination != UUID.Zero && presence.UUID != destination)
+ if(presence.IsChildAgent)
+ {
+ if(checkParcelHide)
+ return;
+ if (TrySendChatMessage(presence, fromPos, regionPos, fromID,
+ ownerID, fromNamePrefix + fromName, c.Type,
+ message, sourceType, (destination != UUID.Zero)))
+ receiverIDs.Add(presence.UUID);
return;
+ }
- ILandObject Presencecheck = s.LandChannel.GetLandObject(presence.AbsolutePosition.X, presence.AbsolutePosition.Y);
- if (Presencecheck != null)
+ ILandObject Presencecheck = scene.LandChannel.GetLandObject(presence.AbsolutePosition.X, presence.AbsolutePosition.Y);
+ if (Presencecheck != null)
+ {
+ if (checkParcelHide)
{
- // This will pass all chat from objects. Not
- // perfect, but it will do. For now. Better
- // than the prior behavior of muting all
- // objects on a parcel with access restrictions
- if (checkParcelHide)
- {
- if (sourceParcelID != Presencecheck.LandData.GlobalID && presence.GodLevel < 200)
- return;
- }
- if (c.Sender == null || Presencecheck.IsEitherBannedOrRestricted(c.Sender.AgentId) != true)
- {
- if (TrySendChatMessage(presence, fromPos, regionPos, fromID,
- ownerID, fromNamePrefix + fromName, c.Type,
- message, sourceType, (destination != UUID.Zero)))
- receiverIDs.Add(presence.UUID);
- }
+ if (sourceParcelID != Presencecheck.LandData.GlobalID && presence.GodLevel < 200)
+ return;
}
- else if(!checkParcelHide && (presence.IsChildAgent))
+ if (c.Sender == null || Presencecheck.IsEitherBannedOrRestricted(c.Sender.AgentId) != true)
{
if (TrySendChatMessage(presence, fromPos, regionPos, fromID,
- ownerID, fromNamePrefix + fromName, c.Type,
- message, sourceType, (destination != UUID.Zero)))
+ ownerID, fromNamePrefix + fromName, c.Type,
+ message, sourceType, (destination != UUID.Zero)))
receiverIDs.Add(presence.UUID);
}
}
- );
- }
+ });
- (scene as Scene).EventManager.TriggerOnChatToClients(
+ scene.EventManager.TriggerOnChatToClients(
fromID, receiverIDs, message, c.Type, fromPos, fromName, sourceType, ChatAudibleLevel.Fully);
}
--
cgit v1.1
From 583c8747737a5dc7ad38e1f7a930d8b2d7342457 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Wed, 25 Nov 2015 03:21:38 +0000
Subject: remove default of 60minutes on MapImageService Refresh time,
forgotten from early merge debug
---
.../CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs
index ef0eec5..f40541e 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs
@@ -94,7 +94,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
if (config == null)
return;
- int refreshminutes = Convert.ToInt32(config.GetString("RefreshTime", "60"));
+ int refreshminutes = Convert.ToInt32(config.GetString("RefreshTime"));
if (refreshminutes < 0)
{
m_log.WarnFormat("[MAP IMAGE SERVICE MODULE]: Negative refresh time given in config. Module disabled.");
--
cgit v1.1
From 172bb05ec257b1abb3554eeb6c5b8bcbdae89b78 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Wed, 25 Nov 2015 04:13:13 +0000
Subject: suspend the use of DisableSimulator, that is causing teleport and
crossing issues
---
.../EntityTransfer/EntityTransferModule.cs | 21 ++++++++++-----------
OpenSim/Region/Framework/Scenes/ScenePresence.cs | 8 ++++----
2 files changed, 14 insertions(+), 15 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 3fe8171..9899ccd 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -1068,8 +1068,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
// This sleep can be increased if necessary. However, whilst it's active,
// an agent cannot teleport back to this region if it has teleported away.
Thread.Sleep(2000);
- if (m_eqModule != null && !sp.DoNotCloseAfterTeleport)
- m_eqModule.DisableSimulator(sourceRegionHandle,sp.UUID);
+// if (m_eqModule != null && !sp.DoNotCloseAfterTeleport)
+// m_eqModule.DisableSimulator(sourceRegionHandle,sp.UUID);
Thread.Sleep(500);
sp.Scene.CloseAgent(sp.UUID, false);
}
@@ -1201,8 +1201,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
// Now let's make it officially a child agent
sp.MakeChildAgent(destinationHandle);
-
-
// Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone
// go by HG hook
if (NeedsClosing(reg, OutSideViewRange))
@@ -1217,10 +1215,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
// DECREASING THE WAIT TIME HERE WILL EITHER RESULT IN A VIEWER CRASH OR
// IN THE AVIE BEING PLACED IN INFINITY FOR A COUPLE OF SECONDS.
- Thread.Sleep(14000);
- if (m_eqModule != null && !sp.DoNotCloseAfterTeleport)
- m_eqModule.DisableSimulator(sourceRegionHandle,sp.UUID);
- Thread.Sleep(1000);
+ Thread.Sleep(15000);
+// if (m_eqModule != null && !sp.DoNotCloseAfterTeleport)
+// m_eqModule.DisableSimulator(sourceRegionHandle,sp.UUID);
+// Thread.Sleep(1000);
// OK, it got this agent. Let's close everything
// If we shouldn't close the agent due to some other region renewing the connection
@@ -1806,6 +1804,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
// Unlike a teleport, here we do not wait for the destination region to confirm the receipt.
m_entityTransferStateMachine.UpdateInTransit(agent.UUID, AgentTransferState.CleaningUp);
+
+
+ agent.CloseChildAgents(false, neighbourRegion.RegionHandle, neighbourRegion.RegionSizeX, neighbourRegion.RegionSizeY);
+
// this may need the attachments
agent.HasMovedAway(true);
@@ -1815,9 +1817,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
// FIXME: Possibly this should occur lower down after other commands to close other agents,
// but not sure yet what the side effects would be.
m_entityTransferStateMachine.ResetFromTransit(agent.UUID);
-
- agent.CloseChildAgents(false, neighbourRegion.RegionHandle, neighbourRegion.RegionSizeX, neighbourRegion.RegionSizeY);
-
// TODO: Check since what version this wasn't needed anymore. May be as old as 0.6
/*
// Backwards compatibility. Best effort
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 5903274..0d2c8c3 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -4143,8 +4143,8 @@ namespace OpenSim.Region.Framework.Scenes
{
byebyeRegions.Add(handle);
// this should not be here
- if(eventQueue != null)
- eventQueue.DisableSimulator(handle,UUID);
+// if(eventQueue != null)
+/// eventQueue.DisableSimulator(handle,UUID);
}
}
else
@@ -4154,8 +4154,8 @@ namespace OpenSim.Region.Framework.Scenes
{
byebyeRegions.Add(handle);
// this should not be here
- if(eventQueue != null)
- eventQueue.DisableSimulator(handle,UUID);
+// if(eventQueue != null)
+// eventQueue.DisableSimulator(handle,UUID);
}
}
}
--
cgit v1.1
From 9afe2b018fbe444c0500695dbce37bdce126feee Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Thu, 26 Nov 2015 17:29:50 +0100
Subject: Mantis #7765: Add new ClampNegativeZ option. Defaults to false to
restore prior functionality. Avination code wasn't designed for deep
building.
---
OpenSim/Region/Framework/Scenes/Scene.cs | 9 +++++++++
OpenSim/Region/Framework/Scenes/SceneGraph.cs | 6 ++++--
2 files changed, 13 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 55c4fda..2296981 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -174,6 +174,13 @@ namespace OpenSim.Region.Framework.Scenes
public SynchronizeSceneHandler SynchronizeScene;
+ public bool ClampNegativeZ
+ {
+ get { return m_clampNegativeZ; }
+ }
+
+ private bool m_clampNegativeZ = false;
+
///
/// Used to prevent simultaneous calls to code that adds and removes agents.
///
@@ -1029,6 +1036,8 @@ namespace OpenSim.Region.Framework.Scenes
m_clampPrimSize = true;
}
+ m_clampNegativeZ = startupConfig.GetBoolean("ClampNegativeZ", m_clampNegativeZ);
+
m_useTrashOnDelete = startupConfig.GetBoolean("UseTrashOnDelete",m_useTrashOnDelete);
m_trustBinaries = startupConfig.GetBoolean("TrustBinaries", m_trustBinaries);
m_allowScriptCrossings = startupConfig.GetBoolean("AllowScriptCrossing", m_allowScriptCrossings);
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 9308500..2ecb55b 100755
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -296,13 +296,15 @@ namespace OpenSim.Region.Framework.Scenes
Vector3 npos = new Vector3(sceneObject.RootPart.GroupPosition.X,
sceneObject.RootPart.GroupPosition.Y,
sceneObject.RootPart.GroupPosition.Z);
- if (!(((sceneObject.RootPart.Shape.PCode == (byte)PCode.Prim) && (sceneObject.RootPart.Shape.State != 0))) && (npos.X < 0.0 || npos.Y < 0.0 || npos.Z < 0.0 ||
+ bool clampZ = m_parentScene.ClampNegativeZ;
+
+ if (!(((sceneObject.RootPart.Shape.PCode == (byte)PCode.Prim) && (sceneObject.RootPart.Shape.State != 0))) && (npos.X < 0.0 || npos.Y < 0.0 || (npos.Z < 0.0 && clampZ) ||
npos.X > regionSizeX ||
npos.Y > regionSizeY))
{
if (npos.X < 0.0) npos.X = 1.0f;
if (npos.Y < 0.0) npos.Y = 1.0f;
- if (npos.Z < 0.0) npos.Z = 0.0f;
+ if (npos.Z < 0.0 && clampZ) npos.Z = 0.0f;
if (npos.X > regionSizeX) npos.X = regionSizeX - 1.0f;
if (npos.Y > regionSizeY) npos.Y = regionSizeY - 1.0f;
--
cgit v1.1
From c0e920c1ad130e19e7359b4fd5f230eb865439bf Mon Sep 17 00:00:00 2001
From: Jak Daniels
Date: Thu, 26 Nov 2015 23:53:40 +0000
Subject: Fix Region Max height in boundingSize parameters checking in
ArchiverModule.cs to float.MaxValue .. as was changed in
ArchiveReadRequest.cs in commit 71f5c2b856aeab2b535094804f15317d5dc544e1 A
comparison of consistent 'default' values determines whether boundingBox
check is true.
Signed-off-by: UbitUmarov
---
OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs
index cdc605b..ca94f42 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs
@@ -112,7 +112,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
float rotation = 0f;
Vector3 rotationCenter = new Vector3(Scene.RegionInfo.RegionSizeX / 2f, Scene.RegionInfo.RegionSizeY / 2f, 0);
Vector3 boundingOrigin = new Vector3(0f, 0f, 0f);
- Vector3 boundingSize = new Vector3(Scene.RegionInfo.RegionSizeX, Scene.RegionInfo.RegionSizeY, Constants.RegionHeight);
+ Vector3 boundingSize = new Vector3(Scene.RegionInfo.RegionSizeX, Scene.RegionInfo.RegionSizeY, float.MaxValue);
bool debug = false;
OptionSet options = new OptionSet();
@@ -183,7 +183,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
{
try
{
- boundingSize = v == null ? new Vector3(Scene.RegionInfo.RegionSizeX, Scene.RegionInfo.RegionSizeY, Constants.RegionHeight) : Vector3.Parse(v);
+ boundingSize = v == null ? new Vector3(Scene.RegionInfo.RegionSizeX, Scene.RegionInfo.RegionSizeY, float.MaxValue) : Vector3.Parse(v);
}
catch
{
--
cgit v1.1
From f16d36627f949a3568fea09dddcb76c9f8d823e6 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Fri, 27 Nov 2015 05:00:11 +0000
Subject: change threading on GetTexture and GetMesh NonSharable region
modules
---
.../ClientStack/Linden/Caps/GetMeshModule.cs | 39 +++++++++--------
.../ClientStack/Linden/Caps/GetTextureModule.cs | 49 ++++++++++------------
2 files changed, 44 insertions(+), 44 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
index b5a70040..f5b439b 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
@@ -57,8 +57,10 @@ namespace OpenSim.Region.ClientStack.Linden
// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Scene m_scene;
+ private string m_SceneName = "";
private IAssetService m_AssetService;
private bool m_Enabled = true;
+ private bool m_IsRunning = false;
private string m_URL;
private string m_URL2;
@@ -87,7 +89,7 @@ namespace OpenSim.Region.ClientStack.Linden
private IAssetService m_assetService = null;
private Dictionary m_capsDict = new Dictionary();
- private static Thread[] m_workerThreads = null;
+ private Thread[] m_workerThreads = null;
private static OpenMetaverse.BlockingQueue m_queue =
new OpenMetaverse.BlockingQueue();
@@ -97,13 +99,6 @@ namespace OpenSim.Region.ClientStack.Linden
#region Region Module interfaceBase Members
- ~GetMeshModule()
- {
- foreach (Thread t in m_workerThreads)
- Watchdog.AbortThread(t.ManagedThreadId);
-
- }
-
public Type ReplaceableInterface
{
get { return null; }
@@ -167,6 +162,9 @@ namespace OpenSim.Region.ClientStack.Linden
m_scene.EventManager.OnDeregisterCaps += DeregisterCaps;
m_scene.EventManager.OnThrottleUpdate += ThrottleUpdate;
+ m_IsRunning = true;
+ m_SceneName = m_scene.Name;
+
if (m_workerThreads == null)
{
m_workerThreads = new Thread[2];
@@ -174,7 +172,7 @@ namespace OpenSim.Region.ClientStack.Linden
for (uint i = 0; i < 2; i++)
{
m_workerThreads[i] = WorkManager.StartThread(DoMeshRequests,
- String.Format("MeshWorkerThread{0}", i),
+ String.Format("GetMeshWorker[{0}]{1}",m_SceneName, i),
ThreadPriority.Normal,
false,
false,
@@ -182,11 +180,19 @@ namespace OpenSim.Region.ClientStack.Linden
int.MaxValue);
}
}
-
}
-
- public void Close() { }
+ public void Close()
+ {
+ if(m_IsRunning && m_workerThreads != null)
+ {
+ m_log.DebugFormat("[GetMeshModule] Closing{0}", m_SceneName);
+ m_IsRunning = false;
+ foreach (Thread t in m_workerThreads)
+ Watchdog.AbortThread(t.ManagedThreadId);
+ }
+ m_queue.Clear();
+ }
public string Name { get { return "GetMeshModule"; } }
@@ -194,10 +200,10 @@ namespace OpenSim.Region.ClientStack.Linden
private void DoMeshRequests()
{
- while (true)
+ while (m_IsRunning)
{
aPollRequest poolreq = m_queue.Dequeue();
-
+ Watchdog.UpdateThread();
poolreq.thepoll.Process(poolreq);
}
}
@@ -386,7 +392,7 @@ namespace OpenSim.Region.ClientStack.Linden
private volatile int BytesSent = 0;
private int Lod3 = 0;
private int Lod2 = 0;
- private int Lod1 = 0;
+// private int Lod1 = 0;
private int UserSetThrottle = 0;
private int UDPSetThrottle = 0;
private int CapSetThrottle = 0;
@@ -501,7 +507,7 @@ namespace OpenSim.Region.ClientStack.Linden
{
Lod3 = 0;
Lod2 = 0;
- Lod1 = 0;
+// Lod1 = 0;
}
}
}
@@ -534,6 +540,5 @@ namespace OpenSim.Region.ClientStack.Linden
}
}
-
}
}
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
index aa51a00..81170b8 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
@@ -75,7 +75,7 @@ namespace OpenSim.Region.ClientStack.Linden
private IAssetService m_assetService = null;
private Dictionary m_capsDict = new Dictionary();
- private static Thread[] m_workerThreads = null;
+ private Thread[] m_workerThreads = null;
private string m_Url = "localhost";
@@ -84,7 +84,8 @@ namespace OpenSim.Region.ClientStack.Linden
private Dictionary m_pollservices = new Dictionary();
-
+ private bool m_IsRunning = false;
+ private string m_SceneName = "";
#region ISharedRegionModule Members
public void Initialise(IConfigSource source)
@@ -128,6 +129,9 @@ namespace OpenSim.Region.ClientStack.Linden
m_scene.EventManager.OnDeregisterCaps += DeregisterCaps;
m_scene.EventManager.OnThrottleUpdate += ThrottleUpdate;
+ m_SceneName = m_scene.Name;
+ m_IsRunning = true;
+
if (m_workerThreads == null)
{
m_workerThreads = new Thread[2];
@@ -135,7 +139,7 @@ namespace OpenSim.Region.ClientStack.Linden
for (uint i = 0; i < 2; i++)
{
m_workerThreads[i] = WorkManager.StartThread(DoTextureRequests,
- String.Format("TextureWorkerThread{0}", i),
+ String.Format("GetTextureWorker[{0}]{1}",m_SceneName, i),
ThreadPriority.Normal,
false,
false,
@@ -165,17 +169,6 @@ namespace OpenSim.Region.ClientStack.Linden
adjData = pthrottles;
}
- // 0.125f converts from bits to bytes
- //int resend = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f);
- //pos += 4;
- // int land = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f);
- //pos += 4;
- // int wind = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f);
- // pos += 4;
- // int cloud = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f);
- // pos += 4;
- // int task = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f);
- // pos += 4;
pos = pos + 20;
int texture = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f); //pos += 4;
//int asset = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f);
@@ -199,7 +192,17 @@ namespace OpenSim.Region.ClientStack.Linden
{
}
- public void Close() { }
+ public void Close()
+ {
+ if(m_IsRunning && m_workerThreads != null)
+ {
+ m_log.DebugFormat("[GetTextureModule] Closing {0}", m_SceneName);
+ m_IsRunning = false;
+ foreach (Thread t in m_workerThreads)
+ Watchdog.AbortThread(t.ManagedThreadId);
+ }
+ m_queue.Clear();
+ }
public string Name { get { return "GetTextureModule"; } }
@@ -210,13 +213,6 @@ namespace OpenSim.Region.ClientStack.Linden
#endregion
- ~GetTextureModule()
- {
- foreach (Thread t in m_workerThreads)
- Watchdog.AbortThread(t.ManagedThreadId);
-
- }
-
private class PollServiceTextureEventArgs : PollServiceEventArgs
{
private List requests =
@@ -414,13 +410,14 @@ namespace OpenSim.Region.ClientStack.Linden
private void DoTextureRequests()
{
- while (true)
+ while (m_IsRunning)
{
aPollRequest poolreq = m_queue.Dequeue();
-
+ Watchdog.UpdateThread();
poolreq.thepoll.Process(poolreq);
}
}
+
internal sealed class CapsDataThrottler
{
@@ -498,7 +495,5 @@ namespace OpenSim.Region.ClientStack.Linden
}
public int ThrottleBytes;
}
- }
-
-
+ }
}
--
cgit v1.1
From 3029080d9b47dca7737675876d79d99eb14e385d Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Fri, 27 Nov 2015 07:38:54 +0000
Subject: change threading on GetTexture and getMesh and WebFetch Modules.
---
.../ClientStack/Linden/Caps/GetMeshModule.cs | 30 +++++-----
.../ClientStack/Linden/Caps/GetTextureModule.cs | 33 ++++++-----
.../Linden/Caps/WebFetchInvDescModule.cs | 68 ++++++++++++----------
3 files changed, 69 insertions(+), 62 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
index f5b439b..95d9c99 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
@@ -57,10 +57,8 @@ namespace OpenSim.Region.ClientStack.Linden
// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Scene m_scene;
- private string m_SceneName = "";
private IAssetService m_AssetService;
private bool m_Enabled = true;
- private bool m_IsRunning = false;
private string m_URL;
private string m_URL2;
@@ -89,8 +87,8 @@ namespace OpenSim.Region.ClientStack.Linden
private IAssetService m_assetService = null;
private Dictionary m_capsDict = new Dictionary();
- private Thread[] m_workerThreads = null;
-
+ private static Thread[] m_workerThreads = null;
+ private static int m_NumberScenes = 0;
private static OpenMetaverse.BlockingQueue m_queue =
new OpenMetaverse.BlockingQueue();
@@ -146,7 +144,7 @@ namespace OpenSim.Region.ClientStack.Linden
m_scene.EventManager.OnRegisterCaps -= RegisterCaps;
m_scene.EventManager.OnDeregisterCaps -= DeregisterCaps;
m_scene.EventManager.OnThrottleUpdate -= ThrottleUpdate;
-
+ m_NumberScenes--;
m_scene = null;
}
@@ -162,8 +160,7 @@ namespace OpenSim.Region.ClientStack.Linden
m_scene.EventManager.OnDeregisterCaps += DeregisterCaps;
m_scene.EventManager.OnThrottleUpdate += ThrottleUpdate;
- m_IsRunning = true;
- m_SceneName = m_scene.Name;
+ m_NumberScenes++;
if (m_workerThreads == null)
{
@@ -172,7 +169,7 @@ namespace OpenSim.Region.ClientStack.Linden
for (uint i = 0; i < 2; i++)
{
m_workerThreads[i] = WorkManager.StartThread(DoMeshRequests,
- String.Format("GetMeshWorker[{0}]{1}",m_SceneName, i),
+ String.Format("GetMeshWorker{0}", i),
ThreadPriority.Normal,
false,
false,
@@ -184,23 +181,22 @@ namespace OpenSim.Region.ClientStack.Linden
public void Close()
{
- if(m_IsRunning && m_workerThreads != null)
+ if(m_NumberScenes <= 0 && m_workerThreads != null)
{
- m_log.DebugFormat("[GetMeshModule] Closing{0}", m_SceneName);
- m_IsRunning = false;
+ m_log.DebugFormat("[GetMeshModule] Closing");
foreach (Thread t in m_workerThreads)
Watchdog.AbortThread(t.ManagedThreadId);
+ m_queue.Clear();
}
- m_queue.Clear();
}
public string Name { get { return "GetMeshModule"; } }
#endregion
- private void DoMeshRequests()
+ private static void DoMeshRequests()
{
- while (m_IsRunning)
+ while(true)
{
aPollRequest poolreq = m_queue.Dequeue();
Watchdog.UpdateThread();
@@ -299,6 +295,9 @@ namespace OpenSim.Region.ClientStack.Linden
UUID requestID = requestinfo.reqID;
+ if(m_scene.ShuttingDown)
+ return;
+
// If the avatar is gone, don't bother to get the texture
if (m_scene.GetScenePresence(Id) == null)
{
@@ -410,7 +409,6 @@ namespace OpenSim.Region.ClientStack.Linden
User = puser;
}
-
public bool hasEvents(UUID key, Dictionary responses)
{
const float ThirtyPercent = 0.30f;
@@ -492,7 +490,6 @@ namespace OpenSim.Region.ClientStack.Linden
PassTime();
}
-
private void PassTime()
{
currenttime = Util.EnvironmentTickCount();
@@ -511,6 +508,7 @@ namespace OpenSim.Region.ClientStack.Linden
}
}
}
+
private void AlterThrottle(int setting, ScenePresence p)
{
p.ControllingClient.SetAgentThrottleSilent((int)Throttle,setting);
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
index 81170b8..0c4e227 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
@@ -75,17 +75,15 @@ namespace OpenSim.Region.ClientStack.Linden
private IAssetService m_assetService = null;
private Dictionary m_capsDict = new Dictionary();
- private Thread[] m_workerThreads = null;
-
- private string m_Url = "localhost";
-
+ private static Thread[] m_workerThreads = null;
+ private static int m_NumberScenes = 0;
private static OpenMetaverse.BlockingQueue m_queue =
new OpenMetaverse.BlockingQueue();
private Dictionary m_pollservices = new Dictionary();
- private bool m_IsRunning = false;
- private string m_SceneName = "";
+ private string m_Url = "localhost";
+
#region ISharedRegionModule Members
public void Initialise(IConfigSource source)
@@ -117,6 +115,7 @@ namespace OpenSim.Region.ClientStack.Linden
m_scene.EventManager.OnRegisterCaps -= RegisterCaps;
m_scene.EventManager.OnDeregisterCaps -= DeregisterCaps;
m_scene.EventManager.OnThrottleUpdate -= ThrottleUpdate;
+ m_NumberScenes--;
m_scene = null;
}
@@ -129,8 +128,7 @@ namespace OpenSim.Region.ClientStack.Linden
m_scene.EventManager.OnDeregisterCaps += DeregisterCaps;
m_scene.EventManager.OnThrottleUpdate += ThrottleUpdate;
- m_SceneName = m_scene.Name;
- m_IsRunning = true;
+ m_NumberScenes++;
if (m_workerThreads == null)
{
@@ -139,7 +137,7 @@ namespace OpenSim.Region.ClientStack.Linden
for (uint i = 0; i < 2; i++)
{
m_workerThreads[i] = WorkManager.StartThread(DoTextureRequests,
- String.Format("GetTextureWorker[{0}]{1}",m_SceneName, i),
+ String.Format("GetTextureWorker{0}", i),
ThreadPriority.Normal,
false,
false,
@@ -194,14 +192,15 @@ namespace OpenSim.Region.ClientStack.Linden
public void Close()
{
- if(m_IsRunning && m_workerThreads != null)
+ if(m_NumberScenes <= 0 && m_workerThreads != null)
{
- m_log.DebugFormat("[GetTextureModule] Closing {0}", m_SceneName);
- m_IsRunning = false;
+ m_log.DebugFormat("[GetTextureModule] Closing");
+
foreach (Thread t in m_workerThreads)
Watchdog.AbortThread(t.ManagedThreadId);
+
+ m_queue.Clear();
}
- m_queue.Clear();
}
public string Name { get { return "GetTextureModule"; } }
@@ -302,11 +301,13 @@ namespace OpenSim.Region.ClientStack.Linden
UUID requestID = requestinfo.reqID;
+ if(m_scene.ShuttingDown)
+ return;
+
if (requestinfo.send503)
{
response = new Hashtable();
-
response["int_response_code"] = 503;
response["str_response_string"] = "Throttled";
response["content_type"] = "text/plain";
@@ -408,9 +409,9 @@ namespace OpenSim.Region.ClientStack.Linden
}
}
- private void DoTextureRequests()
+ private static void DoTextureRequests()
{
- while (m_IsRunning)
+ while (true)
{
aPollRequest poolreq = m_queue.Dequeue();
Watchdog.UpdateThread();
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
index 61f4cd0..83f60c7 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
@@ -102,6 +102,8 @@ namespace OpenSim.Region.ClientStack.Linden
private static DoubleQueue m_queue =
new DoubleQueue();
+ private static int m_NumberScenes = 0;
+
#region ISharedRegionModule Members
public WebFetchInvDescModule() : this(true) {}
@@ -145,17 +147,7 @@ namespace OpenSim.Region.ClientStack.Linden
StatsManager.DeregisterStat(s_processedRequestsStat);
StatsManager.DeregisterStat(s_queuedRequestsStat);
- if (ProcessQueuedRequestsAsync)
- {
- if (m_workerThreads != null)
- {
- foreach (Thread t in m_workerThreads)
- Watchdog.AbortThread(t.ManagedThreadId);
-
- m_workerThreads = null;
- }
- }
-
+ m_NumberScenes--;
Scene = null;
}
@@ -203,6 +195,8 @@ namespace OpenSim.Region.ClientStack.Linden
Scene.EventManager.OnRegisterCaps += RegisterCaps;
+ m_NumberScenes++;
+
int nworkers = 2; // was 2
if (ProcessQueuedRequestsAsync && m_workerThreads == null)
{
@@ -225,7 +219,23 @@ namespace OpenSim.Region.ClientStack.Linden
{
}
- public void Close() { }
+ public void Close()
+ {
+ if (!m_Enabled)
+ return;
+
+ if (ProcessQueuedRequestsAsync)
+ {
+ if (m_NumberScenes <= 0 && m_workerThreads != null)
+ {
+ m_log.DebugFormat("[WebFetchInvDescModule] Closing");
+ foreach (Thread t in m_workerThreads)
+ Watchdog.AbortThread(t.ManagedThreadId);
+
+ m_workerThreads = null;
+ }
+ }
+ }
public string Name { get { return "WebFetchInvDescModule"; } }
@@ -350,6 +360,9 @@ namespace OpenSim.Region.ClientStack.Linden
public void Process(aPollRequest requestinfo)
{
+ if(m_module == null || m_module.Scene == null || m_module.Scene.ShuttingDown)
+ return;
+
UUID requestID = requestinfo.reqID;
Hashtable response = new Hashtable();
@@ -425,31 +438,26 @@ namespace OpenSim.Region.ClientStack.Linden
// }
// }
- private void DoInventoryRequests()
+ private static void DoInventoryRequests()
{
while (true)
{
Watchdog.UpdateThread();
- WaitProcessQueuedInventoryRequest();
- }
- }
+ aPollRequest poolreq = m_queue.Dequeue();
- public void WaitProcessQueuedInventoryRequest()
- {
- aPollRequest poolreq = m_queue.Dequeue();
-
- if (poolreq != null && poolreq.thepoll != null)
- {
- try
+ if (poolreq != null && poolreq.thepoll != null)
{
- poolreq.thepoll.Process(poolreq);
- }
- catch (Exception e)
- {
- m_log.ErrorFormat(
- "[INVENTORY]: Failed to process queued inventory request {0} for {1} in {2}. Exception {3}",
- poolreq.reqID, poolreq.presence != null ? poolreq.presence.Name : "unknown", Scene.Name, e);
+ try
+ {
+ poolreq.thepoll.Process(poolreq);
+ }
+ catch (Exception e)
+ {
+ m_log.ErrorFormat(
+ "[INVENTORY]: Failed to process queued inventory request {0} for {1}. Exception {3}",
+ poolreq.reqID, poolreq.presence != null ? poolreq.presence.Name : "unknown", e);
+ }
}
}
}
--
cgit v1.1
From c5395cef7416d65e6459197973390adc826d7c36 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Fri, 27 Nov 2015 13:45:14 +0000
Subject: remove thread Heartbeat from watchdog
---
OpenSim/Region/Framework/Scenes/Scene.cs | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 2296981..7d98c94 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -531,11 +531,11 @@ namespace OpenSim.Region.Framework.Scenes
// private int m_lastUpdate;
private bool m_firstHeartbeat = true;
- private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time;
- private bool m_reprioritizationEnabled = true;
- private double m_reprioritizationInterval = 5000.0;
- private double m_rootReprioritizationDistance = 10.0;
- private double m_childReprioritizationDistance = 20.0;
+// private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time;
+// private bool m_reprioritizationEnabled = true;
+// private double m_reprioritizationInterval = 5000.0;
+// private double m_rootReprioritizationDistance = 10.0;
+// private double m_childReprioritizationDistance = 20.0;
private Timer m_mapGenerationTimer = new Timer();
@@ -1628,6 +1628,8 @@ namespace OpenSim.Region.Framework.Scenes
Watchdog.GetCurrentThreadInfo().AlarmIfTimeout = true;
m_lastFrameTick = Util.EnvironmentTickCount();
Update(-1);
+
+ Watchdog.RemoveThread();
}
private void Maintenance()
--
cgit v1.1
From e2fb600bf51c1c4d42041b05cf2b6db13327f61e Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Fri, 27 Nov 2015 13:56:57 +0000
Subject: change Backup on scene close to Forced, and not dependent on last
change time.
---
OpenSim/Region/Framework/Scenes/Scene.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 7d98c94..cf84e2e 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1512,8 +1512,8 @@ namespace OpenSim.Region.Framework.Scenes
EventManager.TriggerSceneShuttingDown(this);
m_log.Debug("[SCENE]: Persisting changed objects");
+ Backup(true);
- Backup(false);
m_sceneGraph.Close();
if (!GridService.DeregisterRegion(RegionInfo.RegionID))
--
cgit v1.1
From bb0db96256eb5e6fbadb2c1084196208529f883d Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Fri, 27 Nov 2015 14:01:42 +0000
Subject: DeregisterRegion from grid earlier on close
---
OpenSim/Region/Framework/Scenes/Scene.cs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index cf84e2e..8bdf39a 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1481,11 +1481,14 @@ namespace OpenSim.Region.Framework.Scenes
m_log.InfoFormat("[SCENE]: Closing down the single simulator: {0}", RegionInfo.RegionName);
- StatsReporter.Close();
+ StatsReporter.Close();
m_restartTimer.Stop();
m_restartTimer.Close();
+ if (!GridService.DeregisterRegion(RegionInfo.RegionID))
+ m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", Name);
+
// Kick all ROOT agents with the message, 'The simulator is going down'
ForEachScenePresence(delegate(ScenePresence avatar)
{
@@ -1516,9 +1519,6 @@ namespace OpenSim.Region.Framework.Scenes
m_sceneGraph.Close();
- if (!GridService.DeregisterRegion(RegionInfo.RegionID))
- m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", Name);
-
base.Close();
// XEngine currently listens to the EventManager.OnShutdown event to trigger script stop and persistence.
--
cgit v1.1
From f1bbc4d38663435cde3ca1461d675ff0bdff77e4 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Fri, 27 Nov 2015 14:39:11 +0000
Subject: stop some requests processing when module as no scenes (there must be
a better way to fix this)
---
.../Framework/UserManagement/UserManagementModule.cs | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
index 7d0c47f..e1764bf 100644
--- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
@@ -182,6 +182,8 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
// m_log.DebugFormat(
// "[USER MANAGEMENT MODULE]: Handling request for name binding of UUID {0} from {1}",
// uuid, remote_client.Name);
+ if(m_Scenes.Count <= 0)
+ return;
if (m_Scenes[0].LibraryService != null && (m_Scenes[0].LibraryService.LibraryRootFolder.Owner == uuid))
{
@@ -288,6 +290,9 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
public List GetUserData(string query, int page_size, int page_number)
{
+ if(m_Scenes.Count <= 0)
+ return new List();;
+
// search the user accounts service
List accs = m_Scenes[0].UserAccountService.GetUserAccounts(m_Scenes[0].RegionInfo.ScopeID, query);
@@ -380,6 +385,9 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
/// The array of names if found. If not found, then names[0] = "Unknown" and names[1] = "User"
private bool TryGetUserNamesFromServices(UUID uuid, string[] names)
{
+ if(m_Scenes.Count <= 0)
+ return false;
+
UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(UUID.Zero, uuid);
if (account != null)
@@ -445,6 +453,9 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
public UUID GetUserIdByName(string firstName, string lastName)
{
+ if(m_Scenes.Count <= 0)
+ return UUID.Zero;
+
// TODO: Optimize for reverse lookup if this gets used by non-console commands.
lock (m_UserCache)
{
@@ -555,6 +566,12 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
#region Cache Management
public bool GetUser(UUID uuid, out UserData userdata)
{
+ if(m_Scenes.Count <= 0)
+ {
+ userdata = new UserData();
+ return false;
+ }
+
lock (m_UserCache)
{
if (m_UserCache.TryGetValue(uuid, out userdata))
--
cgit v1.1
From 3304e52750884fe5caec2cb0bd2dea2134676cca Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Fri, 27 Nov 2015 14:56:04 +0000
Subject: add a delay to consume other change messages on move and cross
---
OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineCrossingTests.cs | 1 +
1 file changed, 1 insertion(+)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineCrossingTests.cs b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineCrossingTests.cs
index 9037277..c977285 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineCrossingTests.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineCrossingTests.cs
@@ -196,6 +196,7 @@ default
EventParams ep = new EventParams("touch_start", new Object[] { new LSL_Types.LSLInteger(1) }, det);
+ Thread.Sleep(250); // wait for other change messages to pass
messageReceived = null;
chatEventB.Reset();
xEngineB.PostObjectEvent(soSceneB.LocalId, ep);
--
cgit v1.1