From ba98d6fffe03389d6538a11d5eec45c863964403 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Fri, 17 Feb 2012 08:03:53 -0500 Subject: Fix missing telehub handling on login --- OpenSim/Region/Framework/Scenes/Scene.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 4c8e2d2..ecc553d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3427,6 +3427,27 @@ namespace OpenSim.Region.Framework.Scenes agent.startpos.Z = 720; } } + + // Honor Estate teleport routing via Telehubs + if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && RegionInfo.EstateSettings.AllowDirectTeleport == false) + { + SceneObjectGroup telehub = GetSceneObjectGroup(RegionInfo.RegionSettings.TelehubObject); + // Can have multiple SpawnPoints + List spawnpoints = RegionInfo.RegionSettings.SpawnPoints(); + if ( spawnpoints.Count > 1) + { + // We have multiple SpawnPoints, Route the agent to a random one + agent.startpos = spawnpoints[Util.RandomClass.Next(spawnpoints.Count)].GetLocation(telehub.AbsolutePosition, telehub.GroupRotation); + } + else + { + // We have a single SpawnPoint and will route the agent to it + agent.startpos = spawnpoints[0].GetLocation(telehub.AbsolutePosition, telehub.GroupRotation); + } + + return true; + } + // Honor parcel landing type and position. if (land != null) { -- cgit v1.1 From 6baa13ab7aeb7d0ee08f2460f52961dbd79bada1 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Fri, 17 Feb 2012 09:12:41 -0800 Subject: Add new and updated script events --- OpenSim/Region/Framework/Scenes/EventManager.cs | 58 ++++++++++++++++++++-- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 12 +++++ 2 files changed, 67 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index d31d380..34d3da7 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs @@ -184,10 +184,62 @@ namespace OpenSim.Region.Framework.Scenes public event ClientClosed OnClientClosed; + // Fired when a script is created + // The indication that a new script exists in this region. + public delegate void NewScript(UUID clientID, SceneObjectPart part, UUID itemID); + public event NewScript OnNewScript; + public virtual void TriggerNewScript(UUID clientID, SceneObjectPart part, UUID itemID) + { + NewScript handlerNewScript = OnNewScript; + if (handlerNewScript != null) + { + foreach (NewScript d in handlerNewScript.GetInvocationList()) + { + try + { + d(clientID, part, itemID); + } + catch (Exception e) + { + m_log.ErrorFormat( + "[EVENT MANAGER]: Delegate for TriggerNewScript failed - continuing. {0} {1}", + e.Message, e.StackTrace); + } + } + } + } + + //TriggerUpdateScript: triggered after Scene receives client's upload of updated script and stores it as asset + // An indication that the script has changed. + public delegate void UpdateScript(UUID clientID, UUID itemId, UUID primId, bool isScriptRunning, UUID newAssetID); + public event UpdateScript OnUpdateScript; + public virtual void TriggerUpdateScript(UUID clientId, UUID itemId, UUID primId, bool isScriptRunning, UUID newAssetID) + { + UpdateScript handlerUpdateScript = OnUpdateScript; + if (handlerUpdateScript != null) + { + foreach (UpdateScript d in handlerUpdateScript.GetInvocationList()) + { + try + { + d(clientId, itemId, primId, isScriptRunning, newAssetID); + } + catch (Exception e) + { + m_log.ErrorFormat( + "[EVENT MANAGER]: Delegate for TriggerUpdateScript failed - continuing. {0} {1}", + e.Message, e.StackTrace); + } + } + } + } + /// - /// This is fired when a scene object property that a script might be interested in (such as color, scale or - /// inventory) changes. Only enough information is sent for the LSL changed event - /// (see http://lslwiki.net/lslwiki/wakka.php?wakka=changed) + /// ScriptChangedEvent is fired when a scene object property that a script might be interested + /// in (such as color, scale or inventory) changes. Only enough information sent is for the LSL changed event. + /// This is not an indication that the script has changed (see OnUpdateScript for that). + /// This event is sent to a script to tell it that some property changed on + /// the object the script is in. See http://lslwiki.net/lslwiki/wakka.php?wakka=changed . /// public event ScriptChangedEvent OnScriptChangedEvent; public delegate void ScriptChangedEvent(uint localID, uint change); diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 9d9729e..6cc78b8 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -283,6 +283,10 @@ namespace OpenSim.Region.Framework.Scenes { remoteClient.SendAgentAlertMessage("Script saved", false); } + + // Tell anyone managing scripts that a script has been reloaded/changed + EventManager.TriggerUpdateScript(remoteClient.AgentId, itemId, primId, isScriptRunning, item.AssetID); + part.ParentGroup.ResumeScripts(); return errors; } @@ -1624,9 +1628,13 @@ namespace OpenSim.Region.Framework.Scenes // have state in inventory part.Inventory.CreateScriptInstance(copyID, 0, false, DefaultScriptEngine, 0); + // tell anyone watching that there is a new script in town + EventManager.TriggerNewScript(agentID, part, copyID); + // m_log.InfoFormat("[PRIMINVENTORY]: " + // "Rezzed script {0} into prim local ID {1} for user {2}", // item.inventoryName, localID, remoteClient.Name); + part.ParentGroup.ResumeScripts(); return part; @@ -1707,6 +1715,10 @@ namespace OpenSim.Region.Framework.Scenes part.Inventory.AddInventoryItem(taskItem, false); part.Inventory.CreateScriptInstance(taskItem, 0, false, DefaultScriptEngine, 0); + + // tell anyone managing scripts that a new script exists + EventManager.TriggerNewScript(agentID, part, taskItem.ItemID); + part.ParentGroup.ResumeScripts(); return part; -- cgit v1.1 From 784263f5e334aeda15effee599efc8bf546aa010 Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Fri, 17 Feb 2012 13:43:14 -0800 Subject: Added the TriggerAvatarAppearanceChanged to EventManager. It's triggered by AvatarFactoryModule after an avatar's appearance has been succesfully changed and persisted (if the persist option is set). --- OpenSim/Region/Framework/Scenes/EventManager.cs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index d31d380..6586437 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs @@ -173,6 +173,9 @@ namespace OpenSim.Region.Framework.Scenes public delegate void AvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID); public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel; + public delegate void AvatarAppearanceChange(ScenePresence avatar); + public event AvatarAppearanceChange OnAvatarAppearanceChange; + public event Action OnSignificantClientMovement; public delegate void IncomingInstantMessage(GridInstantMessage message); @@ -1238,6 +1241,27 @@ namespace OpenSim.Region.Framework.Scenes } } + public void TriggerAvatarAppearanceChanged(ScenePresence avatar) + { + AvatarAppearanceChange handler = OnAvatarAppearanceChange; + if (handler != null) + { + foreach (AvatarAppearanceChange d in handler.GetInvocationList()) + { + try + { + d(avatar); + } + catch (Exception e) + { + m_log.ErrorFormat( + "[EVENT MANAGER]: Delegate for TriggerAvatarAppearanceChanged failed - continuing. {0} {1}", + e.Message, e.StackTrace); + } + } + } + } + public void TriggerIncomingInstantMessage(GridInstantMessage message) { IncomingInstantMessage handlerIncomingInstantMessage = OnIncomingInstantMessage; -- cgit v1.1 From 84184708de7f5663cabb3cf652c4f9922a14bf40 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 18 Feb 2012 01:15:43 +0000 Subject: Fix a bug where changing shape parameters of a child prim in a linkset would not persist. Resolves http://opensimulator.org/mantis/view.php?id=5819 --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index e66678a..66fb493 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1592,7 +1592,7 @@ namespace OpenSim.Region.Framework.Scenes if (group != null) { - if (m_parentScene.Permissions.CanEditObject(group.UUID,agentID)) + if (m_parentScene.Permissions.CanEditObject(group.UUID, agentID)) { group.UpdateExtraParam(primLocalID, type, inUse, data); } @@ -1609,7 +1609,7 @@ namespace OpenSim.Region.Framework.Scenes SceneObjectGroup group = GetGroupByPrim(primLocalID); if (group != null) { - if (m_parentScene.Permissions.CanEditObject(group.GetPartsFullID(primLocalID), agentID)) + if (m_parentScene.Permissions.CanEditObject(group.UUID, agentID)) { ObjectShapePacket.ObjectDataBlock shapeData = new ObjectShapePacket.ObjectDataBlock(); shapeData.ObjectLocalID = shapeBlock.ObjectLocalID; -- cgit v1.1 From 7bdcf9eb26842af57e31f3cecd4f403a39a27bc0 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Sat, 18 Feb 2012 00:32:09 -0500 Subject: Propagate our teleport flags on logins --- OpenSim/Region/Framework/Scenes/Scene.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index ecc553d..841be96 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3261,6 +3261,9 @@ namespace OpenSim.Region.Framework.Scenes { bool vialogin = ((teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0 || (teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0); + bool viahome = ((teleportFlags & (uint)Constants.TeleportFlags.ViaHome) != 0); + bool godlike = ((teleportFlags & (uint)Constants.TeleportFlags.Godlike) != 0); + reason = String.Empty; //Teleport flags: @@ -3429,7 +3432,7 @@ namespace OpenSim.Region.Framework.Scenes } // Honor Estate teleport routing via Telehubs - if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && RegionInfo.EstateSettings.AllowDirectTeleport == false) + if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && RegionInfo.EstateSettings.AllowDirectTeleport == false && !viahome && !godlike) { SceneObjectGroup telehub = GetSceneObjectGroup(RegionInfo.RegionSettings.TelehubObject); // Can have multiple SpawnPoints -- cgit v1.1 From f4cd35322f59b7aae548595541abaa80deefc74d Mon Sep 17 00:00:00 2001 From: BlueWall Date: Sat, 18 Feb 2012 00:45:43 -0500 Subject: Route logins according to Estate, Telehub and TeleportFlags --- OpenSim/Region/Framework/Scenes/Scene.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 841be96..13c866d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3431,8 +3431,10 @@ namespace OpenSim.Region.Framework.Scenes } } - // Honor Estate teleport routing via Telehubs - if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && RegionInfo.EstateSettings.AllowDirectTeleport == false && !viahome && !godlike) + // Honor Estate teleport routing via Telehubs excluding ViaHome and GodLike TeleportFlags + if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && + RegionInfo.EstateSettings.AllowDirectTeleport == false && + !viahome && !godlike) { SceneObjectGroup telehub = GetSceneObjectGroup(RegionInfo.RegionSettings.TelehubObject); // Can have multiple SpawnPoints -- cgit v1.1 From a114367b9b24496bdaaeeeb037e99885ec6f511b Mon Sep 17 00:00:00 2001 From: PixelTomsen Date: Sun, 19 Feb 2012 08:51:40 +0100 Subject: Fix:OmegaX, OmegaY and OmegaZ not saved for child prims http://opensimulator.org/mantis/view.php?id=5893 Signed-off-by: nebadon --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index b130bf7..65905a0 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1556,9 +1556,9 @@ namespace OpenSim.Region.Framework.Scenes dupe.GroupPosition = GroupPosition; dupe.OffsetPosition = OffsetPosition; dupe.RotationOffset = RotationOffset; - dupe.Velocity = new Vector3(0, 0, 0); - dupe.Acceleration = new Vector3(0, 0, 0); - dupe.AngularVelocity = new Vector3(0, 0, 0); + dupe.Velocity = Velocity; + dupe.Acceleration = Acceleration; + dupe.AngularVelocity = AngularVelocity; dupe.Flags = Flags; dupe.OwnershipCost = OwnershipCost; -- cgit v1.1 From bcb95774959edec55cfe757b5de2e7198f176eea Mon Sep 17 00:00:00 2001 From: BlueWall Date: Sun, 19 Feb 2012 12:09:57 -0500 Subject: Use localy defined name, TPFlags, for Constants.TeleportFlags --- OpenSim/Region/Framework/Scenes/Scene.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 13c866d..d2a8ad0 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3259,10 +3259,10 @@ namespace OpenSim.Region.Framework.Scenes /// also return a reason. public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, out string reason, bool requirePresenceLookup) { - bool vialogin = ((teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0 || - (teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0); - bool viahome = ((teleportFlags & (uint)Constants.TeleportFlags.ViaHome) != 0); - bool godlike = ((teleportFlags & (uint)Constants.TeleportFlags.Godlike) != 0); + bool vialogin = ((teleportFlags & (uint)TPFlags.ViaLogin) != 0 || + (teleportFlags & (uint)TPFlags.ViaHGLogin) != 0); + bool viahome = ((teleportFlags & (uint)TPFlags.ViaHome) != 0); + bool godlike = ((teleportFlags & (uint)TPFlags.Godlike) != 0); reason = String.Empty; @@ -3275,9 +3275,9 @@ namespace OpenSim.Region.Framework.Scenes // Don't disable this log message - it's too helpful m_log.DebugFormat( - "[SCENE]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5}, IP {6}, viewer {7}, teleportflags {8}, position {9})", + "[SCENE]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5}, IP {6}, viewer {7}, teleportflags ({8}), position {9})", RegionInfo.RegionName, (agent.child ? "child" : "root"),agent.firstname, agent.lastname, - agent.AgentID, agent.circuitcode, agent.IPAddress, agent.Viewer, teleportFlags, agent.startpos); + agent.AgentID, agent.circuitcode, agent.IPAddress, agent.Viewer, ((TPFlags)teleportFlags).ToString(), agent.startpos); if (LoginsDisabled) { -- cgit v1.1 From 20c65ac438ee67ecd3f837d268e44992f13a8af6 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 19 Feb 2012 12:28:07 -0800 Subject: A few more tweaks on position updates and create child agents. Mono hates concurrent uses of the same TCP connection, and even of the connections to the same server. So let's stop doing it. This patch makes movement much smoother when there are lots of neighbours. --- .../Framework/Scenes/SceneCommunicationService.cs | 19 +++++++++++++------ OpenSim/Region/Framework/Scenes/ScenePresence.cs | 3 ++- 2 files changed, 15 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 58a7b20..c04171b 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs @@ -140,6 +140,7 @@ namespace OpenSim.Region.Framework.Scenes icon.EndInvoke(iar); } + ExpiringCache _failedSims = new ExpiringCache(); public void SendChildAgentDataUpdate(AgentPosition cAgentData, ScenePresence presence) { // This assumes that we know what our neighbors are. @@ -156,16 +157,22 @@ namespace OpenSim.Region.Framework.Scenes // that the region position is cached or performance will degrade Utils.LongToUInts(regionHandle, out x, out y); GridRegion dest = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y); - if (! simulatorList.Contains(dest.ServerURI)) + bool v = true; + if (! simulatorList.Contains(dest.ServerURI) && !_failedSims.TryGetValue(dest.ServerURI, out v)) { // we havent seen this simulator before, add it to the list // and send it an update simulatorList.Add(dest.ServerURI); - - SendChildAgentDataUpdateDelegate d = SendChildAgentDataUpdateAsync; - d.BeginInvoke(cAgentData, m_regionInfo.ScopeID, dest, - SendChildAgentDataUpdateCompleted, - d); + // Let move this to sync. Mono definitely does not like async networking. + if (!m_scene.SimulationService.UpdateAgent(dest, cAgentData)) + // Also if it fails, get it out of the loop for a bit + _failedSims.Add(dest.ServerURI, true, 120); + + // Leaving this here as a reminder that we tried, and it sucks. + //SendChildAgentDataUpdateDelegate d = SendChildAgentDataUpdateAsync; + //d.BeginInvoke(cAgentData, m_regionInfo.ScopeID, dest, + // SendChildAgentDataUpdateCompleted, + // d); } } } diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 77f7b32..8639697 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2738,7 +2738,8 @@ namespace OpenSim.Region.Framework.Scenes AgentPosition agentpos = new AgentPosition(); agentpos.CopyFrom(cadu); - m_scene.SendOutChildAgentUpdates(agentpos, this); + // Let's get this out of the update loop + Util.FireAndForget(delegate { m_scene.SendOutChildAgentUpdates(agentpos, this); }); } } -- cgit v1.1 From b489c85226f50d791c64588a82b73fabe42490a5 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 19 Feb 2012 15:37:37 -0800 Subject: Amend to last commit. This should have been committed too. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 8639697..daf711c 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1219,7 +1219,7 @@ namespace OpenSim.Region.Framework.Scenes { IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface(); if (m_agentTransfer != null) - m_agentTransfer.EnableChildAgents(this); + Util.FireAndForget(delegate { m_agentTransfer.EnableChildAgents(this); }); IFriendsModule friendsModule = m_scene.RequestModuleInterface(); if (friendsModule != null) -- cgit v1.1 From 99b9c1a9d5d4d9b76609ab8f91dd8d9ebe248ff5 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 20 Feb 2012 10:58:07 -0800 Subject: More improvements on agent position updates: if the target sims fail, blacklist them for 2 min, so that we don't keep doing remote calls that fail. --- OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index c04171b..19c9745 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs @@ -140,7 +140,6 @@ namespace OpenSim.Region.Framework.Scenes icon.EndInvoke(iar); } - ExpiringCache _failedSims = new ExpiringCache(); public void SendChildAgentDataUpdate(AgentPosition cAgentData, ScenePresence presence) { // This assumes that we know what our neighbors are. @@ -158,15 +157,13 @@ namespace OpenSim.Region.Framework.Scenes Utils.LongToUInts(regionHandle, out x, out y); GridRegion dest = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y); bool v = true; - if (! simulatorList.Contains(dest.ServerURI) && !_failedSims.TryGetValue(dest.ServerURI, out v)) + if (! simulatorList.Contains(dest.ServerURI)) { // we havent seen this simulator before, add it to the list // and send it an update simulatorList.Add(dest.ServerURI); // Let move this to sync. Mono definitely does not like async networking. - if (!m_scene.SimulationService.UpdateAgent(dest, cAgentData)) - // Also if it fails, get it out of the loop for a bit - _failedSims.Add(dest.ServerURI, true, 120); + m_scene.SimulationService.UpdateAgent(dest, cAgentData); // Leaving this here as a reminder that we tried, and it sucks. //SendChildAgentDataUpdateDelegate d = SendChildAgentDataUpdateAsync; -- cgit v1.1 From 90dc5f47e7db7d921ad82033a581fcd5c5704906 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 21 Feb 2012 01:57:19 +0000 Subject: Fix bug where NPCs would establish child agents on other neighbour regions that had come up after the NPC was created. --- OpenSim/Region/Framework/Scenes/Scene.cs | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index d2a8ad0..e7f835c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -864,16 +864,16 @@ namespace OpenSim.Region.Framework.Scenes try { ForEachRootScenePresence(delegate(ScenePresence agent) - { - //agent.ControllingClient.new - //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo()); - - List old = new List(); - old.Add(otherRegion.RegionHandle); - agent.DropOldNeighbours(old); - if (m_teleportModule != null) - m_teleportModule.EnableChildAgent(agent, otherRegion); - }); + { + //agent.ControllingClient.new + //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo()); + + List old = new List(); + old.Add(otherRegion.RegionHandle); + agent.DropOldNeighbours(old); + if (m_teleportModule != null && agent.PresenceType != PresenceType.Npc) + m_teleportModule.EnableChildAgent(agent, otherRegion); + }); } catch (NullReferenceException) { @@ -881,7 +881,6 @@ namespace OpenSim.Region.Framework.Scenes // This shouldn't happen too often anymore. m_log.Error("[SCENE]: Couldn't inform client of regionup because we got a null reference exception"); } - } else { @@ -1009,10 +1008,10 @@ namespace OpenSim.Region.Framework.Scenes try { ForEachRootScenePresence(delegate(ScenePresence agent) - { - if (m_teleportModule != null) - m_teleportModule.EnableChildAgent(agent, r); - }); + { + if (m_teleportModule != null && agent.PresenceType != PresenceType.Npc) + m_teleportModule.EnableChildAgent(agent, r); + }); } catch (NullReferenceException) { -- cgit v1.1 From 15ce73caca9ea6448e34b95d344cbbf5c9507f6d Mon Sep 17 00:00:00 2001 From: PixelTomsen Date: Tue, 21 Feb 2012 19:37:14 +0100 Subject: Fix:Cannot drag inventory from child prim into inventory http://opensimulator.org/mantis/view.php?id=5569 --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 6cc78b8..132f15d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1144,6 +1144,11 @@ namespace OpenSim.Region.Framework.Scenes return; } + UUID partUUID = part.UUID; + SceneObjectGroup group = part.ParentGroup; + if (group != null) + partUUID = group.RootPart.UUID; + TaskInventoryItem taskItem = part.Inventory.GetInventoryItem(itemId); if (null == taskItem) @@ -1155,19 +1160,18 @@ namespace OpenSim.Region.Framework.Scenes return; } - TaskInventoryItem item = part.Inventory.GetInventoryItem(itemId); - if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) + if ((taskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0) { // If the item to be moved is no copy, we need to be able to // edit the prim. - if (!Permissions.CanEditObjectInventory(part.UUID, remoteClient.AgentId)) + if (!Permissions.CanEditObjectInventory(partUUID, remoteClient.AgentId)) return; } else { // If the item is copiable, then we just need to have perms // on it. The delete check is a pure rights check - if (!Permissions.CanDeleteObject(part.UUID, remoteClient.AgentId)) + if (!Permissions.CanDeleteObject(partUUID, remoteClient.AgentId)) return; } -- cgit v1.1 From 76f411147d69b2a57c8eb7db0f48f3341ca5fd51 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 21 Feb 2012 22:49:06 +0000 Subject: Revert "Fix:Cannot drag inventory from child prim into inventory http://opensimulator.org/mantis/view.php?id=5569" This reverts commit 15ce73caca9ea6448e34b95d344cbbf5c9507f6d. As per the COMMENTS in http://opensimulator.org/mantis/view.php?id=5569, I was going to fix this in a more general way. --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 132f15d..6cc78b8 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1144,11 +1144,6 @@ namespace OpenSim.Region.Framework.Scenes return; } - UUID partUUID = part.UUID; - SceneObjectGroup group = part.ParentGroup; - if (group != null) - partUUID = group.RootPart.UUID; - TaskInventoryItem taskItem = part.Inventory.GetInventoryItem(itemId); if (null == taskItem) @@ -1160,18 +1155,19 @@ namespace OpenSim.Region.Framework.Scenes return; } - if ((taskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0) + TaskInventoryItem item = part.Inventory.GetInventoryItem(itemId); + if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) { // If the item to be moved is no copy, we need to be able to // edit the prim. - if (!Permissions.CanEditObjectInventory(partUUID, remoteClient.AgentId)) + if (!Permissions.CanEditObjectInventory(part.UUID, remoteClient.AgentId)) return; } else { // If the item is copiable, then we just need to have perms // on it. The delete check is a pure rights check - if (!Permissions.CanDeleteObject(partUUID, remoteClient.AgentId)) + if (!Permissions.CanDeleteObject(part.UUID, remoteClient.AgentId)) return; } -- cgit v1.1 From 5397a6d4c626818af9aed1e2e0dedd430fb4b948 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 21 Feb 2012 22:54:30 +0000 Subject: Fix problem with dragging child part inventory item to user inventory. This fixes the problem by fixing the permissions module to look at root part permissions rather than having to do this for every caller. Resolves http://opensimulator.org/mantis/view.php?id=5569 --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 6cc78b8..83e3a45 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1146,17 +1146,7 @@ namespace OpenSim.Region.Framework.Scenes TaskInventoryItem taskItem = part.Inventory.GetInventoryItem(itemId); - if (null == taskItem) - { - m_log.WarnFormat("[PRIM INVENTORY]: Move of inventory item {0} from prim with local id {1} failed" - + " because the inventory item could not be found", - itemId, primLocalId); - - return; - } - - TaskInventoryItem item = part.Inventory.GetInventoryItem(itemId); - if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) + if ((taskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0) { // If the item to be moved is no copy, we need to be able to // edit the prim. -- cgit v1.1 From cf9b3e7708f0cf58c94fcfd76974733c37ac0d1c Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 21 Feb 2012 23:41:48 +0000 Subject: Restore the taskItem null check that I accidentally blatted in 5397a6d This is a valid check because the caller could supply an invalid uuid. --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 83e3a45..23f39a8 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1146,6 +1146,15 @@ namespace OpenSim.Region.Framework.Scenes TaskInventoryItem taskItem = part.Inventory.GetInventoryItem(itemId); + if (null == taskItem) + { + m_log.WarnFormat("[PRIM INVENTORY]: Move of inventory item {0} from prim with local id {1} failed" + + " because the inventory item could not be found", + itemId, primLocalId); + + return; + } + if ((taskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0) { // If the item to be moved is no copy, we need to be able to -- cgit v1.1 From 5d312671855bf5fda2ae5960fdcd19f1d9f1d1cb Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 22 Feb 2012 00:55:16 +0000 Subject: Remove two spurious m_sceneGraph != null checks in Scene.cs. It's set in constructor and never subsequent set to null. --- OpenSim/Region/Framework/Scenes/Scene.cs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index e7f835c..ec32701 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4257,10 +4257,7 @@ namespace OpenSim.Region.Framework.Scenes /// public void ForEachRootScenePresence(Action action) { - if (m_sceneGraph != null) - { - m_sceneGraph.ForEachAvatar(action); - } + m_sceneGraph.ForEachAvatar(action); } /// @@ -4269,10 +4266,7 @@ namespace OpenSim.Region.Framework.Scenes /// public void ForEachScenePresence(Action action) { - if (m_sceneGraph != null) - { - m_sceneGraph.ForEachScenePresence(action); - } + m_sceneGraph.ForEachScenePresence(action); } /// -- cgit v1.1 From 1dfc9902649bfb4f02340644a0589fe139a3322a Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 23 Feb 2012 01:40:30 +0000 Subject: Add a position parameter to region crossing of objects. This avoids the potential bad update that places an object at the opposite side of the origin sim for a moment before actually crossing it. Especially important in grids like OSG where lag between sims is high. --- OpenSim/Region/Framework/Scenes/Scene.cs | 5 ++++- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index e7f835c..7b79732 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2317,7 +2317,7 @@ namespace OpenSim.Region.Framework.Scenes /// /// /// - public bool IncomingCreateObject(ISceneObject sog) + public bool IncomingCreateObject(Vector3 newPosition, ISceneObject sog) { //m_log.DebugFormat(" >>> IncomingCreateObject(sog) <<< {0} deleted? {1} isAttach? {2}", ((SceneObjectGroup)sog).AbsolutePosition, // ((SceneObjectGroup)sog).IsDeleted, ((SceneObjectGroup)sog).RootPart.IsAttachment); @@ -2333,6 +2333,9 @@ namespace OpenSim.Region.Framework.Scenes return false; } + if (newPosition != Vector3.Zero) + newObject.RootPart.GroupPosition = newPosition; + if (!AddSceneObject(newObject)) { m_log.DebugFormat("[SCENE]: Problem adding scene object {0} in {1} ", sog.UUID, RegionInfo.RegionName); diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index daf711c..9cfdf9f 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3223,7 +3223,7 @@ namespace OpenSim.Region.Framework.Scenes ((SceneObjectGroup)so).LocalId = 0; ((SceneObjectGroup)so).RootPart.ClearUpdateSchedule(); so.SetState(cAgent.AttachmentObjectStates[i++], m_scene); - m_scene.IncomingCreateObject(so); + m_scene.IncomingCreateObject(Vector3.Zero, so); } } } -- cgit v1.1 From 90ea00a1098c918d5eb5a2be2793b109c6622a35 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 23 Feb 2012 22:56:42 +0000 Subject: Try to resolve some problems with viewers crashing after hitting parcel banlines or freezing on the banline. This involves 1) On forcible teleport, call m_scene.RequestTeleportLocation() rather than ScenePresence.Teleport() - only EntityTransferModule now should call SP.Teleport() 2) When avatar is being forcibly moved due to banlines, use a 'stop movement' tolerance of 0.2 to requested position rather than 1 This prevents the avatar sometimes being stuck to banlines until they teleport somewhere else. This aims to fix some problems in http://opensimulator.org/mantis/view.php?id=5822 --- OpenSim/Region/Framework/Scenes/Scene.cs | 17 ++++++++++++----- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 13 ++++++++----- 2 files changed, 20 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 6187803..cf6e6af 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4699,7 +4699,10 @@ namespace OpenSim.Region.Framework.Scenes Vector3? nearestPoint = GetNearestPointInParcelAlongDirectionFromPoint(avatar.AbsolutePosition, dir, nearestParcel); if (nearestPoint != null) { - Debug.WriteLine("Found a sane previous position based on velocity, sending them to: " + nearestPoint.ToString()); +// m_log.DebugFormat( +// "[SCENE]: Found a sane previous position based on velocity for {0}, sending them to {1} in {2}", +// avatar.Name, nearestPoint, nearestParcel.LandData.Name); + return nearestPoint.Value; } @@ -4709,12 +4712,16 @@ namespace OpenSim.Region.Framework.Scenes nearestPoint = GetNearestPointInParcelAlongDirectionFromPoint(avatar.AbsolutePosition, dir, nearestParcel); if (nearestPoint != null) { - Debug.WriteLine("They had a zero velocity, sending them to: " + nearestPoint.ToString()); +// m_log.DebugFormat( +// "[SCENE]: {0} had a zero velocity, sending them to {1}", avatar.Name, nearestPoint); + return nearestPoint.Value; } - //Ultimate backup if we have no idea where they are - Debug.WriteLine("Have no idea where they are, sending them to: " + avatar.lastKnownAllowedPosition.ToString()); + //Ultimate backup if we have no idea where they are +// m_log.DebugFormat( +// "[SCENE]: No idea where {0} is, sending them to {1}", avatar.Name, avatar.lastKnownAllowedPosition); + return avatar.lastKnownAllowedPosition; } @@ -5120,7 +5127,7 @@ namespace OpenSim.Region.Framework.Scenes // presence.Name, presence.AbsolutePosition, presence.MoveToPositionTarget); Vector3 agent_control_v3 = new Vector3(); - presence.HandleMoveToTargetUpdate(ref agent_control_v3); + presence.HandleMoveToTargetUpdate(1, ref agent_control_v3); presence.AddNewMovement(agent_control_v3); } } diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 9cfdf9f..40c8d06 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1048,7 +1048,7 @@ namespace OpenSim.Region.Framework.Scenes } /// - /// + /// Do not call this directly. Call Scene.RequestTeleportLocation() instead. /// /// public void Teleport(Vector3 pos) @@ -1522,7 +1522,10 @@ namespace OpenSim.Region.Framework.Scenes } else if (bAllowUpdateMoveToPosition) { - if (HandleMoveToTargetUpdate(ref agent_control_v3)) + // The UseClientAgentPosition is set if parcel ban is forcing the avatar to move to a + // certain position. It's only check for tolerance on returning to that position is 0.2 + // rather than 1, at which point it removes its force target. + if (HandleMoveToTargetUpdate(agentData.UseClientAgentPosition ? 0.2 : 1, ref agent_control_v3)) update_movementflag = true; } } @@ -1584,7 +1587,7 @@ namespace OpenSim.Region.Framework.Scenes /// /// Cumulative agent movement that this method will update. /// True if movement has been updated in some way. False otherwise. - public bool HandleMoveToTargetUpdate(ref Vector3 agent_control_v3) + public bool HandleMoveToTargetUpdate(double tolerance, ref Vector3 agent_control_v3) { // m_log.DebugFormat("[SCENE PRESENCE]: Called HandleMoveToTargetUpdate() for {0}", Name); @@ -1601,7 +1604,7 @@ namespace OpenSim.Region.Framework.Scenes // Name, AbsolutePosition, MoveToPositionTarget, distanceToTarget); // Check the error term of the current position in relation to the target position - if (distanceToTarget <= 1) + if (distanceToTarget <= tolerance) { // We are close enough to the target AbsolutePosition = MoveToPositionTarget; @@ -1777,7 +1780,7 @@ namespace OpenSim.Region.Framework.Scenes // m_log.DebugFormat("[SCENE PRESENCE]: Body rot for {0} set to {1}", Name, Rotation); Vector3 agent_control_v3 = new Vector3(); - HandleMoveToTargetUpdate(ref agent_control_v3); + HandleMoveToTargetUpdate(1, ref agent_control_v3); AddNewMovement(agent_control_v3); } -- cgit v1.1 From f67f37074f3f7e0602b66aa66a044dd9fd107f6a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 24 Feb 2012 05:02:33 +0000 Subject: Stop spurious scene loop startup timeout alarms for scenes with many prims. On the first frame, all startup scene objects are added to the physics scene. This can cause a considerable delay, so we don't start raising the alarm on scene loop timeouts until the second frame. This commit also slightly changes the behaviour of timeout reporting. Previously, a report was made for the very first timed out thread, ignoring all others until the next watchdog check. Instead, we now report every timed out thread, though we still only do this once no matter how long the timeout. --- OpenSim/Region/Framework/Scenes/Scene.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index cf6e6af..19d4bad 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1140,7 +1140,7 @@ namespace OpenSim.Region.Framework.Scenes HeartbeatThread = Watchdog.StartThread( - Heartbeat, string.Format("Heartbeat ({0})", RegionInfo.RegionName), ThreadPriority.Normal, false); + Heartbeat, string.Format("Heartbeat ({0})", RegionInfo.RegionName), ThreadPriority.Normal, false, false); } /// @@ -1178,6 +1178,13 @@ namespace OpenSim.Region.Framework.Scenes try { m_eventManager.TriggerOnRegionStarted(this); + + // The first frame can take a very long time due to physics actors being added on startup. Therefore, + // don't turn on the watchdog alarm for this thread until the second frame, in order to prevent false + // alarms for scenes with many objects. + Update(); + Watchdog.GetCurrentThreadInfo().AlarmIfTimeout = true; + while (!shuttingdown) Update(); @@ -1206,7 +1213,7 @@ namespace OpenSim.Region.Framework.Scenes ++Frame; -// m_log.DebugFormat("[SCENE]: Processing frame {0}", Frame); +// m_log.DebugFormat("[SCENE]: Processing frame {0} in {1}", Frame, RegionInfo.RegionName); try { @@ -1418,7 +1425,6 @@ namespace OpenSim.Region.Framework.Scenes entry.checkAtTargets(); } - /// /// Send out simstats data to all clients /// -- cgit v1.1 From 84735b644cbd8902dd749fadb4056d26044fd564 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 24 Feb 2012 05:12:56 +0000 Subject: Get rid of some of the identical exception catching in Scene.Update(). --- OpenSim/Region/Framework/Scenes/Scene.cs | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 19d4bad..9bca654 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1368,26 +1368,10 @@ namespace OpenSim.Region.Framework.Scenes { throw; } - catch (AccessViolationException e) - { - m_log.ErrorFormat( - "[REGION]: Failed on region {0} with exception {1}{2}", - RegionInfo.RegionName, e.Message, e.StackTrace); - } - //catch (NullReferenceException e) - //{ - // m_log.Error("[REGION]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); - //} - catch (InvalidOperationException e) - { - m_log.ErrorFormat( - "[REGION]: Failed on region {0} with exception {1}{2}", - RegionInfo.RegionName, e.Message, e.StackTrace); - } catch (Exception e) { m_log.ErrorFormat( - "[REGION]: Failed on region {0} with exception {1}{2}", + "[SCENE]: Failed on region {0} with exception {1}{2}", RegionInfo.RegionName, e.Message, e.StackTrace); } -- cgit v1.1 From bafef292f4d41df14a1edeafc7ba5f9d623d7822 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 24 Feb 2012 05:25:18 +0000 Subject: Take watchdog alarm calling back outside the m_threads lock. This is how it was originally. This stops a very long running alarm callback from causing a problem. --- OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 19c9745..4d98f00 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs @@ -156,8 +156,8 @@ namespace OpenSim.Region.Framework.Scenes // that the region position is cached or performance will degrade Utils.LongToUInts(regionHandle, out x, out y); GridRegion dest = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y); - bool v = true; - if (! simulatorList.Contains(dest.ServerURI)) +// bool v = true; + if (!simulatorList.Contains(dest.ServerURI)) { // we havent seen this simulator before, add it to the list // and send it an update -- cgit v1.1