aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-03-22 18:30:54 +0000
committerJustin Clarke Casey2008-03-22 18:30:54 +0000
commit936f961a53aa62b37b28f81430cdde14705eff78 (patch)
treeeac579d4cb9a8db2a542a30f496fd5eb7aec6ee9 /OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs
parent* Minor log message change (diff)
downloadopensim-SC-936f961a53aa62b37b28f81430cdde14705eff78.zip
opensim-SC-936f961a53aa62b37b28f81430cdde14705eff78.tar.gz
opensim-SC-936f961a53aa62b37b28f81430cdde14705eff78.tar.bz2
opensim-SC-936f961a53aa62b37b28f81430cdde14705eff78.tar.xz
* Reducing spam on console so we only notify once if we're dropping repeated requests for missing textures
* Also minor logic change so that we actually do retry missing texture requests (we weren't before)
Diffstat (limited to 'OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs51
1 files changed, 29 insertions, 22 deletions
diff --git a/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs b/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs
index 1b91dd9..6432537 100644
--- a/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs
+++ b/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs
@@ -116,16 +116,19 @@ namespace OpenSim.Region.Environment.Modules
116 // requesting the same textures 116 // requesting the same textures
117 if (missingTextureRequestCounts.ContainsKey(e.RequestedAssetID)) 117 if (missingTextureRequestCounts.ContainsKey(e.RequestedAssetID))
118 { 118 {
119 int requests = missingTextureRequestCounts[e.RequestedAssetID] + 1; 119 missingTextureRequestCounts[e.RequestedAssetID] += 1;
120 120
121 if (requests % 20 == 0) 121 if (missingTextureRequestCounts[e.RequestedAssetID] > MAX_ALLOWED_TEXTURE_REQUESTS)
122 { 122 {
123 m_log.WarnFormat( 123 if (MAX_ALLOWED_TEXTURE_REQUESTS + 1 == missingTextureRequestCounts[e.RequestedAssetID])
124 "[USER TEXTURE DOWNLOAD SERVICE]: Received {0} requests for the already notified missing texture {1} from {2}", 124 {
125 requests, e.RequestedAssetID, m_client.AgentId); 125 m_log.WarnFormat(
126 } 126 "[USER TEXTURE DOWNLOAD SERVICE]: Dropping requests for notified missing texture {0} for {1} since we have received more than {2} requests",
127 127 e.RequestedAssetID, m_client.AgentId, MAX_ALLOWED_TEXTURE_REQUESTS);
128 missingTextureRequestCounts[e.RequestedAssetID] = requests; 128 }
129
130 return;
131 }
129 } 132 }
130 else 133 else
131 { 134 {
@@ -143,21 +146,21 @@ namespace OpenSim.Region.Environment.Modules
143 if (MAX_ALLOWED_TEXTURE_REQUESTS + 1 == dispatchedTextureRequestCounts[e.RequestedAssetID]) 146 if (MAX_ALLOWED_TEXTURE_REQUESTS + 1 == dispatchedTextureRequestCounts[e.RequestedAssetID])
144 { 147 {
145 m_log.WarnFormat( 148 m_log.WarnFormat(
146 "[USER TEXTURE DOWNLOAD SERVICE]: Dropping requests for dispatched texture {0} from {1} since we have received more than {2} requests", 149 "[USER TEXTURE DOWNLOAD SERVICE]: Dropping requests for dispatched texture {0} for {1} since we have received more than {2} requests",
147 e.RequestedAssetID, m_client.AgentId, MAX_ALLOWED_TEXTURE_REQUESTS); 150 e.RequestedAssetID, m_client.AgentId, MAX_ALLOWED_TEXTURE_REQUESTS);
148 } 151 }
149 152
150 return; 153 return;
151 } 154 }
152 } 155 }
153
154 m_scene.AddPendingDownloads(1);
155
156 TextureSender requestHandler = new TextureSender(m_client, e.DiscardLevel, e.PacketNumber);
157 m_textureSenders.Add(e.RequestedAssetID, requestHandler);
158
159 m_scene.AssetCache.GetAsset(e.RequestedAssetID, TextureCallback, true);
160 } 156 }
157
158 m_scene.AddPendingDownloads(1);
159
160 TextureSender requestHandler = new TextureSender(m_client, e.DiscardLevel, e.PacketNumber);
161 m_textureSenders.Add(e.RequestedAssetID, requestHandler);
162
163 m_scene.AssetCache.GetAsset(e.RequestedAssetID, TextureCallback, true);
161 } 164 }
162 } 165 }
163 } 166 }
@@ -193,14 +196,18 @@ namespace OpenSim.Region.Environment.Modules
193 // this on to the TextureSender it will blow up, so just discard for now. 196 // this on to the TextureSender it will blow up, so just discard for now.
194 // Needs investigation. 197 // Needs investigation.
195 if (texture == null || texture.Data == null) 198 if (texture == null || texture.Data == null)
196 { 199 {
197 m_log.DebugFormat( 200 if (!missingTextureRequestCounts.ContainsKey(textureID))
198 "[USER TEXTURE DOWNLOAD SERVICE]: Queueing TextureNotFoundSender for {0}, client {1}", 201 {
199 textureID, m_client.AgentId); 202 missingTextureRequestCounts.Add(textureID, 1);
203
204 m_log.DebugFormat(
205 "[USER TEXTURE DOWNLOAD SERVICE]: Queueing first TextureNotFoundSender for {0}, client {1}",
206 textureID, m_client.AgentId);
207 }
200 208
201 ITextureSender textureNotFoundSender = new TextureNotFoundSender(m_client, textureID); 209 ITextureSender textureNotFoundSender = new TextureNotFoundSender(m_client, textureID);
202 EnqueueTextureSender(textureNotFoundSender); 210 EnqueueTextureSender(textureNotFoundSender);
203 missingTextureRequestCounts.Add(textureID, 1);
204 } 211 }
205 else 212 else
206 { 213 {