aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-09-10 00:57:52 +0100
committerJustin Clark-Casey (justincc)2011-09-10 00:57:52 +0100
commit9c32b131fd0b156ada1c7e2d2107d6e1061da5e0 (patch)
treee32258d8112450b48a5b7dc204a6ae2b35f33b3f /OpenSim
parentreinstate the validation logging on teleport. A 'fail' of validation still d... (diff)
downloadopensim-SC_OLD-9c32b131fd0b156ada1c7e2d2107d6e1061da5e0.zip
opensim-SC_OLD-9c32b131fd0b156ada1c7e2d2107d6e1061da5e0.tar.gz
opensim-SC_OLD-9c32b131fd0b156ada1c7e2d2107d6e1061da5e0.tar.bz2
opensim-SC_OLD-9c32b131fd0b156ada1c7e2d2107d6e1061da5e0.tar.xz
Add extra log information when attachments fail validation
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs16
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs10
2 files changed, 20 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index a4ef2b6..8924c0a 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -59,7 +59,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
59 get { return m_MaxTransferDistance; } 59 get { return m_MaxTransferDistance; }
60 set { m_MaxTransferDistance = value; } 60 set { m_MaxTransferDistance = value; }
61 } 61 }
62
63 62
64 protected bool m_Enabled = false; 63 protected bool m_Enabled = false;
65 protected Scene m_aScene; 64 protected Scene m_aScene;
@@ -68,7 +67,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
68 private ExpiringCache<UUID, ExpiringCache<ulong, DateTime>> m_bannedRegions = 67 private ExpiringCache<UUID, ExpiringCache<ulong, DateTime>> m_bannedRegions =
69 new ExpiringCache<UUID, ExpiringCache<ulong, DateTime>>(); 68 new ExpiringCache<UUID, ExpiringCache<ulong, DateTime>>();
70 69
71
72 #region ISharedRegionModule 70 #region ISharedRegionModule
73 71
74 public Type ReplaceableInterface 72 public Type ReplaceableInterface
@@ -329,7 +327,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
329 if (sp.ParentID != (uint)0) 327 if (sp.ParentID != (uint)0)
330 sp.StandUp(); 328 sp.StandUp();
331 329
332 sp.ValidateAttachments(); 330 if (!sp.ValidateAttachments())
331 m_log.DebugFormat(
332 "[ENTITY TRANSFER MODULE]: Failed validation of all attachments for teleport of {0} from {1} to {2}. Continuing.",
333 sp.Name, sp.Scene.RegionInfo.RegionName, finalDestination.RegionName);
333 334
334// if (!sp.ValidateAttachments()) 335// if (!sp.ValidateAttachments())
335// { 336// {
@@ -941,7 +942,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
941 /// This Closes child agents on neighbouring regions 942 /// This Closes child agents on neighbouring regions
942 /// Calls an asynchronous method to do so.. so it doesn't lag the sim. 943 /// Calls an asynchronous method to do so.. so it doesn't lag the sim.
943 /// </summary> 944 /// </summary>
944 protected ScenePresence CrossAgentToNewRegionAsync(ScenePresence agent, Vector3 pos, uint neighbourx, uint neighboury, GridRegion neighbourRegion, bool isFlying, string version) 945 protected ScenePresence CrossAgentToNewRegionAsync(
946 ScenePresence agent, Vector3 pos, uint neighbourx, uint neighboury, GridRegion neighbourRegion,
947 bool isFlying, string version)
945 { 948 {
946 ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize)); 949 ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize));
947 950
@@ -951,7 +954,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
951 954
952 if (neighbourRegion != null) 955 if (neighbourRegion != null)
953 { 956 {
954 agent.ValidateAttachments(); 957 if (!agent.ValidateAttachments())
958 m_log.DebugFormat(
959 "[ENTITY TRANSFER MODULE]: Failed validation of all attachments for region crossing of {0} from {1} to {2}. Continuing.",
960 agent.Name, agent.Scene.RegionInfo.RegionName, neighbourRegion.RegionName);
955 961
956 pos = pos + (agent.Velocity); 962 pos = pos + (agent.Velocity);
957 963
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index f231a39..18ad715 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3501,8 +3501,10 @@ namespace OpenSim.Region.Framework.Scenes
3501 /// <summary> 3501 /// <summary>
3502 /// This is currently just being done for information. 3502 /// This is currently just being done for information.
3503 /// </summary> 3503 /// </summary>
3504 public void ValidateAttachments() 3504 public bool ValidateAttachments()
3505 { 3505 {
3506 bool validated = true;
3507
3506 lock (m_attachments) 3508 lock (m_attachments)
3507 { 3509 {
3508 // Validate 3510 // Validate
@@ -3512,15 +3514,21 @@ namespace OpenSim.Region.Framework.Scenes
3512 { 3514 {
3513 m_log.WarnFormat( 3515 m_log.WarnFormat(
3514 "[SCENE PRESENCE]: Failed to validate an attachment for {0} since it was null. Continuing", Name); 3516 "[SCENE PRESENCE]: Failed to validate an attachment for {0} since it was null. Continuing", Name);
3517
3518 validated = false;
3515 } 3519 }
3516 else if (gobj.IsDeleted) 3520 else if (gobj.IsDeleted)
3517 { 3521 {
3518 m_log.WarnFormat( 3522 m_log.WarnFormat(
3519 "[SCENE PRESENCE]: Failed to validate attachment {0} {1} for {2} since it had been deleted. Continuing", 3523 "[SCENE PRESENCE]: Failed to validate attachment {0} {1} for {2} since it had been deleted. Continuing",
3520 gobj.Name, gobj.UUID, Name); 3524 gobj.Name, gobj.UUID, Name);
3525
3526 validated = false;
3521 } 3527 }
3522 } 3528 }
3523 } 3529 }
3530
3531 return validated;
3524 } 3532 }
3525 3533
3526 /// <summary> 3534 /// <summary>