From 85d2e215580609b270deb9d3f6e8d3b3a50e2b2f Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 12 Jun 2010 02:45:21 +0100 Subject: Change trunk versio to 0.7.1 Dev --- OpenSim/Framework/Servers/VersionInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Servers/VersionInfo.cs b/OpenSim/Framework/Servers/VersionInfo.cs index 90b5f57..100bf1f 100644 --- a/OpenSim/Framework/Servers/VersionInfo.cs +++ b/OpenSim/Framework/Servers/VersionInfo.cs @@ -29,7 +29,7 @@ namespace OpenSim { public class VersionInfo { - private const string VERSION_NUMBER = "0.7"; + private const string VERSION_NUMBER = "0.7.1"; private const Flavour VERSION_FLAVOUR = Flavour.Dev; public enum Flavour @@ -71,4 +71,4 @@ namespace OpenSim /// public readonly static int MajorInterfaceVersion = 6; } -} \ No newline at end of file +} -- cgit v1.1 From 92fea025cb90eea1a972f25d64a13824ff954d69 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 12 Jun 2010 06:13:27 +0100 Subject: Resume scripts that have been rezzed from a prim --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 5400a4f..59ab26b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -2699,6 +2699,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // objects rezzed with this method are die_at_edge by default. new_group.RootPart.SetDieAtEdge(true); + new_group.ResumeScripts(); + m_ScriptEngine.PostObjectEvent(m_host.LocalId, new EventParams( "object_rez", new Object[] { new LSL_String( -- cgit v1.1 From 65f03af38f09b83684c1ba16c5d65cb94a98644c Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 12 Jun 2010 06:57:10 +0100 Subject: Don't filre CHANGED_INVENTORY if a prim comes in from storage --- OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 8b83b06..866bb6e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -555,7 +555,7 @@ namespace OpenSim.Region.Framework.Scenes foreach (TaskInventoryItem item in items) { m_items.Add(item.ItemID, item); - m_part.TriggerScriptChangedEvent(Changed.INVENTORY); +// m_part.TriggerScriptChangedEvent(Changed.INVENTORY); } } -- cgit v1.1 From 4c58ac2c90de339c9d0596c74e61785320c78ab5 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 12 Jun 2010 07:34:22 +0200 Subject: Make local teleports send CHANGED_TELEPORT --- .../CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 0707119..ae9952e 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -180,6 +180,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer sp.ControllingClient.SendLocalTeleport(position, lookAt, teleportFlags); sp.Teleport(position); + + foreach (SceneObjectGroup grp in sp.Attachments) + sp.Scene.EventManager.TriggerOnScriptChangedEvent(grp.LocalId, (uint)Changed.TELEPORT); } else // Another region possibly in another simulator { -- cgit v1.1 From 3c036934a3f017e1444dcc4a05e946076345f59d Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 12 Jun 2010 08:29:20 +0200 Subject: Preserving the link numbers is a serializer's highest duty. Prevent region crossings from screwing up complex attachments by preserving link numbers. --- .../Framework/Scenes/Serialization/SceneObjectSerializer.cs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index f7544ac..5bdaa17 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs @@ -221,7 +221,16 @@ namespace OpenSim.Region.Framework.Scenes.Serialization sr = new StringReader(parts[i].OuterXml); reader = new XmlTextReader(sr); SceneObjectPart part = SceneObjectPart.FromXml(reader); + + int originalLinkNum = part.LinkNum; + sceneObject.AddPart(part); + + // SceneObjectGroup.AddPart() tries to be smart and automatically set the LinkNum. + // We override that here + if (originalLinkNum != 0) + part.LinkNum = originalLinkNum; + part.StoreUndoState(); reader.Close(); sr.Close(); -- cgit v1.1 From ceac35bac1c5ec5f7a39e66492bcef1968e27931 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 12 Jun 2010 16:25:40 +0100 Subject: Log and eat sculpt meshing exceptions caused by bad jp2 data. --- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 7984bd9..a9e9f5c 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -1771,7 +1771,18 @@ namespace OpenSim.Region.Physics.OdePlugin IMesh mesh = null; if (needsMeshing(pbs)) - mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical); + { + try + { + mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical); + } + catch(Exception e) + { + m_log.ErrorFormat("[PHYSICS]: Exception while meshing prim {0}."); + m_log.Debug(e.ToString()); + mesh = null; + } + } result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical); -- cgit v1.1 From e6efe34b4c7481ef3818905508cdcea6a4c8a9c8 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 12 Jun 2010 11:11:13 -0700 Subject: * Added CHANGED_TELEPORT event trigger upon inter-sim teleports. * Cleaned up NewUserConnection. --- .../EntityTransfer/EntityTransferModule.cs | 2 +- OpenSim/Region/Framework/Scenes/Scene.cs | 138 ++++++++++++--------- 2 files changed, 81 insertions(+), 59 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index ae9952e..a33f5c5 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -1123,7 +1123,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer string reason = String.Empty; - bool regionAccepted = m_scene.SimulationService.CreateAgent(reg, a, 0, out reason); // m_interregionCommsOut.SendCreateChildAgent(reg.RegionHandle, a, 0, out reason); + bool regionAccepted = m_scene.SimulationService.CreateAgent(reg, a, (uint)TeleportFlags.Default, out reason); if (regionAccepted && newAgent) { diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 9594e6b..2b2c04a 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2480,7 +2480,7 @@ namespace OpenSim.Region.Framework.Scenes /// - /// Called when objects or attachments cross the border between regions. + /// Called when objects or attachments cross the border, or teleport, between regions. /// /// /// @@ -2510,6 +2510,8 @@ namespace OpenSim.Region.Framework.Scenes // Do this as late as possible so that listeners have full access to the incoming object EventManager.TriggerOnIncomingSceneObject(newObject); + + TriggerEventsOnScriptedAttachments(newObject); return true; } @@ -2577,22 +2579,13 @@ namespace OpenSim.Region.Framework.Scenes // Fix up attachment Parent Local ID ScenePresence sp = GetScenePresence(sceneObject.OwnerID); - //uint parentLocalID = 0; if (sp != null) { - //parentLocalID = sp.LocalId; - - //sceneObject.RootPart.IsAttachment = true; - //sceneObject.RootPart.SetParentLocalId(parentLocalID); SceneObjectGroup grp = sceneObject; - //RootPrim.SetParentLocalId(parentLocalID); - m_log.DebugFormat( "[ATTACHMENT]: Received attachment {0}, inworld asset id {1}", grp.GetFromItemID(), grp.UUID); - - //grp.SetFromAssetID(grp.RootPart.LastOwnerID); m_log.DebugFormat( "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition); @@ -2602,7 +2595,6 @@ namespace OpenSim.Region.Framework.Scenes AttachmentsModule.AttachObject( sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false); - //grp.SendGroupFullUpdate(); } else { @@ -2630,6 +2622,27 @@ namespace OpenSim.Region.Framework.Scenes return true; } + + private void TriggerEventsOnScriptedAttachments(SceneObjectGroup sog) + { + ScenePresence sp = GetScenePresence(sog.OwnerID); + + if (sp != null) + { + AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(sp.UUID); + + if (aCircuit != null && (aCircuit.teleportFlags != (uint)TeleportFlags.Default)) + { + // This will get your attention + //m_log.Error("[XXX] Triggering "); + + // Trigger CHANGED_TELEPORT + sp.Scene.EventManager.TriggerOnScriptChangedEvent(sog.LocalId, (uint)Changed.TELEPORT); + } + + } + } + #endregion #region Add/Remove Avatar Methods @@ -3437,6 +3450,8 @@ namespace OpenSim.Region.Framework.Scenes public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, out string reason) { TeleportFlags tp = (TeleportFlags)teleportFlags; + reason = String.Empty; + //Teleport flags: // // TeleportFlags.ViaGodlikeLure - Border Crossing @@ -3444,52 +3459,34 @@ namespace OpenSim.Region.Framework.Scenes // TeleportFlags.TeleportFlags.ViaLure - Teleport request sent by another user // TeleportFlags.ViaLandmark | TeleportFlags.ViaLocation | TeleportFlags.ViaLandmark | TeleportFlags.Default - Regular Teleport - - if (LoginsDisabled) - { - reason = "Logins Disabled"; - return false; - } // Don't disable this log message - it's too helpful m_log.InfoFormat( "[CONNECTION BEGIN]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5}, teleportflags {6})", RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname, agent.AgentID, agent.circuitcode, teleportFlags); - reason = String.Empty; - try - { - if (!VerifyUserPresence(agent, out reason)) - return false; - } - catch (Exception e) + if (LoginsDisabled) { - m_log.DebugFormat("[CONNECTION BEGIN]: Exception verifying presence {0}", e.Message); + reason = "Logins Disabled"; return false; } - try - { - if (!AuthorizeUser(agent, out reason)) - return false; - } - catch (Exception e) + ScenePresence sp = GetScenePresence(agent.AgentID); + + if (sp != null && !sp.IsChildAgent) { - m_log.DebugFormat("[CONNECTION BEGIN]: Exception authorizing user {0}", e.Message); - return false; + // We have a zombie from a crashed session. + // Or the same user is trying to be root twice here, won't work. + // Kill it. + m_log.DebugFormat("[SCENE]: Zombie scene presence detected for {0} in {1}", agent.AgentID, RegionInfo.RegionName); + sp.ControllingClient.Close(); + sp = null; } - m_log.InfoFormat( - "[CONNECTION BEGIN]: Region {0} authenticated and authorized incoming {1} agent {2} {3} {4} (circuit code {5})", - RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname, - agent.AgentID, agent.circuitcode); - - CapsModule.NewUserConnection(agent); - ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); - //On login or border crossing test land permisions - if (tp != TeleportFlags.Default) + //On login test land permisions + if (tp == TeleportFlags.ViaLogin) { if (land != null && !TestLandRestrictions(agent, land, out reason)) { @@ -3497,8 +3494,40 @@ namespace OpenSim.Region.Framework.Scenes } } - ScenePresence sp = GetScenePresence(agent.AgentID); - if (sp != null) + if (sp == null) // We don't have an [child] agent here already + { + + try + { + if (!VerifyUserPresence(agent, out reason)) + return false; + } + catch (Exception e) + { + m_log.DebugFormat("[CONNECTION BEGIN]: Exception verifying presence {0}", e.Message); + return false; + } + + try + { + if (!AuthorizeUser(agent, out reason)) + return false; + } + catch (Exception e) + { + m_log.DebugFormat("[CONNECTION BEGIN]: Exception authorizing user {0}", e.Message); + return false; + } + + m_log.InfoFormat( + "[CONNECTION BEGIN]: Region {0} authenticated and authorized incoming {1} agent {2} {3} {4} (circuit code {5})", + RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname, + agent.AgentID, agent.circuitcode); + + CapsModule.NewUserConnection(agent); + CapsModule.AddCapsHandler(agent.AgentID); + } + else { if (sp.IsChildAgent) { @@ -3507,22 +3536,18 @@ namespace OpenSim.Region.Framework.Scenes agent.AgentID, RegionInfo.RegionName); sp.AdjustKnownSeeds(); - - return true; - } - else - { - // We have a zombie from a crashed session. Kill it. - m_log.DebugFormat("[SCENE]: Zombie scene presence detected for {0} in {1}", agent.AgentID, RegionInfo.RegionName); - sp.ControllingClient.Close(); + CapsModule.NewUserConnection(agent); } } - CapsModule.AddCapsHandler(agent.AgentID); - if (!agent.child) + // In all cases, add or update the circuit data with the new agent circuit data and teleport flags + agent.teleportFlags = teleportFlags; + m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent); + + if (tp == TeleportFlags.ViaLogin) { - if (TestBorderCross(agent.startpos,Cardinals.E)) + if (TestBorderCross(agent.startpos, Cardinals.E)) { Border crossedBorder = GetCrossedBorder(agent.startpos, Cardinals.E); agent.startpos.X = crossedBorder.BorderLine.Z - 1; @@ -3587,9 +3612,6 @@ namespace OpenSim.Region.Framework.Scenes } } - agent.teleportFlags = teleportFlags; - m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent); - return true; } -- cgit v1.1 From 59acb37d92e0f564a56ac96cfce8b45c59768ca1 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 12 Jun 2010 19:14:46 +0100 Subject: Change name of method to better reflect what it does --- OpenSim/Region/Framework/Scenes/Scene.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 2b2c04a..a89060c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2511,7 +2511,7 @@ namespace OpenSim.Region.Framework.Scenes // Do this as late as possible so that listeners have full access to the incoming object EventManager.TriggerOnIncomingSceneObject(newObject); - TriggerEventsOnScriptedAttachments(newObject); + TriggerChangedTeleport(newObject); return true; } @@ -2623,7 +2623,7 @@ namespace OpenSim.Region.Framework.Scenes return true; } - private void TriggerEventsOnScriptedAttachments(SceneObjectGroup sog) + private void TriggerChangedTeleport(SceneObjectGroup sog) { ScenePresence sp = GetScenePresence(sog.OwnerID); -- cgit v1.1 From 66619b599654397fb09da0f40d3d7e69dafcfb41 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 12 Jun 2010 12:08:45 -0700 Subject: Added checks for failed UpdateAgent calls. --- .../EntityTransfer/EntityTransferModule.cs | 46 ++++++++++++++-------- OpenSim/Region/Framework/Scenes/Scene.cs | 2 + 2 files changed, 31 insertions(+), 17 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index a33f5c5..5d50a83 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -396,7 +396,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer agent.Position = position; SetCallbackURL(agent, sp.Scene.RegionInfo); - UpdateAgent(reg, finalDestination, agent); + if (!UpdateAgent(reg, finalDestination, agent)) + { + // Region doesn't take it + Fail(sp, finalDestination); + return; + } m_log.DebugFormat( "[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} to client {1}", capsPath, sp.UUID); @@ -421,21 +426,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // that the client contacted the destination before we send the attachments and close things here. if (!WaitForCallback(sp.UUID)) { - // Client never contacted destination. Let's restore everything back - sp.ControllingClient.SendTeleportFailed("Problems connecting to destination."); - - // Fail. Reset it back - sp.IsChildAgent = false; - - ResetFromTransit(sp.UUID); - - // Yikes! We should just have a ref to scene here. - //sp.Scene.InformClientOfNeighbours(sp); - EnableChildAgents(sp); - - // Finally, kill the agent we just created at the destination. - m_aScene.SimulationService.CloseAgent(finalDestination, sp.UUID); - + Fail(sp, finalDestination); return; } @@ -475,6 +466,22 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer } } + private void Fail(ScenePresence sp, GridRegion finalDestination) + { + // Client never contacted destination. Let's restore everything back + sp.ControllingClient.SendTeleportFailed("Problems connecting to destination."); + + // Fail. Reset it back + sp.IsChildAgent = false; + + ResetFromTransit(sp.UUID); + + EnableChildAgents(sp); + + // Finally, kill the agent we just created at the destination. + m_aScene.SimulationService.CloseAgent(finalDestination, sp.UUID); + + } protected virtual bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason) { @@ -813,7 +820,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer cAgent.CallbackURI = "http://" + m_scene.RegionInfo.ExternalHostName + ":" + m_scene.RegionInfo.HttpPort + "/agent/" + agent.UUID.ToString() + "/" + m_scene.RegionInfo.RegionID.ToString() + "/release/"; - m_scene.SimulationService.UpdateAgent(neighbourRegion, cAgent); + if (!m_scene.SimulationService.UpdateAgent(neighbourRegion, cAgent)) + { + // region doesn't take it + ResetFromTransit(agent.UUID); + return agent; + } // Next, let's close the child agent connections that are too far away. agent.CloseChildAgents(neighbourx, neighboury); diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 2b2c04a..bcfb4c9 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3903,6 +3903,8 @@ namespace OpenSim.Region.Framework.Scenes m_log.DebugFormat( "[SCENE]: Incoming child agent update for {0} in {1}", cAgentData.AgentID, RegionInfo.RegionName); + // XPTO: if this agent is not allowed here as root, always return false + // We have to wait until the viewer contacts this region after receiving EAC. // That calls AddNewClient, which finally creates the ScenePresence ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID); -- cgit v1.1