aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/RegionInfo.cs20
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs11
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs18
-rw-r--r--bin/OpenSim.ini.example5
-rw-r--r--bin/OpenSimDefaults.ini4
5 files changed, 57 insertions, 1 deletions
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 8131089..ded2df2 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -126,6 +126,7 @@ namespace OpenSim.Framework
126 private int m_physPrimMax = 0; 126 private int m_physPrimMax = 0;
127 private bool m_clampPrimSize = false; 127 private bool m_clampPrimSize = false;
128 private int m_objectCapacity = 0; 128 private int m_objectCapacity = 0;
129 private int m_linksetCapacity = 0;
129 private int m_agentCapacity = 0; 130 private int m_agentCapacity = 0;
130 private string m_regionType = String.Empty; 131 private string m_regionType = String.Empty;
131 private RegionLightShareData m_windlight = new RegionLightShareData(); 132 private RegionLightShareData m_windlight = new RegionLightShareData();
@@ -317,6 +318,11 @@ namespace OpenSim.Framework
317 get { return m_objectCapacity; } 318 get { return m_objectCapacity; }
318 } 319 }
319 320
321 public int LinksetCapacity
322 {
323 get { return m_linksetCapacity; }
324 }
325
320 public int AgentCapacity 326 public int AgentCapacity
321 { 327 {
322 get { return m_agentCapacity; } 328 get { return m_agentCapacity; }
@@ -654,6 +660,9 @@ namespace OpenSim.Framework
654 660
655 m_objectCapacity = config.GetInt("MaxPrims", 15000); 661 m_objectCapacity = config.GetInt("MaxPrims", 15000);
656 allKeys.Remove("MaxPrims"); 662 allKeys.Remove("MaxPrims");
663
664 m_linksetCapacity = config.GetInt("LinksetPrims", 0);
665 allKeys.Remove("LinksetPrims");
657 666
658 #endregion 667 #endregion
659 668
@@ -709,6 +718,9 @@ namespace OpenSim.Framework
709 if (m_objectCapacity != 0) 718 if (m_objectCapacity != 0)
710 config.Set("MaxPrims", m_objectCapacity); 719 config.Set("MaxPrims", m_objectCapacity);
711 720
721 if (m_linksetCapacity != 0)
722 config.Set("LinksetPrims", m_linksetCapacity);
723
712 if (m_agentCapacity != 0) 724 if (m_agentCapacity != 0)
713 config.Set("MaxAgents", m_agentCapacity); 725 config.Set("MaxAgents", m_agentCapacity);
714 726
@@ -804,6 +816,9 @@ namespace OpenSim.Framework
804 configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, 816 configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
805 "Max objects this sim will hold", m_objectCapacity.ToString(), true); 817 "Max objects this sim will hold", m_objectCapacity.ToString(), true);
806 818
819 configMember.addConfigurationOption("linkset_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
820 "Max prims an object will hold", m_linksetCapacity.ToString(), true);
821
807 configMember.addConfigurationOption("agent_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, 822 configMember.addConfigurationOption("agent_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
808 "Max avatars this sim will hold", m_agentCapacity.ToString(), true); 823 "Max avatars this sim will hold", m_agentCapacity.ToString(), true);
809 824
@@ -922,6 +937,9 @@ namespace OpenSim.Framework
922 case "object_capacity": 937 case "object_capacity":
923 m_objectCapacity = (int)configuration_result; 938 m_objectCapacity = (int)configuration_result;
924 break; 939 break;
940 case "linkset_capacity":
941 m_linksetCapacity = (int)configuration_result;
942 break;
925 case "agent_capacity": 943 case "agent_capacity":
926 m_agentCapacity = (int)configuration_result; 944 m_agentCapacity = (int)configuration_result;
927 break; 945 break;
@@ -1052,4 +1070,4 @@ namespace OpenSim.Framework
1052 return kvp; 1070 return kvp;
1053 } 1071 }
1054 } 1072 }
1055} \ No newline at end of file 1073}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index ff3d3af..c2c0b96 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -123,6 +123,11 @@ namespace OpenSim.Region.Framework.Scenes
123 /// </summary> 123 /// </summary>
124 public float m_maxPhys = 10; 124 public float m_maxPhys = 10;
125 125
126 /// <summary>
127 /// Max prims an object will hold
128 /// </summary>
129 public int m_linksetCapacity = 0;
130
126 public bool m_clampPrimSize; 131 public bool m_clampPrimSize;
127 public bool m_trustBinaries; 132 public bool m_trustBinaries;
128 public bool m_allowScriptCrossings; 133 public bool m_allowScriptCrossings;
@@ -772,6 +777,12 @@ namespace OpenSim.Region.Framework.Scenes
772 m_clampPrimSize = true; 777 m_clampPrimSize = true;
773 } 778 }
774 779
780 m_linksetCapacity = startupConfig.GetInt("LinksetPrims", m_linksetCapacity);
781 if (RegionInfo.LinksetCapacity > 0)
782 {
783 m_linksetCapacity = RegionInfo.LinksetCapacity;
784 }
785
775 m_useTrashOnDelete = startupConfig.GetBoolean("UseTrashOnDelete", m_useTrashOnDelete); 786 m_useTrashOnDelete = startupConfig.GetBoolean("UseTrashOnDelete", m_useTrashOnDelete);
776 m_trustBinaries = startupConfig.GetBoolean("TrustBinaries", m_trustBinaries); 787 m_trustBinaries = startupConfig.GetBoolean("TrustBinaries", m_trustBinaries);
777 m_allowScriptCrossings = startupConfig.GetBoolean("AllowScriptCrossing", m_allowScriptCrossings); 788 m_allowScriptCrossings = startupConfig.GetBoolean("AllowScriptCrossing", m_allowScriptCrossings);
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
2014 if (objectGroup == this) 2014 if (objectGroup == this)
2015 return; 2015 return;
2016 2016
2017 // If the configured linkset capacity is greater than zero,
2018 // and the new linkset would have a prim count higher than this
2019 // value, do not link it.
2020 if (m_scene.m_linksetCapacity > 0 &&
2021 (PrimCount + objectGroup.PrimCount) >
2022 m_scene.m_linksetCapacity)
2023 {
2024 m_log.DebugFormat(
2025 "[SCENE OBJECT GROUP]: Cannot link group with root" +
2026 " part {0}, {1} ({2} prims) to group with root part" +
2027 " {3}, {4} ({5} prims) because the new linkset" +
2028 " would exceed the configured maximum of {6}",
2029 objectGroup.RootPart.Name, objectGroup.RootPart.UUID,
2030 objectGroup.PrimCount, RootPart.Name, RootPart.UUID,
2031 PrimCount, m_scene.m_linksetCapacity);
2032 return;
2033 }
2034
2017 // 'linkPart' == the root of the group being linked into this group 2035 // 'linkPart' == the root of the group being linked into this group
2018 SceneObjectPart linkPart = objectGroup.m_rootPart; 2036 SceneObjectPart linkPart = objectGroup.m_rootPart;
2019 2037
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index eac30b8..f0ebcce 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -107,6 +107,11 @@
107 ;; If a viewer attempts to rez a prim larger than the non-physical or physical prim max, clamp the dimensions to the appropriate maximum 107 ;; If a viewer attempts to rez a prim larger than the non-physical or physical prim max, clamp the dimensions to the appropriate maximum
108 ;; This can be overriden in the region config file. 108 ;; This can be overriden in the region config file.
109 ; ClampPrimSize = false 109 ; ClampPrimSize = false
110
111 ;# {LinksetPrims} {} {Max prims an object will hold?} {} 0
112 ;; Maximum number of prims allowable in a linkset. Affects creating new linksets. Ignored if less than or equal to zero.
113 ;; This can be overriden in the region config file.
114 ; LinksetPrims = 0
110 115
111 ;# {AllowScriptCrossing} {} {Allow scripts to cross into this region} {true false} true 116 ;# {AllowScriptCrossing} {} {Allow scripts to cross into this region} {true false} true
112 ;; Allow scripts to keep running when they cross region boundaries, rather than being restarted. State is reloaded on the destination region. 117 ;; Allow scripts to keep running when they cross region boundaries, rather than being restarted. State is reloaded on the destination region.
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index dbd3e3a..c080fbf 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -94,6 +94,10 @@
94 ; If a viewer attempts to rez a prim larger than the non-physical or physical prim max, clamp the dimensions to the appropriate maximum 94 ; If a viewer attempts to rez a prim larger than the non-physical or physical prim max, clamp the dimensions to the appropriate maximum
95 ; This can be overriden in the region config file. 95 ; This can be overriden in the region config file.
96 ClampPrimSize = false 96 ClampPrimSize = false
97
98 ; Maximum number of prims allowable in a linkset. Affects creating new linksets. Ignored if less than or equal to zero.
99 ; This can be overriden in the region config file.
100 LinksetPrims = 0
97 101
98 ; Allow scripts to keep running when they cross region boundaries, rather than being restarted. State is reloaded on the destination region. 102 ; Allow scripts to keep running when they cross region boundaries, rather than being restarted. State is reloaded on the destination region.
99 ; This only applies when crossing to a region running in a different simulator. 103 ; This only applies when crossing to a region running in a different simulator.