aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorUbitUmarov2016-08-12 03:58:04 +0100
committerUbitUmarov2016-08-12 03:58:04 +0100
commitc04792142f332b7d1e892eb739b7e0b70b3bd0e7 (patch)
tree7a6549d3ca27504ca456ff8e2a07e082c5bbc3b8 /OpenSim/Region/Framework
parent remove code from httptests branch (diff)
downloadopensim-SC_OLD-c04792142f332b7d1e892eb739b7e0b70b3bd0e7.zip
opensim-SC_OLD-c04792142f332b7d1e892eb739b7e0b70b3bd0e7.tar.gz
opensim-SC_OLD-c04792142f332b7d1e892eb739b7e0b70b3bd0e7.tar.bz2
opensim-SC_OLD-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 'OpenSim/Region/Framework')
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs12
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs38
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs3
3 files changed, 23 insertions, 30 deletions
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))