aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorDiva Canto2010-03-02 07:53:52 -0800
committerDiva Canto2010-03-02 07:53:52 -0800
commit14073831d26172575655dbbfa7fd45c6366e9f60 (patch)
treed9548e89a94b28e227c971fbd490acee2ca44408 /OpenSim/Region
parentFixed SQL tests. (diff)
downloadopensim-SC-14073831d26172575655dbbfa7fd45c6366e9f60.zip
opensim-SC-14073831d26172575655dbbfa7fd45c6366e9f60.tar.gz
opensim-SC-14073831d26172575655dbbfa7fd45c6366e9f60.tar.bz2
opensim-SC-14073831d26172575655dbbfa7fd45c6366e9f60.tar.xz
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.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs15
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs18
2 files changed, 17 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index d00c990..5e5a52e 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2467,7 +2467,7 @@ namespace OpenSim.Region.Framework.Scenes
2467 m_log.DebugFormat("[Scene]: Incoming client {0} {1} in region {2} via Login", aCircuit.firstname, aCircuit.lastname, RegionInfo.RegionName); 2467 m_log.DebugFormat("[Scene]: Incoming client {0} {1} in region {2} via Login", aCircuit.firstname, aCircuit.lastname, RegionInfo.RegionName);
2468 vialogin = true; 2468 vialogin = true;
2469 IUserAgentVerificationModule userVerification = RequestModuleInterface<IUserAgentVerificationModule>(); 2469 IUserAgentVerificationModule userVerification = RequestModuleInterface<IUserAgentVerificationModule>();
2470 if (userVerification != null) 2470 if (userVerification != null && ep != null)
2471 { 2471 {
2472 if (!userVerification.VerifyClient(aCircuit, ep.ToString())) 2472 if (!userVerification.VerifyClient(aCircuit, ep.ToString()))
2473 { 2473 {
@@ -2491,22 +2491,15 @@ namespace OpenSim.Region.Framework.Scenes
2491 } 2491 }
2492 2492
2493 m_log.Debug("[Scene] Adding new agent " + client.Name + " to scene " + RegionInfo.RegionName); 2493 m_log.Debug("[Scene] Adding new agent " + client.Name + " to scene " + RegionInfo.RegionName);
2494 /*
2495 string logMsg = string.Format("[SCENE]: Adding new {0} agent for {1} in {2}",
2496 ((aCircuit.child == true) ? "child" : "root"), client.Name,
2497 RegionInfo.RegionName);
2498 2494
2499 m_log.Debug(logMsg);
2500 */
2501
2502 //CommsManager.UserProfileCacheService.AddNewUser(client.AgentId);
2503 ScenePresence sp = CreateAndAddScenePresence(client); 2495 ScenePresence sp = CreateAndAddScenePresence(client);
2504 sp.Appearance = aCircuit.Appearance; 2496 if (aCircuit != null)
2497 sp.Appearance = aCircuit.Appearance;
2505 2498
2506 // HERE!!! Do the initial attachments right here 2499 // HERE!!! Do the initial attachments right here
2507 // first agent upon login is a root agent by design. 2500 // first agent upon login is a root agent by design.
2508 // All other AddNewClient calls find aCircuit.child to be true 2501 // All other AddNewClient calls find aCircuit.child to be true
2509 if (aCircuit == null || aCircuit.child == false) 2502 if (aCircuit == null || (aCircuit != null && aCircuit.child == false))
2510 { 2503 {
2511 sp.IsChildAgent = false; 2504 sp.IsChildAgent = false;
2512 Util.FireAndForget(delegate(object o) { sp.RezAttachments(); }); 2505 Util.FireAndForget(delegate(object o) { sp.RezAttachments(); });
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
index b775d27..b50d4ca 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
@@ -94,16 +94,24 @@ namespace OpenSim.Region.Framework.Scenes.Tests
94 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. 94 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
95 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; 95 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
96 sogd.Enabled = false; 96 sogd.Enabled = false;
97 97
98 SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene); 98 SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene);
99 99
100 IClientAPI client = SceneSetupHelpers.AddRootAgent(scene, agentId); 100 try
101 scene.DeRezObject(client, part.LocalId, UUID.Zero, DeRezAction.Delete, UUID.Zero); 101 {
102 102 IClientAPI client = SceneSetupHelpers.AddRootAgent(scene, agentId);
103 scene.DeRezObject(client, part.LocalId, UUID.Zero, DeRezAction.Delete, UUID.Zero);
104 }
105 catch (Exception e)
106 {
107 Console.WriteLine("Exception: " + e.StackTrace);
108 }
103 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); 109 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
110
104 Assert.That(retrievedPart, Is.Not.Null); 111 Assert.That(retrievedPart, Is.Not.Null);
105 112
106 sogd.InventoryDeQueueAndDelete(); 113 sogd.InventoryDeQueueAndDelete();
114
107 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(part.LocalId); 115 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(part.LocalId);
108 Assert.That(retrievedPart2, Is.Null); 116 Assert.That(retrievedPart2, Is.Null);
109 } 117 }