aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs50
-rw-r--r--OpenSim/Region/ClientStack/RegionApplicationBase.cs6
2 files changed, 46 insertions, 10 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 8cd47fb..0762ed0 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>();
@@ -1474,7 +1492,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1474 kill.ObjectData[0].ID = localID; 1492 kill.ObjectData[0].ID = localID;
1475 kill.Header.Reliable = true; 1493 kill.Header.Reliable = true;
1476 kill.Header.Zerocoded = true; 1494 kill.Header.Zerocoded = true;
1477 OutPacket(kill, ThrottleOutPacketType.State); 1495
1496 lock (m_primFullUpdates.SyncRoot)
1497 {
1498 m_killRecord.Add(localID);
1499 OutPacket(kill, ThrottleOutPacketType.State);
1500 }
1478 } 1501 }
1479 1502
1480 /// <summary> 1503 /// <summary>
@@ -3521,21 +3544,34 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3521 if (count == 0) 3544 if (count == 0)
3522 return; 3545 return;
3523 3546
3524 outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[count]; 3547 m_fullUpdateDataBlocksBuilder.Clear();
3548
3525 for (int i = 0; i < count; i++) 3549 for (int i = 0; i < count; i++)
3526 { 3550 {
3527 outPacket.ObjectData[i] = m_primFullUpdates.Dequeue(); 3551 ObjectUpdatePacket.ObjectDataBlock block = m_primFullUpdates.Dequeue();
3528 3552
3553 if (!m_killRecord.Contains(block.ID))
3554 {
3555 m_fullUpdateDataBlocksBuilder.Add(block);
3556
3529// string text = Util.FieldToString(outPacket.ObjectData[i].Text); 3557// string text = Util.FieldToString(outPacket.ObjectData[i].Text);
3530// if (text.IndexOf("\n") >= 0) 3558// if (text.IndexOf("\n") >= 0)
3531// text = text.Remove(text.IndexOf("\n")); 3559// text = text.Remove(text.IndexOf("\n"));
3532// m_log.DebugFormat( 3560// m_log.DebugFormat(
3533// "[CLIENT]: Sending full info about prim {0} text {1} to client {2}", 3561// "[CLIENT]: Sending full info about prim {0} text {1} to client {2}",
3534// outPacket.ObjectData[i].ID, text, Name); 3562// outPacket.ObjectData[i].ID, text, Name);
3563 }
3564// else
3565// {
3566// m_log.WarnFormat(
3567// "[CLIENT]: Preventing full update for {0} after kill to {1}", block.ID, Name);
3568// }
3535 } 3569 }
3536 }
3537 3570
3538 OutPacket(outPacket, ThrottleOutPacketType.State); 3571 outPacket.ObjectData = m_fullUpdateDataBlocksBuilder.ToArray();
3572
3573 OutPacket(outPacket, ThrottleOutPacketType.State);
3574 }
3539 } 3575 }
3540 3576
3541 public void SendPrimTerseUpdate(SendPrimitiveTerseData data) 3577 public void SendPrimTerseUpdate(SendPrimitiveTerseData data)
@@ -5965,7 +6001,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5965 || avSetStartLocationRequestPacket.StartLocationData.LocationPos.Y == 255.5f) 6001 || avSetStartLocationRequestPacket.StartLocationData.LocationPos.Y == 255.5f)
5966 { 6002 {
5967 ScenePresence avatar = null; 6003 ScenePresence avatar = null;
5968 if (((Scene)m_scene).TryGetAvatar(AgentId, out avatar)) 6004 if (((Scene)m_scene).TryGetScenePresence(AgentId, out avatar))
5969 { 6005 {
5970 if (avSetStartLocationRequestPacket.StartLocationData.LocationPos.X == 255.5f) 6006 if (avSetStartLocationRequestPacket.StartLocationData.LocationPos.X == 255.5f)
5971 { 6007 {
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
index 0ec87e5..e683821 100644
--- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs
+++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
@@ -98,10 +98,10 @@ namespace OpenSim.Region.ClientStack
98 98
99 if (m_networkServersInfo.HttpUsesSSL && (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort)) 99 if (m_networkServersInfo.HttpUsesSSL && (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort))
100 { 100 {
101 m_log.Error("[HTTP]: HTTP Server config failed. HTTP Server and HTTPS server must be on different ports"); 101 m_log.Error("[REGION SERVER]: HTTP Server config failed. HTTP Server and HTTPS server must be on different ports");
102 } 102 }
103 103
104 m_log.Info("[REGION]: Starting HTTP server"); 104 m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0}", m_httpServerPort);
105 m_httpServer.Start(); 105 m_httpServer.Start();
106 106
107 MainServer.Instance = m_httpServer; 107 MainServer.Instance = m_httpServer;
@@ -129,4 +129,4 @@ namespace OpenSim.Region.ClientStack
129 return physicsPluginManager.GetPhysicsScene(engine, meshEngine, config, osSceneIdentifier); 129 return physicsPluginManager.GetPhysicsScene(engine, meshEngine, config, osSceneIdentifier);
130 } 130 }
131 } 131 }
132} 132} \ No newline at end of file