diff options
author | Justin Clark-Casey (justincc) | 2012-09-06 00:11:47 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-09-06 00:11:47 +0100 |
commit | a0d0c9f751f45d54772af2e33866b27c9be33511 (patch) | |
tree | b94a250c12264f8c44387e79e35b62893dab441b /OpenSim/Region/CoreModules/Scripting/DynamicTexture | |
parent | Bump master code up to 0.7.5 now that 0.7.4 is out. (diff) | |
download | opensim-SC_OLD-a0d0c9f751f45d54772af2e33866b27c9be33511.zip opensim-SC_OLD-a0d0c9f751f45d54772af2e33866b27c9be33511.tar.gz opensim-SC_OLD-a0d0c9f751f45d54772af2e33866b27c9be33511.tar.bz2 opensim-SC_OLD-a0d0c9f751f45d54772af2e33866b27c9be33511.tar.xz |
If the GetTexture capability receives a request for a range of data beyond that of an otherwise valid asset, return HTTP PartialContent rather than RequestedRangeNotSatisfiable.
This is because recent viewers (3.2.1, 3.3.4) and probably earlier ones using the http GetTexture capability will sometimes make such invalid range requests.
This appears to happen if the viewer's estimate of texture sizes at discard levels > 0 (chiefly 2) exceeds the total texture size.
I believe this does not normally happen but can occur for dynamic textures with are large but mainly blank.
If this happens, returning a RequestedRangeNotSatisfiable will cause the viewer to not render the texture at the final resolution.
However, returning a PartialContent (or OK) even with 0 data will allow the viewer to render the final texture.
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting/DynamicTexture')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs index 3eedf49..e09f1a9 100644 --- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs | |||
@@ -42,7 +42,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture | |||
42 | { | 42 | { |
43 | public class DynamicTextureModule : IRegionModule, IDynamicTextureManager | 43 | public class DynamicTextureModule : IRegionModule, IDynamicTextureManager |
44 | { | 44 | { |
45 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 45 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
46 | 46 | ||
47 | private const int ALL_SIDES = -1; | 47 | private const int ALL_SIDES = -1; |
48 | 48 | ||
@@ -249,10 +249,18 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture | |||
249 | } | 249 | } |
250 | } | 250 | } |
251 | 251 | ||
252 | // m_log.DebugFormat( | ||
253 | // "[DYNAMIC TEXTURE MODULE]: Requesting generation of new dynamic texture for {0} in {1}", | ||
254 | // part.Name, part.ParentGroup.Scene.Name); | ||
255 | |||
252 | RenderPlugins[contentType].AsyncConvertData(updater.UpdaterID, data, extraParams); | 256 | RenderPlugins[contentType].AsyncConvertData(updater.UpdaterID, data, extraParams); |
253 | } | 257 | } |
254 | else | 258 | else |
255 | { | 259 | { |
260 | // m_log.DebugFormat( | ||
261 | // "[DYNAMIC TEXTURE MODULE]: Reusing cached texture {0} for {1} in {2}", | ||
262 | // objReusableTextureUUID, part.Name, part.ParentGroup.Scene.Name); | ||
263 | |||
256 | // No need to add to updaters as the texture is always the same. Not that this functionality | 264 | // No need to add to updaters as the texture is always the same. Not that this functionality |
257 | // apppears to be implemented anyway. | 265 | // apppears to be implemented anyway. |
258 | updater.UpdatePart(part, (UUID)objReusableTextureUUID); | 266 | updater.UpdatePart(part, (UUID)objReusableTextureUUID); |
@@ -448,8 +456,10 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture | |||
448 | IJ2KDecoder cacheLayerDecode = scene.RequestModuleInterface<IJ2KDecoder>(); | 456 | IJ2KDecoder cacheLayerDecode = scene.RequestModuleInterface<IJ2KDecoder>(); |
449 | if (cacheLayerDecode != null) | 457 | if (cacheLayerDecode != null) |
450 | { | 458 | { |
451 | cacheLayerDecode.Decode(asset.FullID, asset.Data); | 459 | if (!cacheLayerDecode.Decode(asset.FullID, asset.Data)) |
452 | cacheLayerDecode = null; | 460 | m_log.WarnFormat( |
461 | "[DYNAMIC TEXTURE MODULE]: Decoding of dynamically generated asset {0} for {1} in {2} failed", | ||
462 | asset.ID, part.Name, part.ParentGroup.Scene.Name); | ||
453 | } | 463 | } |
454 | 464 | ||
455 | UUID oldID = UpdatePart(part, asset.FullID); | 465 | UUID oldID = UpdatePart(part, asset.FullID); |