From 014a86c26b138e4fc861fd30634e866b83dbabdb Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 2 Jan 2012 19:46:30 +0000
Subject: Adding commented out log messages and some minor formatting for
future bug hunting. No functional changes.
---
OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs | 9 ++++++++-
.../Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs | 3 +++
.../ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs | 2 ++
OpenSim/Region/Physics/OdePlugin/OdeScene.cs | 1 +
4 files changed, 14 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs
index 9e0db12..5c4a662 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs
@@ -39,6 +39,9 @@ using log4net;
namespace OpenSim.Region.ClientStack.LindenUDP
{
+ ///
+ /// This class handles UDP texture requests.
+ ///
public class LLImageManager
{
private sealed class J2KImageComparer : IComparer
@@ -228,15 +231,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
image.PriorityQueueHandle = null;
lock (m_syncRoot)
+ {
try { m_priorityQueue.Add(ref image.PriorityQueueHandle, image); }
catch (Exception) { }
+ }
}
void RemoveImageFromQueue(J2KImage image)
{
lock (m_syncRoot)
+ {
try { m_priorityQueue.Delete(image.PriorityQueueHandle); }
catch (Exception) { }
+ }
}
void UpdateImageInQueue(J2KImage image)
@@ -254,4 +261,4 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#endregion Priority Queue Helpers
}
-}
+}
\ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs
index 1386e86..7dd9087 100644
--- a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs
@@ -152,6 +152,9 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
/// JPEG2000 data
private void DoJ2KDecode(UUID assetID, byte[] j2kData)
{
+// m_log.DebugFormat(
+// "[J2KDecoderModule]: Doing J2K decoding of {0} bytes for asset {1}", j2kData.Length, assetID);
+
//int DecodeTime = 0;
//DecodeTime = Environment.TickCount;
OpenJPEG.J2KLayerInfo[] layers;
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs
index cc5d061..2e6ec90 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs
@@ -170,6 +170,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
public AssetBase GetCached(string id)
{
+// m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Cache request for {0}", id);
+
if (m_Cache != null)
return m_Cache.Get(id);
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
index 2194ff0..228eca9 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
@@ -2822,6 +2822,7 @@ namespace OpenSim.Region.Physics.OdePlugin
m_global_contactcount = 0;
d.WorldQuickStep(world, ODE_STEPSIZE);
+
d.JointGroupEmpty(contactgroup);
}
catch (Exception e)
--
cgit v1.1
From fac8c258515c533854549109f14615b8be3ddc15 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 2 Jan 2012 21:31:42 +0000
Subject: Reduce accessibility of some J2KImage/LLImageManager properties and
methods to reduce potential code complexity and make code reading easier.
---
OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs | 16 ++++++++--------
OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs | 8 ++++----
2 files changed, 12 insertions(+), 12 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs b/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs
index 1dea87e..cb9692a 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs
@@ -56,9 +56,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public IAssetService AssetService;
public UUID AgentID;
public IInventoryAccessModule InventoryAccessModule;
- public OpenJPEG.J2KLayerInfo[] Layers;
- public bool IsDecoded;
- public bool HasAsset;
+ private OpenJPEG.J2KLayerInfo[] m_layers;
+ public bool IsDecoded { get; private set; }
+ public bool HasAsset { get; private set; }
public C5.IPriorityQueueHandle PriorityQueueHandle;
private uint m_currentPacket;
@@ -170,14 +170,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (DiscardLevel >= 0 || m_stopPacket == 0)
{
// This shouldn't happen, but if it does, we really can't proceed
- if (Layers == null)
+ if (m_layers == null)
{
m_log.Warn("[J2KIMAGE]: RunUpdate() called with missing Layers. Canceling texture transfer");
m_currentPacket = m_stopPacket;
return;
}
- int maxDiscardLevel = Math.Max(0, Layers.Length - 1);
+ int maxDiscardLevel = Math.Max(0, m_layers.Length - 1);
// Treat initial texture downloads with a DiscardLevel of -1 a request for the highest DiscardLevel
if (DiscardLevel < 0 && m_stopPacket == 0)
@@ -187,9 +187,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
DiscardLevel = (sbyte)Math.Min(DiscardLevel, maxDiscardLevel);
//Calculate the m_stopPacket
- if (Layers.Length > 0)
+ if (m_layers.Length > 0)
{
- m_stopPacket = (uint)GetPacketForBytePosition(Layers[(Layers.Length - 1) - DiscardLevel].End);
+ m_stopPacket = (uint)GetPacketForBytePosition(m_layers[(m_layers.Length - 1) - DiscardLevel].End);
//I don't know why, but the viewer seems to expect the final packet if the file
//is just one packet bigger.
if (TexturePacketCount() == m_stopPacket + 1)
@@ -341,7 +341,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private void J2KDecodedCallback(UUID AssetId, OpenJPEG.J2KLayerInfo[] layers)
{
- Layers = layers;
+ m_layers = layers;
IsDecoded = true;
RunUpdate();
}
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs
index 5c4a662..e3a881f 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs
@@ -211,7 +211,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#region Priority Queue Helpers
- J2KImage GetHighestPriorityImage()
+ private J2KImage GetHighestPriorityImage()
{
J2KImage image = null;
@@ -226,7 +226,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return image;
}
- void AddImageToQueue(J2KImage image)
+ private void AddImageToQueue(J2KImage image)
{
image.PriorityQueueHandle = null;
@@ -237,7 +237,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
}
- void RemoveImageFromQueue(J2KImage image)
+ private void RemoveImageFromQueue(J2KImage image)
{
lock (m_syncRoot)
{
@@ -246,7 +246,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
}
- void UpdateImageInQueue(J2KImage image)
+ private void UpdateImageInQueue(J2KImage image)
{
lock (m_syncRoot)
{
--
cgit v1.1