From d5256094d975583876766b630bcf0ede1d3dd3e4 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 23 Apr 2011 00:16:55 +0100 Subject: print invalid command message to the console, not the log --- OpenSim/Framework/Console/CommandConsole.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs index 52bcd55..be36cf2 100644 --- a/OpenSim/Framework/Console/CommandConsole.cs +++ b/OpenSim/Framework/Console/CommandConsole.cs @@ -592,9 +592,7 @@ namespace OpenSim.Framework.Console string line = ReadLine(m_defaultPrompt + "# ", true, true); if (line != String.Empty) - { - m_log.Info("[CONSOLE] Invalid command"); - } + Output("Invalid command"); } public void RunCommand(string cmd) -- cgit v1.1 From 44e43d9d240735695668849fbd7aaafd339f262d Mon Sep 17 00:00:00 2001 From: E. Allen Soard Date: Fri, 15 Apr 2011 06:17:26 -0700 Subject: Added MaxAgents configuration option to RegionConfig.ini allowing region hosters to setup regions maintaining more control over system resources. --- OpenSim/Framework/RegionInfo.cs | 17 +++++++++++++++++ .../CoreModules/World/Estate/EstateManagementModule.cs | 5 ++++- 2 files changed, 21 insertions(+), 1 deletion(-) (limited to 'OpenSim') 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 private int m_physPrimMax = 0; private bool m_clampPrimSize = false; private int m_objectCapacity = 0; + private int m_agentCapacity = 0; private string m_regionType = String.Empty; private RegionLightShareData m_windlight = new RegionLightShareData(); protected uint m_httpPort; @@ -547,6 +548,11 @@ namespace OpenSim.Framework get { return m_objectCapacity; } } + public int AgentCapacity + { + get { return m_agentCapacity; } + } + public byte AccessLevel { get { return (byte)Util.ConvertMaturityToAccessLevel((uint)RegionSettings.Maturity); } @@ -821,6 +827,8 @@ namespace OpenSim.Framework m_objectCapacity = config.GetInt("MaxPrims", 15000); + m_agentCapacity = config.GetInt("MaxAgents", 100); + // Multi-tenancy // @@ -857,6 +865,9 @@ namespace OpenSim.Framework if (m_objectCapacity != 0) config.Set("MaxPrims", m_objectCapacity); + if (m_agentCapacity != 0) + config.Set("MaxAgents", m_agentCapacity); + if (ScopeID != UUID.Zero) config.Set("ScopeID", ScopeID.ToString()); @@ -943,6 +954,9 @@ namespace OpenSim.Framework configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Max objects this sim will hold", m_objectCapacity.ToString(), true); + configMember.addConfigurationOption("agent_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, + "Max avatars this sim will hold", m_agentCapacity.ToString(), true); + configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID, "Scope ID for this region", ScopeID.ToString(), true); @@ -1055,6 +1069,9 @@ namespace OpenSim.Framework case "object_capacity": m_objectCapacity = (int)configuration_result; break; + case "agent_capacity": + m_agentCapacity = (int)configuration_result; + break; case "scope_id": ScopeID = (UUID)configuration_result; break; diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index ab90e90..3aed6ba 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs @@ -125,7 +125,10 @@ namespace OpenSim.Region.CoreModules.World.Estate else Scene.RegionInfo.RegionSettings.AllowLandResell = true; - Scene.RegionInfo.RegionSettings.AgentLimit = (byte) maxAgents; + if((byte)maxAgents <= Scene.RegionInfo.AgentCapacity) + Scene.RegionInfo.RegionSettings.AgentLimit = (byte) maxAgents; + else + Scene.RegionInfo.RegionSettings.AgentLimit = Scene.RegionInfo.AgentCapacity; Scene.RegionInfo.RegionSettings.ObjectBonus = objectBonusFactor; -- cgit v1.1 From e3c3d626fb00fbc85dfc10755be0ee140f0b5a6f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 24 Apr 2011 16:14:24 -0700 Subject: Commented verbose debug message. --- OpenSim/Services/InventoryService/XInventoryService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs index e602412..0af35c8 100644 --- a/OpenSim/Services/InventoryService/XInventoryService.cs +++ b/OpenSim/Services/InventoryService/XInventoryService.cs @@ -244,7 +244,7 @@ namespace OpenSim.Services.InventoryService // connector. So we disregard the principal and look // by ID. // - m_log.DebugFormat("[XINVENTORY SERVICE]: Fetch contents for folder {0}", folderID.ToString()); + //m_log.DebugFormat("[XINVENTORY SERVICE]: Fetch contents for folder {0}", folderID.ToString()); InventoryCollection inventory = new InventoryCollection(); inventory.UserID = principalID; inventory.Folders = new List(); -- cgit v1.1 From 507f0e9ffdeae9c8941171f9128f2948873f6e38 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 24 Apr 2011 16:21:01 -0700 Subject: Upped VERSION_NUMBER in master to 0.7.2. --- OpenSim/Framework/Servers/VersionInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Servers/VersionInfo.cs b/OpenSim/Framework/Servers/VersionInfo.cs index c9d4c93..53a3f17 100644 --- a/OpenSim/Framework/Servers/VersionInfo.cs +++ b/OpenSim/Framework/Servers/VersionInfo.cs @@ -29,7 +29,7 @@ namespace OpenSim { public class VersionInfo { - private const string VERSION_NUMBER = "0.7.1"; + private const string VERSION_NUMBER = "0.7.2"; private const Flavour VERSION_FLAVOUR = Flavour.Dev; public enum Flavour -- cgit v1.1 From 3a38bd8854a93bb23308e4f09b02fd7b0aa672ce Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 25 Apr 2011 08:53:48 -0700 Subject: Addresses mantis #5449 -- crashing exception in SendInventoryFolderDetails. --- OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs index cd9f2bf..a662abb 100644 --- a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs @@ -158,7 +158,10 @@ namespace OpenSim.Services.Connectors public InventoryCollection GetFolderContent(UUID principalID, UUID folderID) { InventoryCollection inventory = new InventoryCollection(); - + inventory.Folders = new List(); + inventory.Items = new List(); + inventory.UserID = principalID; + try { Dictionary ret = MakeRequest("GETFOLDERCONTENT", @@ -172,11 +175,6 @@ namespace OpenSim.Services.Connectors if (ret.Count == 0) return null; - - inventory.Folders = new List(); - inventory.Items = new List(); - inventory.UserID = principalID; - Dictionary folders = (Dictionary)ret["FOLDERS"]; Dictionary items = -- cgit v1.1 From ef4f1fc4baaa00c6465c875c2ee02323644d0ed1 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 25 Apr 2011 11:00:48 -0700 Subject: Made things consistent between LocalInventoryServiceConnector and RemoteXInventoryServiceConnector on GetFolderContent. --- .../Inventory/LocalInventoryServiceConnector.cs | 9 ++++-- .../Inventory/RemoteXInventoryServiceConnector.cs | 34 +++++++++++++++++----- 2 files changed, 32 insertions(+), 11 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs index c7244c8..6dd871f 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs @@ -182,9 +182,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory public InventoryCollection GetFolderContent(UUID userID, UUID folderID) { InventoryCollection invCol = m_InventoryService.GetFolderContent(userID, folderID); - if (UserManager != null) - foreach (InventoryItemBase item in invCol.Items) - UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData); + Util.FireAndForget(delegate + { + if (UserManager != null) + foreach (InventoryItemBase item in invCol.Items) + UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData); + }); return invCol; } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs index bd01bb9..8f1f257 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs @@ -46,10 +46,22 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private bool m_Enabled = false; - private bool m_Initialized = false; -// private Scene m_Scene; + private Scene m_Scene; private XInventoryServicesConnector m_RemoteConnector; + private IUserManagement m_UserManager; + private IUserManagement UserManager + { + get + { + if (m_UserManager == null) + { + m_UserManager = m_Scene.RequestModuleInterface(); + } + return m_UserManager; + } + } + public Type ReplaceableInterface { get { return null; } @@ -114,12 +126,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory if (!m_Enabled) return; - if (!m_Initialized) - { - m_Initialized = true; - } - scene.RegisterModuleInterface(this); + + if (m_Scene == null) + m_Scene = scene; } public void RemoveRegion(Scene scene) @@ -173,7 +183,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory public InventoryCollection GetFolderContent(UUID userID, UUID folderID) { - return m_RemoteConnector.GetFolderContent(userID, folderID); + InventoryCollection invCol = m_RemoteConnector.GetFolderContent(userID, folderID); + Util.FireAndForget(delegate + { + if (UserManager != null) + foreach (InventoryItemBase item in invCol.Items) + UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData); + }); + + return invCol; } public List GetFolderItems(UUID userID, UUID folderID) -- cgit v1.1