Fixes Region.Framework tests. Although these tests don't fail, they need to be rewritten, because they are doing agent manipulations in the wrong way, so they're fairly meaningless.
parent
763285aaf1
commit
14073831d2
|
@ -2467,7 +2467,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
m_log.DebugFormat("[Scene]: Incoming client {0} {1} in region {2} via Login", aCircuit.firstname, aCircuit.lastname, RegionInfo.RegionName);
|
||||
vialogin = true;
|
||||
IUserAgentVerificationModule userVerification = RequestModuleInterface<IUserAgentVerificationModule>();
|
||||
if (userVerification != null)
|
||||
if (userVerification != null && ep != null)
|
||||
{
|
||||
if (!userVerification.VerifyClient(aCircuit, ep.ToString()))
|
||||
{
|
||||
|
@ -2491,22 +2491,15 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
|
||||
m_log.Debug("[Scene] Adding new agent " + client.Name + " to scene " + RegionInfo.RegionName);
|
||||
/*
|
||||
string logMsg = string.Format("[SCENE]: Adding new {0} agent for {1} in {2}",
|
||||
((aCircuit.child == true) ? "child" : "root"), client.Name,
|
||||
RegionInfo.RegionName);
|
||||
|
||||
m_log.Debug(logMsg);
|
||||
*/
|
||||
|
||||
//CommsManager.UserProfileCacheService.AddNewUser(client.AgentId);
|
||||
ScenePresence sp = CreateAndAddScenePresence(client);
|
||||
sp.Appearance = aCircuit.Appearance;
|
||||
if (aCircuit != null)
|
||||
sp.Appearance = aCircuit.Appearance;
|
||||
|
||||
// HERE!!! Do the initial attachments right here
|
||||
// first agent upon login is a root agent by design.
|
||||
// All other AddNewClient calls find aCircuit.child to be true
|
||||
if (aCircuit == null || aCircuit.child == false)
|
||||
if (aCircuit == null || (aCircuit != null && aCircuit.child == false))
|
||||
{
|
||||
sp.IsChildAgent = false;
|
||||
Util.FireAndForget(delegate(object o) { sp.RezAttachments(); });
|
||||
|
|
|
@ -94,16 +94,24 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
|||
// Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
|
||||
AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
|
||||
sogd.Enabled = false;
|
||||
|
||||
|
||||
SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene);
|
||||
|
||||
IClientAPI client = SceneSetupHelpers.AddRootAgent(scene, agentId);
|
||||
scene.DeRezObject(client, part.LocalId, UUID.Zero, DeRezAction.Delete, UUID.Zero);
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
IClientAPI client = SceneSetupHelpers.AddRootAgent(scene, agentId);
|
||||
scene.DeRezObject(client, part.LocalId, UUID.Zero, DeRezAction.Delete, UUID.Zero);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine("Exception: " + e.StackTrace);
|
||||
}
|
||||
SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
|
||||
|
||||
Assert.That(retrievedPart, Is.Not.Null);
|
||||
|
||||
sogd.InventoryDeQueueAndDelete();
|
||||
|
||||
SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(part.LocalId);
|
||||
Assert.That(retrievedPart2, Is.Null);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue