aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs24
1 files changed, 19 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs b/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs
index 4a94266..24f0981 100644
--- a/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs
+++ b/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs
@@ -95,7 +95,7 @@ namespace OpenSim.Region.Environment.Modules
95 new TextureSender(client, e.DiscardLevel, e.PacketNumber); 95 new TextureSender(client, e.DiscardLevel, e.PacketNumber);
96 m_textureSenders.Add(e.RequestedAssetID, requestHandler); 96 m_textureSenders.Add(e.RequestedAssetID, requestHandler);
97 97
98 m_scene.AssetCache.GetAsset(e.RequestedAssetID, TextureCallback); 98 m_scene.AssetCache.GetAsset(e.RequestedAssetID, TextureCallback, true);
99 } 99 }
100 } 100 }
101 } 101 }
@@ -117,7 +117,7 @@ namespace OpenSim.Region.Environment.Modules
117 /// </summary> 117 /// </summary>
118 /// <param name="textureID"></param> 118 /// <param name="textureID"></param>
119 /// <param name="asset"></param> 119 /// <param name="asset"></param>
120 public void TextureCallback(LLUUID textureID, AssetBase asset) 120 public void TextureCallback(LLUUID textureID, AssetBase texture)
121 { 121 {
122 lock (m_textureSenders) 122 lock (m_textureSenders)
123 { 123 {
@@ -125,10 +125,24 @@ namespace OpenSim.Region.Environment.Modules
125 125
126 if (m_textureSenders.TryGetValue(textureID, out textureSender)) 126 if (m_textureSenders.TryGetValue(textureID, out textureSender))
127 { 127 {
128 if (!textureSender.ImageLoaded) 128 if (null != texture)
129 { 129 {
130 textureSender.TextureReceived(asset); 130 if (!textureSender.ImageLoaded)
131 EnqueueTextureSender(textureSender); 131 {
132 textureSender.TextureReceived(texture);
133 EnqueueTextureSender(textureSender);
134 }
135 }
136 else
137 {
138 // Right now, leaving it up to lower level asset server code to post the fact that
139 // this texture could not be found
140
141 // 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
143
144 //m_log.InfoFormat("Removing {0} from pending downloads count", textureID);
145 m_scene.AddPendingDownloads(-1);
132 } 146 }
133 147
134 //m_log.InfoFormat("[TEXTURE SENDER] Removing texture sender with uuid {0}", textureID); 148 //m_log.InfoFormat("[TEXTURE SENDER] Removing texture sender with uuid {0}", textureID);