aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-02-20 20:23:03 +0000
committerJustin Clarke Casey2008-02-20 20:23:03 +0000
commit7d7ad4dff205faf64116defdc25f2d484cd04589 (patch)
treeb7726896da3f01708cb478117b3e908f5d6d269c /OpenSim/Region/Environment/Modules
parentdiv+ (diff)
downloadopensim-SC_OLD-7d7ad4dff205faf64116defdc25f2d484cd04589.zip
opensim-SC_OLD-7d7ad4dff205faf64116defdc25f2d484cd04589.tar.gz
opensim-SC_OLD-7d7ad4dff205faf64116defdc25f2d484cd04589.tar.bz2
opensim-SC_OLD-7d7ad4dff205faf64116defdc25f2d484cd04589.tar.xz
* Only count download requests for assets which are not already waiting for data from the asset server
* This should stop the constant increase in the download requests statistics * If you see stat numbers for download requests which are far from what you'd expect, please report
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r--OpenSim/Region/Environment/Modules/TextureDownloadModule.cs8
-rw-r--r--OpenSim/Region/Environment/Modules/TextureSender.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs19
3 files changed, 15 insertions, 14 deletions
diff --git a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs
index 0473c09..531d4ff 100644
--- a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs
+++ b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs
@@ -13,7 +13,7 @@
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
@@ -161,7 +161,6 @@ namespace OpenSim.Region.Environment.Modules
161 if (TryGetUserTextureService(client.AgentId, out textureService)) 161 if (TryGetUserTextureService(client.AgentId, out textureService))
162 { 162 {
163 textureService.HandleTextureRequest(client, e); 163 textureService.HandleTextureRequest(client, e);
164 m_scene.AddPendingDownloads(1);
165 } 164 }
166 } 165 }
167 166
@@ -208,8 +207,9 @@ namespace OpenSim.Region.Environment.Modules
208 /// <param name="sender"></param> 207 /// <param name="sender"></param>
209 private void TextureSent(TextureSender sender) 208 private void TextureSent(TextureSender sender)
210 { 209 {
211 sender.Sending = false; 210 sender.Sending = false;
212 m_scene.AddPendingDownloads(-1); 211 //m_log.DebugFormat("[TEXTURE DOWNLOAD]: Removing download stat for {0}", sender.assetID);
212 m_scene.AddPendingDownloads(-1);
213 } 213 }
214 } 214 }
215} 215}
diff --git a/OpenSim/Region/Environment/Modules/TextureSender.cs b/OpenSim/Region/Environment/Modules/TextureSender.cs
index f2b3173..056b8e1 100644
--- a/OpenSim/Region/Environment/Modules/TextureSender.cs
+++ b/OpenSim/Region/Environment/Modules/TextureSender.cs
@@ -53,6 +53,8 @@ namespace OpenSim.Region.Environment.Modules
53 /// </summary> 53 /// </summary>
54 private AssetBase m_asset; 54 private AssetBase m_asset;
55 55
56 //public LLUUID assetID { get { return m_asset.FullID; } }
57
56 /// <summary> 58 /// <summary>
57 /// This is actually the number of extra packets required to send the texture data! We always assume 59 /// This is actually the number of extra packets required to send the texture data! We always assume
58 /// at least one is required. 60 /// at least one is required.
diff --git a/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs b/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs
index 2f08bd6..bd5ee0b5 100644
--- a/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs
+++ b/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs
@@ -42,8 +42,8 @@ namespace OpenSim.Region.Environment.Modules
42 /// </summary> 42 /// </summary>
43 public class UserTextureDownloadService 43 public class UserTextureDownloadService
44 { 44 {
45 //private static readonly log4net.ILog m_log 45 private static readonly log4net.ILog m_log
46 // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 46 = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
47 47
48 /// <summary> 48 /// <summary>
49 /// Holds texture senders before they have received the appropriate texture from the asset cache. 49 /// Holds texture senders before they have received the appropriate texture from the asset cache.
@@ -81,16 +81,15 @@ namespace OpenSim.Region.Environment.Modules
81 { 81 {
82 if (m_textureSenders.TryGetValue(e.RequestedAssetID, out textureSender)) 82 if (m_textureSenders.TryGetValue(e.RequestedAssetID, out textureSender))
83 { 83 {
84 textureSender.UpdateRequest(e.DiscardLevel, e.PacketNumber); 84 // If we've received new non UUID information for this request and it hasn't dispatched
85 85 // yet, then update the request accordingly.
86 if ((textureSender.ImageLoaded) && 86 textureSender.UpdateRequest(e.DiscardLevel, e.PacketNumber);
87 (textureSender.Sending == false))
88 {
89 EnqueueTextureSender(textureSender);
90 }
91 } 87 }
92 else 88 else
93 { 89 {
90 //m_log.DebugFormat("[USER TEXTURE DOWNLOAD]: Adding download stat {0}", e.RequestedAssetID);
91 m_scene.AddPendingDownloads(1);
92
94 TextureSender requestHandler = 93 TextureSender requestHandler =
95 new TextureSender(client, e.DiscardLevel, e.PacketNumber); 94 new TextureSender(client, e.DiscardLevel, e.PacketNumber);
96 m_textureSenders.Add(e.RequestedAssetID, requestHandler); 95 m_textureSenders.Add(e.RequestedAssetID, requestHandler);
@@ -141,7 +140,7 @@ namespace OpenSim.Region.Environment.Modules
141 // TODO Send packet back to the client telling it not to expect the texture 140 // TODO Send packet back to the client telling it not to expect the texture
142 // The absence of this packet doesn't appear to be causing it a problem right now 141 // The absence of this packet doesn't appear to be causing it a problem right now
143 142
144 //m_log.InfoFormat("Removing {0} from pending downloads count", textureID); 143 //m_log.DebugFormat("[USER TEXTURE DOWNLOAD]: Removing download stat for {0}", textureID);
145 m_scene.AddPendingDownloads(-1); 144 m_scene.AddPendingDownloads(-1);
146 } 145 }
147 146