Merge branch 'master' into careminster-presence-refactor

avinationmerge
Melanie 2011-04-25 23:18:32 +01:00
commit 9bf5e94b70
16 changed files with 61 additions and 33 deletions

View File

@ -592,9 +592,7 @@ namespace OpenSim.Framework.Console
string line = ReadLine(m_defaultPrompt + "# ", true, true); string line = ReadLine(m_defaultPrompt + "# ", true, true);
if (line != String.Empty) if (line != String.Empty)
{ Output("Invalid command");
m_log.Info("[CONSOLE] Invalid command");
}
} }
public void RunCommand(string cmd) public void RunCommand(string cmd)

View File

@ -371,6 +371,7 @@ namespace OpenSim.Framework
private int m_physPrimMax = 0; private int m_physPrimMax = 0;
private bool m_clampPrimSize = false; private bool m_clampPrimSize = false;
private int m_objectCapacity = 0; private int m_objectCapacity = 0;
private int m_agentCapacity = 0;
private string m_regionType = String.Empty; private string m_regionType = String.Empty;
private RegionLightShareData m_windlight = new RegionLightShareData(); private RegionLightShareData m_windlight = new RegionLightShareData();
protected uint m_httpPort; protected uint m_httpPort;
@ -549,6 +550,11 @@ namespace OpenSim.Framework
get { return m_objectCapacity; } get { return m_objectCapacity; }
} }
public int AgentCapacity
{
get { return m_agentCapacity; }
}
public byte AccessLevel public byte AccessLevel
{ {
get { return (byte)Util.ConvertMaturityToAccessLevel((uint)RegionSettings.Maturity); } get { return (byte)Util.ConvertMaturityToAccessLevel((uint)RegionSettings.Maturity); }
@ -827,6 +833,8 @@ namespace OpenSim.Framework
m_objectCapacity = config.GetInt("MaxPrims", 15000); m_objectCapacity = config.GetInt("MaxPrims", 15000);
m_agentCapacity = config.GetInt("MaxAgents", 100);
// Multi-tenancy // Multi-tenancy
// //
@ -866,6 +874,9 @@ namespace OpenSim.Framework
if (m_objectCapacity != 0) if (m_objectCapacity != 0)
config.Set("MaxPrims", m_objectCapacity); config.Set("MaxPrims", m_objectCapacity);
if (m_agentCapacity != 0)
config.Set("MaxAgents", m_agentCapacity);
if (ScopeID != UUID.Zero) if (ScopeID != UUID.Zero)
config.Set("ScopeID", ScopeID.ToString()); config.Set("ScopeID", ScopeID.ToString());
@ -952,6 +963,9 @@ namespace OpenSim.Framework
configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
"Max objects this sim will hold", m_objectCapacity.ToString(), true); "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, configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
"Scope ID for this region", ScopeID.ToString(), true); "Scope ID for this region", ScopeID.ToString(), true);
@ -1067,6 +1081,9 @@ namespace OpenSim.Framework
case "object_capacity": case "object_capacity":
m_objectCapacity = (int)configuration_result; m_objectCapacity = (int)configuration_result;
break; break;
case "agent_capacity":
m_agentCapacity = (int)configuration_result;
break;
case "scope_id": case "scope_id":
ScopeID = (UUID)configuration_result; ScopeID = (UUID)configuration_result;
break; break;

View File

@ -29,7 +29,7 @@ namespace OpenSim
{ {
public class VersionInfo 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; private const Flavour VERSION_FLAVOUR = Flavour.Dev;
public enum Flavour public enum Flavour

View File

@ -182,9 +182,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
public InventoryCollection GetFolderContent(UUID userID, UUID folderID) public InventoryCollection GetFolderContent(UUID userID, UUID folderID)
{ {
InventoryCollection invCol = m_InventoryService.GetFolderContent(userID, folderID); InventoryCollection invCol = m_InventoryService.GetFolderContent(userID, folderID);
if (UserManager != null) Util.FireAndForget(delegate
foreach (InventoryItemBase item in invCol.Items) {
UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData); if (UserManager != null)
foreach (InventoryItemBase item in invCol.Items)
UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData);
});
return invCol; return invCol;
} }

View File

@ -46,10 +46,22 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private bool m_Enabled = false; private bool m_Enabled = false;
private bool m_Initialized = false; private Scene m_Scene;
// private Scene m_Scene;
private XInventoryServicesConnector m_RemoteConnector; private XInventoryServicesConnector m_RemoteConnector;
private IUserManagement m_UserManager;
private IUserManagement UserManager
{
get
{
if (m_UserManager == null)
{
m_UserManager = m_Scene.RequestModuleInterface<IUserManagement>();
}
return m_UserManager;
}
}
public Type ReplaceableInterface public Type ReplaceableInterface
{ {
get { return null; } get { return null; }
@ -114,12 +126,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
if (!m_Enabled) if (!m_Enabled)
return; return;
if (!m_Initialized)
{
m_Initialized = true;
}
scene.RegisterModuleInterface<IInventoryService>(this); scene.RegisterModuleInterface<IInventoryService>(this);
if (m_Scene == null)
m_Scene = scene;
} }
public void RemoveRegion(Scene scene) public void RemoveRegion(Scene scene)
@ -173,7 +183,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
public InventoryCollection GetFolderContent(UUID userID, UUID folderID) 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<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID) public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID)

View File

@ -127,7 +127,10 @@ namespace OpenSim.Region.CoreModules.World.Estate
else else
Scene.RegionInfo.RegionSettings.AllowLandResell = true; 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; Scene.RegionInfo.RegionSettings.ObjectBonus = objectBonusFactor;

View File

@ -158,7 +158,10 @@ namespace OpenSim.Services.Connectors
public InventoryCollection GetFolderContent(UUID principalID, UUID folderID) public InventoryCollection GetFolderContent(UUID principalID, UUID folderID)
{ {
InventoryCollection inventory = new InventoryCollection(); InventoryCollection inventory = new InventoryCollection();
inventory.Folders = new List<InventoryFolderBase>();
inventory.Items = new List<InventoryItemBase>();
inventory.UserID = principalID;
try try
{ {
Dictionary<string,object> ret = MakeRequest("GETFOLDERCONTENT", Dictionary<string,object> ret = MakeRequest("GETFOLDERCONTENT",
@ -172,11 +175,6 @@ namespace OpenSim.Services.Connectors
if (ret.Count == 0) if (ret.Count == 0)
return null; return null;
inventory.Folders = new List<InventoryFolderBase>();
inventory.Items = new List<InventoryItemBase>();
inventory.UserID = principalID;
Dictionary<string,object> folders = Dictionary<string,object> folders =
(Dictionary<string,object>)ret["FOLDERS"]; (Dictionary<string,object>)ret["FOLDERS"];
Dictionary<string,object> items = Dictionary<string,object> items =

View File

@ -244,7 +244,7 @@ namespace OpenSim.Services.InventoryService
// connector. So we disregard the principal and look // connector. So we disregard the principal and look
// by ID. // 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(); InventoryCollection inventory = new InventoryCollection();
inventory.UserID = principalID; inventory.UserID = principalID;
inventory.Folders = new List<InventoryFolderBase>(); inventory.Folders = new List<InventoryFolderBase>();

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -28,6 +28,7 @@ ExternalHostName = "SYSTEMIP"
; PhysicalPrimMax = 10 ; PhysicalPrimMax = 10
; ClampPrimSize = False ; ClampPrimSize = False
; MaxPrims = 15000 ; MaxPrims = 15000
; MaxAgents = 100
; * ; *
; * Multi-Tenancy. Only set if needed ; * Multi-Tenancy. Only set if needed

View File

@ -2194,7 +2194,6 @@
<Reference name="OpenSim.Framework.Console"/> <Reference name="OpenSim.Framework.Console"/>
<Reference name="OpenSim.Services.Interfaces"/> <Reference name="OpenSim.Services.Interfaces"/>
<Reference name="Nini" path="../../../../bin/"/> <Reference name="Nini" path="../../../../bin/"/>
<Reference name="RAIL" path="../../../../bin/"/>
<Reference name="Nini" path="../../../../bin/"/> <Reference name="Nini" path="../../../../bin/"/>
<Reference name="log4net" path="../../../../bin/"/> <Reference name="log4net" path="../../../../bin/"/>
<Reference name="SmartThreadPool"/> <Reference name="SmartThreadPool"/>
@ -2232,8 +2231,6 @@
<Reference name="OpenSim.Framework.Console"/> <Reference name="OpenSim.Framework.Console"/>
<Reference name="OpenSim.Region.ScriptEngine.Shared"/> <Reference name="OpenSim.Region.ScriptEngine.Shared"/>
<Reference name="Nini" path="../../../../../../bin/"/> <Reference name="Nini" path="../../../../../../bin/"/>
<Reference name="RAIL" path="../../../../../../bin/"/>
<Reference name="Nini" path="../../../../../../bin/"/>
<Reference name="log4net" path="../../../../../../bin/"/> <Reference name="log4net" path="../../../../../../bin/"/>
<Files> <Files>
@ -2266,8 +2263,6 @@
<Reference name="OpenSim.Framework.Console"/> <Reference name="OpenSim.Framework.Console"/>
<Reference name="OpenSim.Region.ScriptEngine.Shared"/> <Reference name="OpenSim.Region.ScriptEngine.Shared"/>
<Reference name="Nini" path="../../../../../../../bin/"/> <Reference name="Nini" path="../../../../../../../bin/"/>
<Reference name="RAIL" path="../../../../../../../bin/"/>
<Reference name="Nini" path="../../../../../../../bin/"/>
<Reference name="log4net" path="../../../../../../../bin/"/> <Reference name="log4net" path="../../../../../../../bin/"/>
<Files> <Files>
@ -2306,8 +2301,6 @@
<Reference name="OpenSim.Region.ScriptEngine.Shared"/> <Reference name="OpenSim.Region.ScriptEngine.Shared"/>
<Reference name="OpenSim.Region.ScriptEngine.Shared.Api.Runtime"/> <Reference name="OpenSim.Region.ScriptEngine.Shared.Api.Runtime"/>
<Reference name="Nini" path="../../../../../../bin/"/> <Reference name="Nini" path="../../../../../../bin/"/>
<Reference name="RAIL" path="../../../../../../bin/"/>
<Reference name="Nini" path="../../../../../../bin/"/>
<Reference name="log4net" path="../../../../../../bin/"/> <Reference name="log4net" path="../../../../../../bin/"/>
<Files> <Files>
@ -2336,7 +2329,6 @@
<Reference name="OpenSim.Region.CoreModules"/> <Reference name="OpenSim.Region.CoreModules"/>
<Reference name="OpenMetaverseTypes" path="../../../../../bin/"/> <Reference name="OpenMetaverseTypes" path="../../../../../bin/"/>
<Reference name="Nini" path="../../../../../bin/"/> <Reference name="Nini" path="../../../../../bin/"/>
<Reference name="RAIL" path="../../../../../bin/"/>
<Reference name="log4net" path="../../../../../bin/"/> <Reference name="log4net" path="../../../../../bin/"/>
<Reference name="Tools" path="../../../../../bin/"/> <Reference name="Tools" path="../../../../../bin/"/>
@ -2378,7 +2370,6 @@
<Reference name="SmartThreadPool"/> <Reference name="SmartThreadPool"/>
<Reference name="Axiom.MathLib" path="../../../../../bin/"/> <Reference name="Axiom.MathLib" path="../../../../../bin/"/>
<Reference name="Nini" path="../../../../../bin/"/> <Reference name="Nini" path="../../../../../bin/"/>
<Reference name="RAIL" path="../../../../../bin/"/>
<Reference name="log4net" path="../../../../../bin/"/> <Reference name="log4net" path="../../../../../bin/"/>
<Files> <Files>
@ -2417,7 +2408,6 @@
<Reference name="OpenSim.Region.ScriptEngine.Shared.Api"/> <Reference name="OpenSim.Region.ScriptEngine.Shared.Api"/>
<Reference name="SmartThreadPool"/> <Reference name="SmartThreadPool"/>
<Reference name="Nini" path="../../../../bin/"/> <Reference name="Nini" path="../../../../bin/"/>
<Reference name="RAIL" path="../../../../bin/"/>
<Reference name="log4net" path="../../../../bin/"/> <Reference name="log4net" path="../../../../bin/"/>
<Files> <Files>