From 78c04d61caed7dc62eb299a09148934d95a1c882 Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Tue, 12 Apr 2011 15:40:57 -0700 Subject: Fixed the update of items in the priority queue to enable both types of property updates to be specified. Not sure if one form of property update should supercede another. But for now the old OpenSim behavior is preserved by sending both. --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 21 +++++++++++++++------ .../Region/ClientStack/LindenUDP/PriorityQueue.cs | 2 +- 2 files changed, 16 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 4db5b22..92a76ac 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -4032,26 +4032,34 @@ namespace OpenSim.Region.ClientStack.LindenUDP private class ObjectPropertyUpdate : IEntityUpdate { internal bool SendFamilyProps; + internal bool SendObjectProps; - public ObjectPropertyUpdate(ISceneEntity entity, uint flags, bool sendfam) + public ObjectPropertyUpdate(ISceneEntity entity, uint flags, bool sendfam, bool sendobj) : base(entity,flags) { SendFamilyProps = sendfam; + SendObjectProps = sendobj; + } + public void Update(ObjectPropertyUpdate update) + { + SendFamilyProps = SendFamilyProps || update.SendFamilyProps; + SendObjectProps = SendObjectProps || update.SendObjectProps; + Flags |= update.Flags; } } public void SendObjectPropertiesFamilyData(ISceneEntity entity, uint requestFlags) { - uint priority = m_prioritizer.GetUpdatePriority(this, entity); + uint priority = 0; // time based ordering only lock (m_entityProps.SyncRoot) - m_entityProps.Enqueue(priority, new ObjectPropertyUpdate(entity,requestFlags,true)); + m_entityProps.Enqueue(priority, new ObjectPropertyUpdate(entity,requestFlags,true,false)); } public void SendObjectPropertiesReply(ISceneEntity entity) { - uint priority = m_prioritizer.GetUpdatePriority(this, entity); + uint priority = 0; // time based ordering only lock (m_entityProps.SyncRoot) - m_entityProps.Enqueue(priority, new ObjectPropertyUpdate(entity,0,false)); + m_entityProps.Enqueue(priority, new ObjectPropertyUpdate(entity,0,false,true)); } private void ProcessEntityPropertyRequests(int maxUpdates) @@ -4082,7 +4090,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP objectFamilyBlocks.Value.Add(objPropDB); } } - else + + if (update.SendObjectProps) { if (update.Entity is SceneObjectPart) { diff --git a/OpenSim/Region/ClientStack/LindenUDP/PriorityQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/PriorityQueue.cs index 6521a00..b62ec07 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/PriorityQueue.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/PriorityQueue.cs @@ -87,7 +87,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (m_lookupTable.TryGetValue(localid, out lookup)) { entry = lookup.Heap[lookup.Handle].EntryOrder; - value.Flags |= lookup.Heap[lookup.Handle].Value.Flags; + value.Update(lookup.Heap[lookup.Handle].Value); lookup.Heap.Remove(lookup.Handle); } -- cgit v1.1