Merge branch 'master' into careminster-presence-refactor

avinationmerge
Melanie 2011-04-03 14:16:28 +01:00
commit 15e0b55e66
9 changed files with 133 additions and 53 deletions

View File

@ -123,7 +123,7 @@ namespace OpenSim
m_log.Info("===================================================================="); m_log.Info("====================================================================");
m_log.Info("========================= STARTING OPENSIM ========================="); m_log.Info("========================= STARTING OPENSIM =========================");
m_log.Info("===================================================================="); m_log.Info("====================================================================");
m_log.InfoFormat("[OPENSIM MAIN]: Running ");
//m_log.InfoFormat("[OPENSIM MAIN]: GC Is Server GC: {0}", GCSettings.IsServerGC.ToString()); //m_log.InfoFormat("[OPENSIM MAIN]: GC Is Server GC: {0}", GCSettings.IsServerGC.ToString());
// http://msdn.microsoft.com/en-us/library/bb384202.aspx // http://msdn.microsoft.com/en-us/library/bb384202.aspx
//GCSettings.LatencyMode = GCLatencyMode.Batch; //GCSettings.LatencyMode = GCLatencyMode.Batch;

View File

@ -111,14 +111,12 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
{ {
if ((SMTPConfig = m_Config.Configs["SMTP"]) == null) if ((SMTPConfig = m_Config.Configs["SMTP"]) == null)
{ {
m_log.InfoFormat("[SMTP] SMTP server not configured");
m_Enabled = false; m_Enabled = false;
return; return;
} }
if (!SMTPConfig.GetBoolean("enabled", false)) if (!SMTPConfig.GetBoolean("enabled", false))
{ {
m_log.InfoFormat("[SMTP] module disabled in configuration");
m_Enabled = false; m_Enabled = false;
return; return;
} }

View File

@ -205,7 +205,7 @@ namespace OpenSim.Region.CoreModules.World.Land
{ {
if (obj.OwnerID == landData.GroupID) if (obj.OwnerID == landData.GroupID)
parcelCounts.Owner += partCount; parcelCounts.Owner += partCount;
else if (obj.GroupID == landData.GroupID) else if (landData.GroupID != UUID.Zero && obj.GroupID == landData.GroupID)
parcelCounts.Group += partCount; parcelCounts.Group += partCount;
else else
parcelCounts.Others += partCount; parcelCounts.Others += partCount;
@ -214,8 +214,6 @@ namespace OpenSim.Region.CoreModules.World.Land
{ {
if (obj.OwnerID == landData.OwnerID) if (obj.OwnerID == landData.OwnerID)
parcelCounts.Owner += partCount; parcelCounts.Owner += partCount;
else if (obj.GroupID == landData.GroupID)
parcelCounts.Group += partCount;
else else
parcelCounts.Others += partCount; parcelCounts.Others += partCount;
} }

View File

@ -45,7 +45,8 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
public class PrimCountModuleTests public class PrimCountModuleTests
{ {
protected UUID m_userId = new UUID("00000000-0000-0000-0000-100000000000"); protected UUID m_userId = new UUID("00000000-0000-0000-0000-100000000000");
protected UUID m_dummyUserId = new UUID("99999999-9999-9999-9999-999999999999"); protected UUID m_groupId = new UUID("00000000-0000-0000-8888-000000000000");
protected UUID m_otherUserId = new UUID("99999999-9999-9999-9999-999999999999");
protected TestScene m_scene; protected TestScene m_scene;
protected PrimCountModule m_pcm; protected PrimCountModule m_pcm;
protected ILandObject m_lo; protected ILandObject m_lo;
@ -64,6 +65,24 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
//scene.loadAllLandObjectsFromStorage(scene.RegionInfo.originRegionID); //scene.loadAllLandObjectsFromStorage(scene.RegionInfo.originRegionID);
} }
/// <summary>
/// Test that counts before we do anything are correct.
/// </summary>
[Test]
public void TestInitialCounts()
{
IPrimCounts pc = m_lo.PrimCounts;
Assert.That(pc.Owner, Is.EqualTo(0));
Assert.That(pc.Group, Is.EqualTo(0));
Assert.That(pc.Others, Is.EqualTo(0));
Assert.That(pc.Total, Is.EqualTo(0));
Assert.That(pc.Selected, Is.EqualTo(0));
Assert.That(pc.Users[m_userId], Is.EqualTo(0));
Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
Assert.That(pc.Simulator, Is.EqualTo(0));
}
/// <summary> /// <summary>
/// Test count after a parcel owner owned object is added. /// Test count after a parcel owner owned object is added.
/// </summary> /// </summary>
@ -75,15 +94,6 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
IPrimCounts pc = m_lo.PrimCounts; IPrimCounts pc = m_lo.PrimCounts;
Assert.That(pc.Owner, Is.EqualTo(0));
Assert.That(pc.Group, Is.EqualTo(0));
Assert.That(pc.Others, Is.EqualTo(0));
Assert.That(pc.Total, Is.EqualTo(0));
Assert.That(pc.Selected, Is.EqualTo(0));
Assert.That(pc.Users[m_userId], Is.EqualTo(0));
Assert.That(pc.Users[m_dummyUserId], Is.EqualTo(0));
Assert.That(pc.Simulator, Is.EqualTo(0));
SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_userId, 0x01); SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_userId, 0x01);
m_scene.AddNewSceneObject(sog, false); m_scene.AddNewSceneObject(sog, false);
@ -93,7 +103,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
Assert.That(pc.Total, Is.EqualTo(3)); Assert.That(pc.Total, Is.EqualTo(3));
Assert.That(pc.Selected, Is.EqualTo(0)); Assert.That(pc.Selected, Is.EqualTo(0));
Assert.That(pc.Users[m_userId], Is.EqualTo(3)); Assert.That(pc.Users[m_userId], Is.EqualTo(3));
Assert.That(pc.Users[m_dummyUserId], Is.EqualTo(0)); Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
Assert.That(pc.Simulator, Is.EqualTo(3)); Assert.That(pc.Simulator, Is.EqualTo(3));
// Add a second object and retest // Add a second object and retest
@ -106,7 +116,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
Assert.That(pc.Total, Is.EqualTo(5)); Assert.That(pc.Total, Is.EqualTo(5));
Assert.That(pc.Selected, Is.EqualTo(0)); Assert.That(pc.Selected, Is.EqualTo(0));
Assert.That(pc.Users[m_userId], Is.EqualTo(5)); Assert.That(pc.Users[m_userId], Is.EqualTo(5));
Assert.That(pc.Users[m_dummyUserId], Is.EqualTo(0)); Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
Assert.That(pc.Simulator, Is.EqualTo(5)); Assert.That(pc.Simulator, Is.EqualTo(5));
} }
@ -131,7 +141,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
Assert.That(pc.Total, Is.EqualTo(6)); Assert.That(pc.Total, Is.EqualTo(6));
Assert.That(pc.Selected, Is.EqualTo(0)); Assert.That(pc.Selected, Is.EqualTo(0));
Assert.That(pc.Users[m_userId], Is.EqualTo(6)); Assert.That(pc.Users[m_userId], Is.EqualTo(6));
Assert.That(pc.Users[m_dummyUserId], Is.EqualTo(0)); Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
Assert.That(pc.Simulator, Is.EqualTo(6)); Assert.That(pc.Simulator, Is.EqualTo(6));
} }
@ -157,7 +167,111 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
Assert.That(pc.Total, Is.EqualTo(1)); Assert.That(pc.Total, Is.EqualTo(1));
Assert.That(pc.Selected, Is.EqualTo(0)); Assert.That(pc.Selected, Is.EqualTo(0));
Assert.That(pc.Users[m_userId], Is.EqualTo(1)); Assert.That(pc.Users[m_userId], Is.EqualTo(1));
Assert.That(pc.Users[m_dummyUserId], Is.EqualTo(0)); Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
Assert.That(pc.Simulator, Is.EqualTo(1));
}
[Test]
public void TestAddGroupObject()
{
TestHelper.InMethod();
// log4net.Config.XmlConfigurator.Configure();
m_lo.DeedToGroup(m_groupId);
IPrimCounts pc = m_lo.PrimCounts;
SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_otherUserId, 0x01);
sog.GroupID = m_groupId;
m_scene.AddNewSceneObject(sog, false);
Assert.That(pc.Owner, Is.EqualTo(0));
Assert.That(pc.Group, Is.EqualTo(3));
Assert.That(pc.Others, Is.EqualTo(0));
Assert.That(pc.Total, Is.EqualTo(3));
Assert.That(pc.Selected, Is.EqualTo(0));
// Is this desired behaviour? Not totally sure.
Assert.That(pc.Users[m_userId], Is.EqualTo(0));
Assert.That(pc.Users[m_groupId], Is.EqualTo(0));
Assert.That(pc.Users[m_otherUserId], Is.EqualTo(3));
Assert.That(pc.Simulator, Is.EqualTo(3));
}
/// <summary>
/// Test count after a parcel owner owned object is removed.
/// </summary>
[Test]
public void TestRemoveGroupObject()
{
TestHelper.InMethod();
// log4net.Config.XmlConfigurator.Configure();
m_lo.DeedToGroup(m_groupId);
IPrimCounts pc = m_lo.PrimCounts;
SceneObjectGroup sogToKeep = SceneSetupHelpers.CreateSceneObject(1, m_userId, 0x1);
sogToKeep.GroupID = m_groupId;
m_scene.AddNewSceneObject(sogToKeep, false);
SceneObjectGroup sogToDelete = SceneSetupHelpers.CreateSceneObject(3, m_userId, 0x10);
m_scene.AddNewSceneObject(sogToDelete, false);
m_scene.DeleteSceneObject(sogToDelete, false);
Assert.That(pc.Owner, Is.EqualTo(0));
Assert.That(pc.Group, Is.EqualTo(1));
Assert.That(pc.Others, Is.EqualTo(0));
Assert.That(pc.Total, Is.EqualTo(1));
Assert.That(pc.Selected, Is.EqualTo(0));
Assert.That(pc.Users[m_userId], Is.EqualTo(1));
Assert.That(pc.Users[m_groupId], Is.EqualTo(0));
Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
Assert.That(pc.Simulator, Is.EqualTo(1));
}
[Test]
public void TestAddOthersObject()
{
TestHelper.InMethod();
// log4net.Config.XmlConfigurator.Configure();
IPrimCounts pc = m_lo.PrimCounts;
SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_otherUserId, 0x01);
m_scene.AddNewSceneObject(sog, false);
Assert.That(pc.Owner, Is.EqualTo(0));
Assert.That(pc.Group, Is.EqualTo(0));
Assert.That(pc.Others, Is.EqualTo(3));
Assert.That(pc.Total, Is.EqualTo(3));
Assert.That(pc.Selected, Is.EqualTo(0));
Assert.That(pc.Users[m_userId], Is.EqualTo(0));
Assert.That(pc.Users[m_otherUserId], Is.EqualTo(3));
Assert.That(pc.Simulator, Is.EqualTo(3));
}
[Test]
public void TestRemoveOthersObject()
{
TestHelper.InMethod();
// log4net.Config.XmlConfigurator.Configure();
IPrimCounts pc = m_lo.PrimCounts;
m_scene.AddNewSceneObject(SceneSetupHelpers.CreateSceneObject(1, m_otherUserId, 0x1), false);
SceneObjectGroup sogToDelete = SceneSetupHelpers.CreateSceneObject(3, m_otherUserId, 0x10);
m_scene.AddNewSceneObject(sogToDelete, false);
m_scene.DeleteSceneObject(sogToDelete, false);
Assert.That(pc.Owner, Is.EqualTo(0));
Assert.That(pc.Group, Is.EqualTo(0));
Assert.That(pc.Others, Is.EqualTo(1));
Assert.That(pc.Total, Is.EqualTo(1));
Assert.That(pc.Selected, Is.EqualTo(0));
Assert.That(pc.Users[m_userId], Is.EqualTo(0));
Assert.That(pc.Users[m_otherUserId], Is.EqualTo(1));
Assert.That(pc.Simulator, Is.EqualTo(1)); Assert.That(pc.Simulator, Is.EqualTo(1));
} }
@ -181,7 +295,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
Assert.That(pc.Total, Is.EqualTo(3)); Assert.That(pc.Total, Is.EqualTo(3));
Assert.That(pc.Selected, Is.EqualTo(0)); Assert.That(pc.Selected, Is.EqualTo(0));
Assert.That(pc.Users[m_userId], Is.EqualTo(3)); Assert.That(pc.Users[m_userId], Is.EqualTo(3));
Assert.That(pc.Users[m_dummyUserId], Is.EqualTo(0)); Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
Assert.That(pc.Simulator, Is.EqualTo(3)); Assert.That(pc.Simulator, Is.EqualTo(3));
} }
} }

View File

@ -80,16 +80,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
m_config = config.Configs["Concierge"]; m_config = config.Configs["Concierge"];
if (null == m_config) if (null == m_config)
{
m_log.Info("[Concierge]: no config found, plugin disabled");
return; return;
}
if (!m_config.GetBoolean("enabled", false)) if (!m_config.GetBoolean("enabled", false))
{
m_log.Info("[Concierge]: plugin disabled by configuration");
return; return;
}
m_enabled = true; m_enabled = true;
@ -113,8 +108,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
{ {
m_replacingChatModule = false; m_replacingChatModule = false;
} }
m_log.InfoFormat("[Concierge] {0} ChatModule", m_replacingChatModule ? "replacing" : "not replacing");
m_log.InfoFormat("[Concierge] {0} ChatModule", m_replacingChatModule ? "replacing" : "not replacing");
// take note of concierge channel and of identity // take note of concierge channel and of identity
m_conciergeChannel = config.Configs["Concierge"].GetInt("concierge_channel", m_conciergeChannel); m_conciergeChannel = config.Configs["Concierge"].GetInt("concierge_channel", m_conciergeChannel);

View File

@ -106,16 +106,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
m_Config = config.Configs["FreeSwitchVoice"]; m_Config = config.Configs["FreeSwitchVoice"];
if (m_Config == null) if (m_Config == null)
{
m_log.Info("[FreeSwitchVoice] no config found, plugin disabled");
return; return;
}
if (!m_Config.GetBoolean("Enabled", false)) if (!m_Config.GetBoolean("Enabled", false))
{
m_log.Info("[FreeSwitchVoice] plugin disabled by configuration");
return; return;
}
try try
{ {

View File

@ -121,16 +121,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
m_config = config.Configs["VivoxVoice"]; m_config = config.Configs["VivoxVoice"];
if (null == m_config) if (null == m_config)
{
m_log.Info("[VivoxVoice] no config found, plugin disabled");
return; return;
}
if (!m_config.GetBoolean("enabled", false)) if (!m_config.GetBoolean("enabled", false))
{
m_log.Info("[VivoxVoice] plugin disabled by configuration");
return; return;
}
try try
{ {
@ -218,7 +212,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
m_pluginEnabled = true; m_pluginEnabled = true;
m_log.Info("[VivoxVoice] plugin enabled"); m_log.Info("[VivoxVoice] plugin enabled");
} }
catch (Exception e) catch (Exception e)
{ {
@ -228,7 +221,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
} }
} }
// Called to indicate that the module has been added to the region // Called to indicate that the module has been added to the region
public void AddRegion(Scene scene) public void AddRegion(Scene scene)
{ {

View File

@ -86,13 +86,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
return; return;
} }
m_log.Info("[GROUPS-MESSAGING]: Initializing GroupsMessagingModule");
m_debugEnabled = groupsConfig.GetBoolean("DebugEnabled", true); m_debugEnabled = groupsConfig.GetBoolean("DebugEnabled", true);
} }
m_log.Info("[GROUPS-MESSAGING]: GroupsMessagingModule starting up"); m_log.Info("[GROUPS-MESSAGING]: GroupsMessagingModule starting up");
} }
public void AddRegion(Scene scene) public void AddRegion(Scene scene)

View File

@ -75,7 +75,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
if (source.Configs["MRM"].GetBoolean("Enabled", false)) if (source.Configs["MRM"].GetBoolean("Enabled", false))
{ {
m_log.Info("[MRM] Enabling MRM Module"); m_log.Info("[MRM]: Enabling MRM Module");
m_scene = scene; m_scene = scene;
// when hidden, we don't listen for client initiated script events // when hidden, we don't listen for client initiated script events
@ -90,14 +90,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
scene.RegisterModuleInterface<IMRMModule>(this); scene.RegisterModuleInterface<IMRMModule>(this);
} }
else
{
m_log.Info("[MRM] Disabled MRM Module (Disabled in ini)");
}
}
else
{
m_log.Info("[MRM] Disabled MRM Module (Default disabled)");
} }
} }