aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
diff options
context:
space:
mode:
authorJohn Hurliman2010-04-02 13:32:40 -0700
committerJohn Hurliman2010-04-02 13:32:40 -0700
commita895de4414fa3a9439500a2bbbb18d4bc24fa624 (patch)
tree5adccfbbd91fceb4366c82e71a786270a95c1653 /OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
parent* Better logging for Authenticate() failures (diff)
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC_OLD-a895de4414fa3a9439500a2bbbb18d4bc24fa624.zip
opensim-SC_OLD-a895de4414fa3a9439500a2bbbb18d4bc24fa624.tar.gz
opensim-SC_OLD-a895de4414fa3a9439500a2bbbb18d4bc24fa624.tar.bz2
opensim-SC_OLD-a895de4414fa3a9439500a2bbbb18d4bc24fa624.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs55
1 files changed, 46 insertions, 9 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 18d3889..25f6ef0 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -40,7 +40,6 @@ using OpenMetaverse.Packets;
40using OpenMetaverse.StructuredData; 40using OpenMetaverse.StructuredData;
41using OpenSim.Framework; 41using OpenSim.Framework;
42using OpenSim.Framework.Client; 42using OpenSim.Framework.Client;
43
44using OpenSim.Framework.Statistics; 43using OpenSim.Framework.Statistics;
45using OpenSim.Region.Framework.Interfaces; 44using OpenSim.Region.Framework.Interfaces;
46using OpenSim.Region.Framework.Scenes; 45using OpenSim.Region.Framework.Scenes;
@@ -353,6 +352,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP
353 protected PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_avatarTerseUpdates; 352 protected PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_avatarTerseUpdates;
354 private PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_primTerseUpdates; 353 private PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_primTerseUpdates;
355 private PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock> m_primFullUpdates; 354 private PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock> m_primFullUpdates;
355
356 /// <value>
357 /// List used in construction of data blocks for an object update packet. This is to stop us having to
358 /// continually recreate it.
359 /// </value>
360 protected List<ObjectUpdatePacket.ObjectDataBlock> m_fullUpdateDataBlocksBuilder;
361
362 /// <value>
363 /// Maintain a record of all the objects killed. This allows us to stop an update being sent from the
364 /// thread servicing the m_primFullUpdates queue after a kill. If this happens the object persists as an
365 /// ownerless phantom.
366 ///
367 /// All manipulation of this set has to occur under a m_primFullUpdate.SyncRoot lock
368 ///
369 /// </value>
370 protected HashSet<uint> m_killRecord;
371
356 private int m_moneyBalance; 372 private int m_moneyBalance;
357 private int m_animationSequenceNumber = 1; 373 private int m_animationSequenceNumber = 1;
358 private bool m_SendLogoutPacketWhenClosing = true; 374 private bool m_SendLogoutPacketWhenClosing = true;
@@ -449,6 +465,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
449 m_avatarTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(); 465 m_avatarTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>();
450 m_primTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(); 466 m_primTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>();
451 m_primFullUpdates = new PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock>(m_scene.Entities.Count); 467 m_primFullUpdates = new PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock>(m_scene.Entities.Count);
468 m_fullUpdateDataBlocksBuilder = new List<ObjectUpdatePacket.ObjectDataBlock>();
469 m_killRecord = new HashSet<uint>();
452 470
453 m_assetService = m_scene.RequestModuleInterface<IAssetService>(); 471 m_assetService = m_scene.RequestModuleInterface<IAssetService>();
454 m_hyperAssets = m_scene.RequestModuleInterface<IHyperAssetService>(); 472 m_hyperAssets = m_scene.RequestModuleInterface<IHyperAssetService>();
@@ -827,17 +845,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
827 } 845 }
828 } 846 }
829 847
830 public void SendGenericMessage(string method, List<string> message) 848 public void SendGenericMessage(string method, List<byte[]> message)
831 { 849 {
832 GenericMessagePacket gmp = new GenericMessagePacket(); 850 GenericMessagePacket gmp = new GenericMessagePacket();
833 gmp.MethodData.Method = Util.StringToBytes256(method); 851 gmp.MethodData.Method = Util.StringToBytes256(method);
834 gmp.ParamList = new GenericMessagePacket.ParamListBlock[message.Count]; 852 gmp.ParamList = new GenericMessagePacket.ParamListBlock[message.Count];
835 int i = 0; 853 int i = 0;
836 foreach (string val in message) 854 foreach (byte[] val in message)
837 { 855 {
838 gmp.ParamList[i] = new GenericMessagePacket.ParamListBlock(); 856 gmp.ParamList[i] = new GenericMessagePacket.ParamListBlock();
839 gmp.ParamList[i++].Parameter = Util.StringToBytes256(val); 857 gmp.ParamList[i++].Parameter = val;
840 } 858 }
859
841 OutPacket(gmp, ThrottleOutPacketType.Task); 860 OutPacket(gmp, ThrottleOutPacketType.Task);
842 } 861 }
843 862
@@ -1489,7 +1508,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1489 kill.ObjectData[0].ID = localID; 1508 kill.ObjectData[0].ID = localID;
1490 kill.Header.Reliable = true; 1509 kill.Header.Reliable = true;
1491 kill.Header.Zerocoded = true; 1510 kill.Header.Zerocoded = true;
1492 OutPacket(kill, ThrottleOutPacketType.State); 1511
1512 lock (m_primFullUpdates.SyncRoot)
1513 {
1514 m_killRecord.Add(localID);
1515 OutPacket(kill, ThrottleOutPacketType.State);
1516 }
1493 } 1517 }
1494 1518
1495 /// <summary> 1519 /// <summary>
@@ -3538,21 +3562,34 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3538 if (count == 0) 3562 if (count == 0)
3539 return; 3563 return;
3540 3564
3541 outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[count]; 3565 m_fullUpdateDataBlocksBuilder.Clear();
3566
3542 for (int i = 0; i < count; i++) 3567 for (int i = 0; i < count; i++)
3543 { 3568 {
3544 outPacket.ObjectData[i] = m_primFullUpdates.Dequeue(); 3569 ObjectUpdatePacket.ObjectDataBlock block = m_primFullUpdates.Dequeue();
3545 3570
3571 if (!m_killRecord.Contains(block.ID))
3572 {
3573 m_fullUpdateDataBlocksBuilder.Add(block);
3574
3546// string text = Util.FieldToString(outPacket.ObjectData[i].Text); 3575// string text = Util.FieldToString(outPacket.ObjectData[i].Text);
3547// if (text.IndexOf("\n") >= 0) 3576// if (text.IndexOf("\n") >= 0)
3548// text = text.Remove(text.IndexOf("\n")); 3577// text = text.Remove(text.IndexOf("\n"));
3549// m_log.DebugFormat( 3578// m_log.DebugFormat(
3550// "[CLIENT]: Sending full info about prim {0} text {1} to client {2}", 3579// "[CLIENT]: Sending full info about prim {0} text {1} to client {2}",
3551// outPacket.ObjectData[i].ID, text, Name); 3580// outPacket.ObjectData[i].ID, text, Name);
3581 }
3582// else
3583// {
3584// m_log.WarnFormat(
3585// "[CLIENT]: Preventing full update for {0} after kill to {1}", block.ID, Name);
3586// }
3552 } 3587 }
3553 }
3554 3588
3555 OutPacket(outPacket, ThrottleOutPacketType.State); 3589 outPacket.ObjectData = m_fullUpdateDataBlocksBuilder.ToArray();
3590
3591 OutPacket(outPacket, ThrottleOutPacketType.State);
3592 }
3556 } 3593 }
3557 3594
3558 public void SendPrimTerseUpdate(SendPrimitiveTerseData data) 3595 public void SendPrimTerseUpdate(SendPrimitiveTerseData data)