diff options
author | Charles Krinke | 2009-02-22 20:52:55 +0000 |
---|---|---|
committer | Charles Krinke | 2009-02-22 20:52:55 +0000 |
commit | 8f55b9d735fbc975ce7a4b54e972c17ffbfb1f49 (patch) | |
tree | 96a24a49de82056060dd9b7bab0cb209d5f1a129 /OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs | |
parent | Allow delivery of object messages gridwide (diff) | |
download | opensim-SC-8f55b9d735fbc975ce7a4b54e972c17ffbfb1f49.zip opensim-SC-8f55b9d735fbc975ce7a4b54e972c17ffbfb1f49.tar.gz opensim-SC-8f55b9d735fbc975ce7a4b54e972c17ffbfb1f49.tar.bz2 opensim-SC-8f55b9d735fbc975ce7a4b54e972c17ffbfb1f49.tar.xz |
Mantis#3218. Thank you kindly, TLaukkan (Tommil) for a patch that:
* Added log4net dependency to physxplugin in prebuild.xml.
* Added missing m_log fields to classes.
* Replaced Console.WriteLine with appropriate m_log.Xxxx
* Tested that nant test target runs succesfully.
* Tested that local opensim sandbox starts up without errors.
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs b/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs index 23ed798..0fb27d4 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs | |||
@@ -32,6 +32,8 @@ using OpenMetaverse; | |||
32 | using OpenMetaverse.Imaging; | 32 | using OpenMetaverse.Imaging; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Region.Framework.Interfaces; | 34 | using OpenSim.Region.Framework.Interfaces; |
35 | using log4net; | ||
36 | using System.Reflection; | ||
35 | 37 | ||
36 | namespace OpenSim.Region.ClientStack.LindenUDP | 38 | namespace OpenSim.Region.ClientStack.LindenUDP |
37 | { | 39 | { |
@@ -41,6 +43,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
41 | /// </summary> | 43 | /// </summary> |
42 | public class LLImageManager | 44 | public class LLImageManager |
43 | { | 45 | { |
46 | |||
44 | /// <summary> | 47 | /// <summary> |
45 | /// Priority Queue for images. Contains lots of data | 48 | /// Priority Queue for images. Contains lots of data |
46 | /// </summary> | 49 | /// </summary> |
@@ -114,7 +117,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
114 | if (m_shuttingdown) | 117 | if (m_shuttingdown) |
115 | return; | 118 | return; |
116 | 119 | ||
117 | //Console.WriteLine("AssetCallback for assetId" + assetID); | 120 | //m_log.Debug("AssetCallback for assetId" + assetID); |
118 | 121 | ||
119 | if (asset == null || asset.Data == null) | 122 | if (asset == null || asset.Data == null) |
120 | { | 123 | { |
@@ -249,7 +252,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
249 | } | 252 | } |
250 | 253 | ||
251 | // uncomment the following line to see the upper most asset and the priority | 254 | // uncomment the following line to see the upper most asset and the priority |
252 | //Console.WriteLine(process.ToString()); | 255 | //m_log.Debug(process.ToString()); |
253 | 256 | ||
254 | // Lower priority to give the next image a chance to bubble up | 257 | // Lower priority to give the next image a chance to bubble up |
255 | pq[h] -= 50000; | 258 | pq[h] -= 50000; |
@@ -359,6 +362,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
359 | /// </summary> | 362 | /// </summary> |
360 | public class J2KImage | 363 | public class J2KImage |
361 | { | 364 | { |
365 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
362 | private AssetBase m_asset_ref = null; | 366 | private AssetBase m_asset_ref = null; |
363 | public volatile int LastPacketNum = 0; | 367 | public volatile int LastPacketNum = 0; |
364 | public volatile int DiscardLimit = 0; | 368 | public volatile int DiscardLimit = 0; |
@@ -550,7 +554,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
550 | try { Buffer.BlockCopy(m_asset_ref.Data, 0, firstImageData, 0, FIRST_IMAGE_PACKET_SIZE); } | 554 | try { Buffer.BlockCopy(m_asset_ref.Data, 0, firstImageData, 0, FIRST_IMAGE_PACKET_SIZE); } |
551 | catch (Exception) | 555 | catch (Exception) |
552 | { | 556 | { |
553 | Console.WriteLine(String.Format("Err: srcLen:{0}, BytePos:{1}, desLen:{2}, pktsize{3}", m_asset_ref.Data.Length, CurrentBytePosition(), firstImageData.Length, FIRST_IMAGE_PACKET_SIZE)); | 557 | m_log.Error(String.Format("Err: srcLen:{0}, BytePos:{1}, desLen:{2}, pktsize{3}", m_asset_ref.Data.Length, CurrentBytePosition(), firstImageData.Length, FIRST_IMAGE_PACKET_SIZE)); |
554 | 558 | ||
555 | //m_log.Error("Texture data copy failed on first packet for " + m_asset_ref.FullID.ToString()); | 559 | //m_log.Error("Texture data copy failed on first packet for " + m_asset_ref.FullID.ToString()); |
556 | //m_cancel = true; | 560 | //m_cancel = true; |
@@ -569,8 +573,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
569 | //if (imagePacketSize > 0) | 573 | //if (imagePacketSize > 0) |
570 | // imagePacketSize = IMAGE_PACKET_SIZE; | 574 | // imagePacketSize = IMAGE_PACKET_SIZE; |
571 | //if (imagePacketSize != 1000) | 575 | //if (imagePacketSize != 1000) |
572 | // Console.WriteLine("ENdPacket"); | 576 | // m_log.Debug("ENdPacket"); |
573 | //Console.WriteLine(String.Format("srcLen:{0}, BytePos:{1}, desLen:{2}, pktsize{3}", m_asset_ref.Data.Length, CurrentBytePosition(),0, imagePacketSize)); | 577 | //m_log.Debug(String.Format("srcLen:{0}, BytePos:{1}, desLen:{2}, pktsize{3}", m_asset_ref.Data.Length, CurrentBytePosition(),0, imagePacketSize)); |
574 | 578 | ||
575 | bool atEnd = false; | 579 | bool atEnd = false; |
576 | 580 | ||
@@ -591,9 +595,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
591 | try { Buffer.BlockCopy(m_asset_ref.Data, CurrentBytePosition(), imageData, 0, imagePacketSize); } | 595 | try { Buffer.BlockCopy(m_asset_ref.Data, CurrentBytePosition(), imageData, 0, imagePacketSize); } |
592 | catch (Exception e) | 596 | catch (Exception e) |
593 | { | 597 | { |
594 | Console.WriteLine(String.Format("Err: srcLen:{0}, BytePos:{1}, desLen:{2}, pktsize:{3}, currpak:{4}, stoppak:{5}, totalpak:{6}", m_asset_ref.Data.Length, CurrentBytePosition(), | 598 | m_log.Error(String.Format("Err: srcLen:{0}, BytePos:{1}, desLen:{2}, pktsize:{3}, currpak:{4}, stoppak:{5}, totalpak:{6}", m_asset_ref.Data.Length, CurrentBytePosition(), |
595 | imageData.Length, imagePacketSize, CurrentPacket, StopPacket, TexturePacketCount())); | 599 | imageData.Length, imagePacketSize, CurrentPacket, StopPacket, TexturePacketCount())); |
596 | Console.WriteLine(e.ToString()); | 600 | m_log.Error(e.ToString()); |
597 | //m_log.Error("Texture data copy failed for " + m_asset_ref.FullID.ToString()); | 601 | //m_log.Error("Texture data copy failed for " + m_asset_ref.FullID.ToString()); |
598 | //m_cancel = true; | 602 | //m_cancel = true; |
599 | //m_sending = false; | 603 | //m_sending = false; |