aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-03-30 17:04:26 +0100
committerJustin Clark-Casey (justincc)2010-05-20 23:32:11 +0100
commit8b5d0122007b2a78544b742c35c628c35cdea552 (patch)
treeb0865aff15483c1c880ffad5d24390f44c3a5fe5 /OpenSim/Region
parentminor: Print out port that http servers are using (diff)
downloadopensim-SC-8b5d0122007b2a78544b742c35c628c35cdea552.zip
opensim-SC-8b5d0122007b2a78544b742c35c628c35cdea552.tar.gz
opensim-SC-8b5d0122007b2a78544b742c35c628c35cdea552.tar.bz2
opensim-SC-8b5d0122007b2a78544b742c35c628c35cdea552.tar.xz
Completely prevent full update packets being sent after kill object packets
If a full update is sent after the kill, the object remains as in the linden viewer but in an undeletable and unowned state until relog This patch prevents this by recording kills in LLClientView
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs51
1 files changed, 46 insertions, 5 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 2ab713d..eda9caa 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -40,7 +40,10 @@ using OpenMetaverse.Packets;
40using OpenMetaverse.StructuredData; 40using OpenMetaverse.StructuredData;
41using OpenSim.Framework; 41using OpenSim.Framework;
42using OpenSim.Framework.Client; 42using OpenSim.Framework.Client;
43<<<<<<< HEAD:OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
43using OpenSim.Framework.Communications.Cache; 44using OpenSim.Framework.Communications.Cache;
45=======
46>>>>>>> 696d711... Completely prevent full update packets being sent after kill object packets:OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
44using OpenSim.Framework.Statistics; 47using OpenSim.Framework.Statistics;
45using OpenSim.Region.Framework.Interfaces; 48using OpenSim.Region.Framework.Interfaces;
46using OpenSim.Region.Framework.Scenes; 49using OpenSim.Region.Framework.Scenes;
@@ -348,6 +351,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP
348 protected PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_avatarTerseUpdates; 351 protected PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_avatarTerseUpdates;
349 private PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_primTerseUpdates; 352 private PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_primTerseUpdates;
350 private PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock> m_primFullUpdates; 353 private PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock> m_primFullUpdates;
354
355 /// <value>
356 /// List used in construction of data blocks for an object update packet. This is to stop us having to
357 /// continually recreate it.
358 /// </value>
359 protected List<ObjectUpdatePacket.ObjectDataBlock> m_fullUpdateDataBlocksBuilder;
360
361 /// <value>
362 /// Maintain a record of all the objects killed. This allows us to stop an update being sent from the
363 /// thread servicing the m_primFullUpdates queue after a kill. If this happens the object persists as an
364 /// ownerless phantom.
365 ///
366 /// All manipulation of this set has to occur under a m_primFullUpdate.SyncRoot lock
367 ///
368 /// </value>
369 protected HashSet<uint> m_killRecord;
370
351 private int m_moneyBalance; 371 private int m_moneyBalance;
352 private int m_animationSequenceNumber = 1; 372 private int m_animationSequenceNumber = 1;
353 private bool m_SendLogoutPacketWhenClosing = true; 373 private bool m_SendLogoutPacketWhenClosing = true;
@@ -437,6 +457,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
437 m_avatarTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(); 457 m_avatarTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>();
438 m_primTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(); 458 m_primTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>();
439 m_primFullUpdates = new PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock>(m_scene.Entities.Count); 459 m_primFullUpdates = new PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock>(m_scene.Entities.Count);
460 m_fullUpdateDataBlocksBuilder = new List<ObjectUpdatePacket.ObjectDataBlock>();
461 m_killRecord = new HashSet<uint>();
440 462
441 m_assetService = m_scene.RequestModuleInterface<IAssetService>(); 463 m_assetService = m_scene.RequestModuleInterface<IAssetService>();
442 m_hyperAssets = m_scene.RequestModuleInterface<IHyperAssetService>(); 464 m_hyperAssets = m_scene.RequestModuleInterface<IHyperAssetService>();
@@ -1476,7 +1498,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1476 kill.ObjectData[0].ID = localID; 1498 kill.ObjectData[0].ID = localID;
1477 kill.Header.Reliable = true; 1499 kill.Header.Reliable = true;
1478 kill.Header.Zerocoded = true; 1500 kill.Header.Zerocoded = true;
1479 OutPacket(kill, ThrottleOutPacketType.State); 1501
1502 lock (m_primFullUpdates.SyncRoot)
1503 {
1504 m_killRecord.Add(localID);
1505 OutPacket(kill, ThrottleOutPacketType.State);
1506 }
1480 } 1507 }
1481 1508
1482 /// <summary> 1509 /// <summary>
@@ -3518,21 +3545,35 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3518 if (count == 0) 3545 if (count == 0)
3519 return; 3546 return;
3520 3547
3521 outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[count]; 3548 m_fullUpdateDataBlocksBuilder.Clear();
3549
3522 for (int i = 0; i < count; i++) 3550 for (int i = 0; i < count; i++)
3523 { 3551 {
3524 outPacket.ObjectData[i] = m_primFullUpdates.Dequeue(); 3552 ObjectUpdatePacket.ObjectDataBlock block = m_primFullUpdates.Dequeue();
3553 //outPacket.ObjectData[i] = m_primFullUpdates.Dequeue();
3525 3554
3555 if (!m_killRecord.Contains(block.ID))
3556 {
3557 m_fullUpdateDataBlocksBuilder.Add(block);
3558
3526// string text = Util.FieldToString(outPacket.ObjectData[i].Text); 3559// string text = Util.FieldToString(outPacket.ObjectData[i].Text);
3527// if (text.IndexOf("\n") >= 0) 3560// if (text.IndexOf("\n") >= 0)
3528// text = text.Remove(text.IndexOf("\n")); 3561// text = text.Remove(text.IndexOf("\n"));
3529// m_log.DebugFormat( 3562// m_log.DebugFormat(
3530// "[CLIENT]: Sending full info about prim {0} text {1} to client {2}", 3563// "[CLIENT]: Sending full info about prim {0} text {1} to client {2}",
3531// outPacket.ObjectData[i].ID, text, Name); 3564// outPacket.ObjectData[i].ID, text, Name);
3565 }
3566// else
3567// {
3568// m_log.WarnFormat(
3569// "[CLIENT]: Preventing full update for {0} after kill to {1}", block.ID, Name);
3570// }
3532 } 3571 }
3533 }
3534 3572
3535 OutPacket(outPacket, ThrottleOutPacketType.State); 3573 outPacket.ObjectData = m_fullUpdateDataBlocksBuilder.ToArray();
3574
3575 OutPacket(outPacket, ThrottleOutPacketType.State);
3576 }
3536 } 3577 }
3537 3578
3538 public void SendPrimTerseUpdate(SendPrimitiveTerseData data) 3579 public void SendPrimTerseUpdate(SendPrimitiveTerseData data)