aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorE. Allen Soard2011-04-15 06:17:26 -0700
committerJustin Clark-Casey (justincc)2011-04-23 00:40:08 +0100
commit44e43d9d240735695668849fbd7aaafd339f262d (patch)
treeb3ccec8dfed67a7c007aed4feeedb5ce88308e1c /OpenSim/Framework
parentprint invalid command message to the console, not the log (diff)
downloadopensim-SC-44e43d9d240735695668849fbd7aaafd339f262d.zip
opensim-SC-44e43d9d240735695668849fbd7aaafd339f262d.tar.gz
opensim-SC-44e43d9d240735695668849fbd7aaafd339f262d.tar.bz2
opensim-SC-44e43d9d240735695668849fbd7aaafd339f262d.tar.xz
Added MaxAgents configuration option to RegionConfig.ini allowing region hosters to setup regions maintaining more control over system resources.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/RegionInfo.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index daf0a25..239ce3d 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -369,6 +369,7 @@ namespace OpenSim.Framework
369 private int m_physPrimMax = 0; 369 private int m_physPrimMax = 0;
370 private bool m_clampPrimSize = false; 370 private bool m_clampPrimSize = false;
371 private int m_objectCapacity = 0; 371 private int m_objectCapacity = 0;
372 private int m_agentCapacity = 0;
372 private string m_regionType = String.Empty; 373 private string m_regionType = String.Empty;
373 private RegionLightShareData m_windlight = new RegionLightShareData(); 374 private RegionLightShareData m_windlight = new RegionLightShareData();
374 protected uint m_httpPort; 375 protected uint m_httpPort;
@@ -547,6 +548,11 @@ namespace OpenSim.Framework
547 get { return m_objectCapacity; } 548 get { return m_objectCapacity; }
548 } 549 }
549 550
551 public int AgentCapacity
552 {
553 get { return m_agentCapacity; }
554 }
555
550 public byte AccessLevel 556 public byte AccessLevel
551 { 557 {
552 get { return (byte)Util.ConvertMaturityToAccessLevel((uint)RegionSettings.Maturity); } 558 get { return (byte)Util.ConvertMaturityToAccessLevel((uint)RegionSettings.Maturity); }
@@ -821,6 +827,8 @@ namespace OpenSim.Framework
821 827
822 m_objectCapacity = config.GetInt("MaxPrims", 15000); 828 m_objectCapacity = config.GetInt("MaxPrims", 15000);
823 829
830 m_agentCapacity = config.GetInt("MaxAgents", 100);
831
824 832
825 // Multi-tenancy 833 // Multi-tenancy
826 // 834 //
@@ -857,6 +865,9 @@ namespace OpenSim.Framework
857 if (m_objectCapacity != 0) 865 if (m_objectCapacity != 0)
858 config.Set("MaxPrims", m_objectCapacity); 866 config.Set("MaxPrims", m_objectCapacity);
859 867
868 if (m_agentCapacity != 0)
869 config.Set("MaxAgents", m_agentCapacity);
870
860 if (ScopeID != UUID.Zero) 871 if (ScopeID != UUID.Zero)
861 config.Set("ScopeID", ScopeID.ToString()); 872 config.Set("ScopeID", ScopeID.ToString());
862 873
@@ -943,6 +954,9 @@ namespace OpenSim.Framework
943 configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, 954 configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
944 "Max objects this sim will hold", m_objectCapacity.ToString(), true); 955 "Max objects this sim will hold", m_objectCapacity.ToString(), true);
945 956
957 configMember.addConfigurationOption("agent_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
958 "Max avatars this sim will hold", m_agentCapacity.ToString(), true);
959
946 configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID, 960 configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
947 "Scope ID for this region", ScopeID.ToString(), true); 961 "Scope ID for this region", ScopeID.ToString(), true);
948 962
@@ -1055,6 +1069,9 @@ namespace OpenSim.Framework
1055 case "object_capacity": 1069 case "object_capacity":
1056 m_objectCapacity = (int)configuration_result; 1070 m_objectCapacity = (int)configuration_result;
1057 break; 1071 break;
1072 case "agent_capacity":
1073 m_agentCapacity = (int)configuration_result;
1074 break;
1058 case "scope_id": 1075 case "scope_id":
1059 ScopeID = (UUID)configuration_result; 1076 ScopeID = (UUID)configuration_result;
1060 break; 1077 break;