From 783ee949ea9b9bfe309e542a74bb0712f3b65d00 Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Sat, 8 Sep 2012 13:48:07 +0100 Subject: implementing per-region configuration of limits on the number of prims one can have in a linkset Applied with changes - patch was based on a repo different from core Signed-off-by: Melanie --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index b4a155e..e528288 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -2014,6 +2014,24 @@ namespace OpenSim.Region.Framework.Scenes if (objectGroup == this) return; + // If the configured linkset capacity is greater than zero, + // and the new linkset would have a prim count higher than this + // value, do not link it. + if (m_scene.m_linksetCapacity > 0 && + (PrimCount + objectGroup.PrimCount) > + m_scene.m_linksetCapacity) + { + m_log.DebugFormat( + "[SCENE OBJECT GROUP]: Cannot link group with root" + + " part {0}, {1} ({2} prims) to group with root part" + + " {3}, {4} ({5} prims) because the new linkset" + + " would exceed the configured maximum of {6}", + objectGroup.RootPart.Name, objectGroup.RootPart.UUID, + objectGroup.PrimCount, RootPart.Name, RootPart.UUID, + PrimCount, m_scene.m_linksetCapacity); + return; + } + // 'linkPart' == the root of the group being linked into this group SceneObjectPart linkPart = objectGroup.m_rootPart; -- cgit v1.1