From ca2a4bbded8c33125c5b96bb3b715e3f3925ddad Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 8 Aug 2010 19:35:20 +0200 Subject: [PATCH 1/3] Add debug messages to attachment receiving and cowardly refuse to create them if the owner can't be determined. --- OpenSim/Region/Framework/Scenes/Scene.cs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 6c17be8dce..8a8dabceae 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2592,6 +2592,12 @@ namespace OpenSim.Region.Framework.Scenes /// True if the SceneObjectGroup was added, False if it was not public bool AddSceneObject(SceneObjectGroup sceneObject) { + if (sceneObject.OwnerID == UUID.Zero) + { + m_log.ErrorFormat("[SCENE]: Owner ID for {0} was zero", sceneObject.UUID); + return false; + } + // If the user is banned, we won't let any of their objects // enter. Period. // @@ -2641,15 +2647,27 @@ namespace OpenSim.Region.Framework.Scenes if (AttachmentsModule != null) AttachmentsModule.AttachObject(sp.ControllingClient, grp, 0, false); + m_log.DebugFormat("[SCENE]: Attachment {0} arrived and scene presence was found, attaching", sceneObject.UUID); } else { + m_log.DebugFormat("[SCENE]: Attachment {0} arrived and scene presence was not found, setting to temp", sceneObject.UUID); RootPrim.RemFlag(PrimFlags.TemporaryOnRez); RootPrim.AddFlag(PrimFlags.TemporaryOnRez); } + if (sceneObject.OwnerID == UUID.Zero) + { + m_log.ErrorFormat("[SCENE]: Owner ID for {0} was zero after attachment processing. BUG!", sceneObject.UUID); + return false; + } } else { + if (sceneObject.OwnerID == UUID.Zero) + { + m_log.ErrorFormat("[SCENE]: Owner ID for non-attachment {0} was zero", sceneObject.UUID); + return false; + } AddRestoredSceneObject(sceneObject, true, false); if (!Permissions.CanObjectEntry(sceneObject.UUID, @@ -5333,4 +5351,4 @@ namespace OpenSim.Region.Framework.Scenes return offsets.ToArray(); } } -} \ No newline at end of file +} From 603b3a1606396e355416eae838f6bdaa5051bf1f Mon Sep 17 00:00:00 2001 From: meta7 Date: Sun, 8 Aug 2010 17:31:29 -0700 Subject: [PATCH 2/3] Fix minimap issues. This addresses mantis #228. --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 23 ++----------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 5acc227637..94ec534f80 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -228,27 +228,8 @@ namespace OpenSim.Region.Framework.Scenes if (sp.IsChildAgent) return; - if (sp.ParentID != 0) - { - // sitting avatar - SceneObjectPart sop = m_parentScene.GetSceneObjectPart(sp.ParentID); - if (sop != null) - { - coarseLocations.Add(sop.AbsolutePosition + sp.AbsolutePosition); - avatarUUIDs.Add(sp.UUID); - } - else - { - // we can't find the parent.. ! arg! - coarseLocations.Add(sp.AbsolutePosition); - avatarUUIDs.Add(sp.UUID); - } - } - else - { - coarseLocations.Add(sp.AbsolutePosition); - avatarUUIDs.Add(sp.UUID); - } + coarseLocations.Add(sp.AbsolutePosition); + avatarUUIDs.Add(sp.UUID); } } From 680e801bf229d54dc57dbca24e841f7f2e8f43d4 Mon Sep 17 00:00:00 2001 From: meta7 Date: Sun, 8 Aug 2010 17:32:20 -0700 Subject: [PATCH 3/3] Print a console message when we deny access because of no valid parcel found. --- OpenSim/Region/Framework/Scenes/Scene.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 8a8dabceae..779f89857d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3513,7 +3513,8 @@ namespace OpenSim.Region.Framework.Scenes if (tp == TeleportFlags.ViaLogin) { if (land != null && !TestLandRestrictions(agent, land, out reason)) - { + { + m_log.DebugFormat("[CONNECTION BEGIN]: Denying access to {0} due to no land access", agent.AgentID.ToString()); return false; } }