diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs b/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs index 5c17b0e..9dd6663 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs | |||
@@ -55,7 +55,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
55 | public IJ2KDecoder J2KDecoder; | 55 | public IJ2KDecoder J2KDecoder; |
56 | public IAssetService AssetService; | 56 | public IAssetService AssetService; |
57 | public UUID AgentID; | 57 | public UUID AgentID; |
58 | public IHyperAssetService HyperAssets; | 58 | public IInventoryAccessModule InventoryAccessModule; |
59 | public OpenJPEG.J2KLayerInfo[] Layers; | 59 | public OpenJPEG.J2KLayerInfo[] Layers; |
60 | public bool IsDecoded; | 60 | public bool IsDecoded; |
61 | public bool HasAsset; | 61 | public bool HasAsset; |
@@ -378,14 +378,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
378 | UUID assetID = UUID.Zero; | 378 | UUID assetID = UUID.Zero; |
379 | if (asset != null) | 379 | if (asset != null) |
380 | assetID = asset.FullID; | 380 | assetID = asset.FullID; |
381 | else if ((HyperAssets != null) && (sender != HyperAssets)) | 381 | else if ((InventoryAccessModule != null) && (sender != InventoryAccessModule)) |
382 | { | 382 | { |
383 | // Try the user's inventory, but only if it's different from the regions' | 383 | // Unfortunately we need this here, there's no other way. |
384 | string userAssets = HyperAssets.GetUserAssetServer(AgentID); | 384 | // This is due to the fact that textures opened directly from the agent's inventory |
385 | if ((userAssets != string.Empty) && (userAssets != HyperAssets.GetSimAssetServer())) | 385 | // don't have any distinguishing feature. As such, in order to serve those when the |
386 | // foreign user is visiting, we need to try again after the first fail to the local | ||
387 | // asset service. | ||
388 | string assetServerURL = string.Empty; | ||
389 | if (InventoryAccessModule.IsForeignUser(AgentID, out assetServerURL)) | ||
386 | { | 390 | { |
387 | m_log.DebugFormat("[J2KIMAGE]: texture {0} not found in local asset storage. Trying user's storage.", id); | 391 | m_log.DebugFormat("[J2KIMAGE]: texture {0} not found in local asset storage. Trying user's storage.", id); |
388 | AssetService.Get(userAssets + "/" + id, HyperAssets, AssetReceived); | 392 | AssetService.Get(assetServerURL + "/" + id, InventoryAccessModule, AssetReceived); |
389 | return; | 393 | return; |
390 | } | 394 | } |
391 | } | 395 | } |