diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r-- | OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs b/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs index 6467ea3..6eaf321 100644 --- a/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs +++ b/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs | |||
@@ -60,6 +60,13 @@ namespace OpenSim.Region.Environment.Modules | |||
60 | /// </summary> | 60 | /// </summary> |
61 | private readonly BlockingQueue<ITextureSender> m_sharedSendersQueue; | 61 | private readonly BlockingQueue<ITextureSender> m_sharedSendersQueue; |
62 | 62 | ||
63 | /// <summary> | ||
64 | /// We're going to record when we get a request for a particular missing texture for each client | ||
65 | /// XXX This is really a temporary solution to deal with the situation where a client continually requests | ||
66 | /// the same missing textures | ||
67 | /// </summary> | ||
68 | private readonly Dictionary<LLUUID, int> missingTextureRequests = new Dictionary<LLUUID, int>(); | ||
69 | |||
63 | private readonly Scene m_scene; | 70 | private readonly Scene m_scene; |
64 | 71 | ||
65 | private readonly IClientAPI m_client; | 72 | private readonly IClientAPI m_client; |
@@ -138,12 +145,33 @@ namespace OpenSim.Region.Environment.Modules | |||
138 | // Needs investigation. | 145 | // Needs investigation. |
139 | if (texture == null || texture.Data == null) | 146 | if (texture == null || texture.Data == null) |
140 | { | 147 | { |
141 | m_log.DebugFormat( | 148 | // We're only going to tell the client once about a missing texture, even if it keeps asking |
142 | "[USER TEXTURE DOWNLOAD SERVICE]: Queueing TextureNotFoundSender for {0}, client {1}", | 149 | // XXX This is to reduce (but not resolve) a current problem where some clients keep requesting the same textures |
143 | textureID, m_client.AgentId); | 150 | // - one might want to do this for all asset requests (or allow a number of retries) in the |
144 | 151 | // longer term. | |
145 | ITextureSender textureNotFoundSender = new TextureNotFoundSender(m_client, textureID); | 152 | if (!missingTextureRequests.ContainsKey(textureID)) |
146 | EnqueueTextureSender(textureNotFoundSender); | 153 | { |
154 | m_log.DebugFormat( | ||
155 | "[USER TEXTURE DOWNLOAD SERVICE]: Queueing TextureNotFoundSender for {0}, client {1}", | ||
156 | textureID, m_client.AgentId); | ||
157 | |||
158 | ITextureSender textureNotFoundSender = new TextureNotFoundSender(m_client, textureID); | ||
159 | EnqueueTextureSender(textureNotFoundSender); | ||
160 | missingTextureRequests.Add(textureID, 1); | ||
161 | } | ||
162 | else | ||
163 | { | ||
164 | int requests = missingTextureRequests[textureID] + 1; | ||
165 | |||
166 | if (requests % 20 == 0) | ||
167 | { | ||
168 | m_log.WarnFormat( | ||
169 | "[USER TEXTURE DOWNLOAD SERVICE]: Received {0} requests for the missing texture {1} from client {2}", | ||
170 | requests, textureID, m_client.AgentId); | ||
171 | } | ||
172 | |||
173 | missingTextureRequests[textureID] = requests; | ||
174 | } | ||
147 | } | 175 | } |
148 | else | 176 | else |
149 | { | 177 | { |