diff options
author | UbitUmarov | 2016-08-12 03:58:04 +0100 |
---|---|---|
committer | UbitUmarov | 2016-08-12 03:58:04 +0100 |
commit | c04792142f332b7d1e892eb739b7e0b70b3bd0e7 (patch) | |
tree | 7a6549d3ca27504ca456ff8e2a07e082c5bbc3b8 /OpenSim/Region | |
parent | remove code from httptests branch (diff) | |
download | opensim-SC-c04792142f332b7d1e892eb739b7e0b70b3bd0e7.zip opensim-SC-c04792142f332b7d1e892eb739b7e0b70b3bd0e7.tar.gz opensim-SC-c04792142f332b7d1e892eb739b7e0b70b3bd0e7.tar.bz2 opensim-SC-c04792142f332b7d1e892eb739b7e0b70b3bd0e7.tar.xz |
partially revert commit 42a9afdc43cc.. of 06-12 not allowing more updates to be enqueued on deleted objects. Keep the catch up on deenqueue, so preserving the race condition safe guard. Let Scene sendkillObject work even if object is flaged as deleted. Still not clear how this are related to mantis 7858 or even less to 7990.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 14 | ||||
-rwxr-xr-x | OpenSim/Region/Framework/Scenes/Scene.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 38 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 3 |
4 files changed, 26 insertions, 41 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 6beb9b4..24d92f2 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -4007,7 +4007,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4007 | bool doCulling = m_scene.ObjectsCullingByDistance; | 4007 | bool doCulling = m_scene.ObjectsCullingByDistance; |
4008 | float cullingrange = 64.0f; | 4008 | float cullingrange = 64.0f; |
4009 | HashSet<SceneObjectGroup> GroupsNeedFullUpdate = new HashSet<SceneObjectGroup>(); | 4009 | HashSet<SceneObjectGroup> GroupsNeedFullUpdate = new HashSet<SceneObjectGroup>(); |
4010 | List<SceneObjectGroup> kills = new List<SceneObjectGroup>(); | ||
4011 | // Vector3 mycamera = Vector3.Zero; | 4010 | // Vector3 mycamera = Vector3.Zero; |
4012 | Vector3 mypos = Vector3.Zero; | 4011 | Vector3 mypos = Vector3.Zero; |
4013 | ScenePresence mysp = (ScenePresence)SceneAgent; | 4012 | ScenePresence mysp = (ScenePresence)SceneAgent; |
@@ -4048,7 +4047,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4048 | // Instead send another kill object, because the first one may have gotten | 4047 | // Instead send another kill object, because the first one may have gotten |
4049 | // into a race condition | 4048 | // into a race condition |
4050 | if (!m_killRecord.Contains(grp.LocalId)) | 4049 | if (!m_killRecord.Contains(grp.LocalId)) |
4050 | { | ||
4051 | m_killRecord.Add(grp.LocalId); | 4051 | m_killRecord.Add(grp.LocalId); |
4052 | maxUpdatesBytes -= 30; | ||
4053 | } | ||
4052 | continue; | 4054 | continue; |
4053 | } | 4055 | } |
4054 | 4056 | ||
@@ -4336,16 +4338,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4336 | m_killRecord.Clear(); | 4338 | m_killRecord.Clear(); |
4337 | } | 4339 | } |
4338 | 4340 | ||
4339 | if (kills.Count > 0) | ||
4340 | { | ||
4341 | foreach(SceneObjectGroup grp in kills) | ||
4342 | { | ||
4343 | foreach(SceneObjectPart p in grp.Parts) | ||
4344 | SendEntityUpdate(p,PrimUpdateFlags.Kill); | ||
4345 | } | ||
4346 | kills.Clear(); | ||
4347 | } | ||
4348 | |||
4349 | if(GroupsNeedFullUpdate.Count > 0) | 4341 | if(GroupsNeedFullUpdate.Count > 0) |
4350 | { | 4342 | { |
4351 | foreach(SceneObjectGroup grp in GroupsNeedFullUpdate) | 4343 | foreach(SceneObjectGroup grp in GroupsNeedFullUpdate) |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 33418e6..5d5ea89 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3866,15 +3866,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3866 | foreach (uint localID in localIDs) | 3866 | foreach (uint localID in localIDs) |
3867 | { | 3867 | { |
3868 | SceneObjectPart part = GetSceneObjectPart(localID); | 3868 | SceneObjectPart part = GetSceneObjectPart(localID); |
3869 | if (part != null) // It is a prim | 3869 | if (part != null && part.ParentGroup != null && |
3870 | { | 3870 | part.ParentGroup.RootPart == part) |
3871 | if (part.ParentGroup != null && !part.ParentGroup.IsDeleted) // Valid | 3871 | deleteIDs.Add(localID); |
3872 | { | ||
3873 | if (part.ParentGroup.RootPart != part) // Child part | ||
3874 | continue; | ||
3875 | } | ||
3876 | } | ||
3877 | deleteIDs.Add(localID); | ||
3878 | } | 3872 | } |
3879 | 3873 | ||
3880 | ForEachClient(c => c.SendKillObject(deleteIDs)); | 3874 | ForEachClient(c => c.SendKillObject(deleteIDs)); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index e17ef2b..df6a1cf 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2065,41 +2065,37 @@ namespace OpenSim.Region.Framework.Scenes | |||
2065 | { | 2065 | { |
2066 | // We need to keep track of this state in case this group is still queued for backup. | 2066 | // We need to keep track of this state in case this group is still queued for backup. |
2067 | IsDeleted = true; | 2067 | IsDeleted = true; |
2068 | HasGroupChanged = true; | ||
2069 | 2068 | ||
2070 | DetachFromBackup(); | 2069 | DetachFromBackup(); |
2071 | 2070 | ||
2071 | if(Scene == null) // should not happen unless restart/shutdown ? | ||
2072 | return; | ||
2073 | |||
2072 | SceneObjectPart[] parts = m_parts.GetArray(); | 2074 | SceneObjectPart[] parts = m_parts.GetArray(); |
2073 | for (int i = 0; i < parts.Length; i++) | 2075 | for (int i = 0; i < parts.Length; i++) |
2074 | { | 2076 | { |
2075 | SceneObjectPart part = parts[i]; | 2077 | SceneObjectPart part = parts[i]; |
2076 | 2078 | ||
2077 | if (Scene != null) | 2079 | Scene.ForEachScenePresence(delegate(ScenePresence avatar) |
2078 | { | 2080 | { |
2079 | Scene.ForEachScenePresence(delegate(ScenePresence avatar) | 2081 | if (!avatar.IsChildAgent && avatar.ParentID == LocalId) |
2080 | { | 2082 | avatar.StandUp(); |
2081 | if (!avatar.IsChildAgent && avatar.ParentID == LocalId) | ||
2082 | avatar.StandUp(); | ||
2083 | 2083 | ||
2084 | if (!silent) | 2084 | if (!silent) |
2085 | { | ||
2086 | part.ClearUpdateSchedule(); | ||
2087 | if (part == m_rootPart) | ||
2085 | { | 2088 | { |
2086 | part.ClearUpdateSchedule(); | 2089 | if (!IsAttachment |
2087 | if (part == m_rootPart) | 2090 | || AttachedAvatar == avatar.ControllingClient.AgentId |
2091 | || !HasPrivateAttachmentPoint) | ||
2088 | { | 2092 | { |
2089 | if (!IsAttachment | 2093 | // Send a kill object immediately |
2090 | || AttachedAvatar == avatar.ControllingClient.AgentId | 2094 | avatar.ControllingClient.SendKillObject(new List<uint> { part.LocalId }); |
2091 | || !HasPrivateAttachmentPoint) | ||
2092 | { | ||
2093 | // Send a kill object immediately | ||
2094 | avatar.ControllingClient.SendKillObject(new List<uint> { part.LocalId }); | ||
2095 | // Also, send a terse update; in case race conditions make the object pop again in the client, | ||
2096 | // this update will send another kill object | ||
2097 | m_rootPart.SendTerseUpdateToClient(avatar.ControllingClient); | ||
2098 | } | ||
2099 | } | 2095 | } |
2100 | } | 2096 | } |
2101 | }); | 2097 | } |
2102 | } | 2098 | }); |
2103 | } | 2099 | } |
2104 | } | 2100 | } |
2105 | 2101 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index bc603ae..ca5951c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -5420,6 +5420,9 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
5420 | 5420 | ||
5421 | public void SendTerseUpdateToClient(IClientAPI remoteClient) | 5421 | public void SendTerseUpdateToClient(IClientAPI remoteClient) |
5422 | { | 5422 | { |
5423 | if (ParentGroup.IsDeleted) | ||
5424 | return; | ||
5425 | |||
5423 | if (ParentGroup.IsAttachment | 5426 | if (ParentGroup.IsAttachment |
5424 | && (ParentGroup.RootPart != this | 5427 | && (ParentGroup.RootPart != this |
5425 | || ParentGroup.AttachedAvatar != remoteClient.AgentId && ParentGroup.HasPrivateAttachmentPoint)) | 5428 | || ParentGroup.AttachedAvatar != remoteClient.AgentId && ParentGroup.HasPrivateAttachmentPoint)) |