aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
diff options
context:
space:
mode:
authorKitto Flora2010-09-06 21:45:17 +0000
committerKitto Flora2010-09-06 21:45:17 +0000
commitcfaefad754642677dbddfcbe743c3fa5e058785d (patch)
tree48ac26cc5289d8c0459837cd7d6936152216403b /OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
parentFalling animation fix, comment out instrumentation. (diff)
parentFix yet another cause of "Ghost attachments" (diff)
downloadopensim-SC_OLD-cfaefad754642677dbddfcbe743c3fa5e058785d.zip
opensim-SC_OLD-cfaefad754642677dbddfcbe743c3fa5e058785d.tar.gz
opensim-SC_OLD-cfaefad754642677dbddfcbe743c3fa5e058785d.tar.bz2
opensim-SC_OLD-cfaefad754642677dbddfcbe743c3fa5e058785d.tar.xz
Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs65
1 files changed, 46 insertions, 19 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index aa7de05..3dea40c 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -60,7 +60,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
60 public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IClientIPEndpoint, IStatsCollector 60 public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IClientIPEndpoint, IStatsCollector
61 { 61 {
62 /// <value> 62 /// <value>
63 /// Debug packet level. At the moment, only 255 does anything (prints out all in and out packets). 63 /// Debug packet level. See OpenSim.RegisterConsoleCommands() for more details.
64 /// </value> 64 /// </value>
65 protected int m_debugPacketLevel = 0; 65 protected int m_debugPacketLevel = 0;
66 66
@@ -2687,6 +2687,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2687 2687
2688 public void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y) 2688 public void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y)
2689 { 2689 {
2690 float dwell = 0.0f;
2691 IDwellModule dwellModule = m_scene.RequestModuleInterface<IDwellModule>();
2692 if (dwellModule != null)
2693 dwell = dwellModule.GetDwell(land.GlobalID);
2690 ParcelInfoReplyPacket reply = (ParcelInfoReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelInfoReply); 2694 ParcelInfoReplyPacket reply = (ParcelInfoReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelInfoReply);
2691 reply.AgentData.AgentID = m_agentId; 2695 reply.AgentData.AgentID = m_agentId;
2692 reply.Data.ParcelID = parcelID; 2696 reply.Data.ParcelID = parcelID;
@@ -2711,7 +2715,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2711 reply.Data.GlobalZ = pos.Z; 2715 reply.Data.GlobalZ = pos.Z;
2712 reply.Data.SimName = Utils.StringToBytes(info.RegionName); 2716 reply.Data.SimName = Utils.StringToBytes(info.RegionName);
2713 reply.Data.SnapshotID = land.SnapshotID; 2717 reply.Data.SnapshotID = land.SnapshotID;
2714 reply.Data.Dwell = land.Dwell; 2718 reply.Data.Dwell = dwell;
2715 reply.Data.SalePrice = land.SalePrice; 2719 reply.Data.SalePrice = land.SalePrice;
2716 reply.Data.AuctionID = (int)land.AuctionID; 2720 reply.Data.AuctionID = (int)land.AuctionID;
2717 2721
@@ -11229,8 +11233,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11229 /// handles splitting manually</param> 11233 /// handles splitting manually</param>
11230 protected void OutPacket(Packet packet, ThrottleOutPacketType throttlePacketType, bool doAutomaticSplitting) 11234 protected void OutPacket(Packet packet, ThrottleOutPacketType throttlePacketType, bool doAutomaticSplitting)
11231 { 11235 {
11232 if (m_debugPacketLevel >= 255) 11236 if (m_debugPacketLevel > 0)
11233 m_log.DebugFormat("[CLIENT]: Packet OUT {0}", packet.Type); 11237 {
11238 bool outputPacket = true;
11239
11240 if (m_debugPacketLevel <= 255
11241 && (packet.Type == PacketType.SimStats || packet.Type == PacketType.SimulatorViewerTimeMessage))
11242 outputPacket = false;
11243
11244 if (m_debugPacketLevel <= 200
11245 &&
11246 (packet.Type == PacketType.ImagePacket
11247 || packet.Type == PacketType.ImageData
11248 || packet.Type == PacketType.LayerData
11249 || packet.Type == PacketType.CoarseLocationUpdate))
11250 outputPacket = false;
11251
11252 if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.AvatarAnimation || packet.Type == PacketType.ViewerEffect))
11253 outputPacket = false;
11254
11255 if (outputPacket)
11256 m_log.DebugFormat("[CLIENT]: Packet OUT {0}", packet.Type);
11257 }
11234 11258
11235 m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting); 11259 m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting);
11236 } 11260 }
@@ -11316,26 +11340,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11316 /// Entryway from the client to the simulator. All UDP packets from the client will end up here 11340 /// Entryway from the client to the simulator. All UDP packets from the client will end up here
11317 /// </summary> 11341 /// </summary>
11318 /// <param name="Pack">OpenMetaverse.packet</param> 11342 /// <param name="Pack">OpenMetaverse.packet</param>
11319 public void ProcessInPacket(Packet Pack) 11343 public void ProcessInPacket(Packet packet)
11320 { 11344 {
11321 if (!m_IsPresenceReady) 11345 if (m_debugPacketLevel > 0)
11322 { 11346 {
11323 if (m_pendingPackets == null) 11347 bool outputPacket = true;
11324 { 11348
11325 m_pendingPackets = new List<Packet>(); 11349 if (m_debugPacketLevel <= 255 && packet.Type == PacketType.AgentUpdate)
11326 } 11350 outputPacket = false;
11327 m_pendingPackets.Add(Pack); 11351
11352 if (m_debugPacketLevel <= 200 && packet.Type == PacketType.RequestImage)
11353 outputPacket = false;
11354
11355 if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.ViewerEffect || packet.Type == PacketType.AgentAnimation))
11356 outputPacket = false;
11357
11358 if (outputPacket)
11359 m_log.DebugFormat("[CLIENT]: Packet IN {0}", packet.Type);
11328 } 11360 }
11329 else
11330 {
11331 if (m_debugPacketLevel >= 255)
11332 m_log.DebugFormat("[CLIENT]: Packet IN {0}", Pack.Type);
11333 11361
11334 if (!ProcessPacketMethod(Pack)) 11362 if (!ProcessPacketMethod(packet))
11335 m_log.Warn("[CLIENT]: unhandled packet " + Pack.Type); 11363 m_log.Warn("[CLIENT]: unhandled packet " + packet.Type);
11336 11364
11337 PacketPool.Instance.ReturnPacket(Pack); 11365 PacketPool.Instance.ReturnPacket(packet);
11338 }
11339 } 11366 }
11340 11367
11341 private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket) 11368 private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket)