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 9869a99..e9e2dca 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; |
@@ -375,14 +375,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
375 | UUID assetID = UUID.Zero; | 375 | UUID assetID = UUID.Zero; |
376 | if (asset != null) | 376 | if (asset != null) |
377 | assetID = asset.FullID; | 377 | assetID = asset.FullID; |
378 | else if ((HyperAssets != null) && (sender != HyperAssets)) | 378 | else if ((InventoryAccessModule != null) && (sender != InventoryAccessModule)) |
379 | { | 379 | { |
380 | // Try the user's inventory, but only if it's different from the regions' | 380 | // Unfortunately we need this here, there's no other way. |
381 | string userAssets = HyperAssets.GetUserAssetServer(AgentID); | 381 | // This is due to the fact that textures opened directly from the agent's inventory |
382 | if ((userAssets != string.Empty) && (userAssets != HyperAssets.GetSimAssetServer())) | 382 | // don't have any distinguishing feature. As such, in order to serve those when the |
383 | // foreign user is visiting, we need to try again after the first fail to the local | ||
384 | // asset service. | ||
385 | string assetServerURL = string.Empty; | ||
386 | if (InventoryAccessModule.IsForeignUser(AgentID, out assetServerURL)) | ||
383 | { | 387 | { |
384 | m_log.DebugFormat("[J2KIMAGE]: texture {0} not found in local asset storage. Trying user's storage.", id); | 388 | m_log.DebugFormat("[J2KIMAGE]: texture {0} not found in local asset storage. Trying user's storage.", id); |
385 | AssetService.Get(userAssets + "/" + id, HyperAssets, AssetReceived); | 389 | AssetService.Get(assetServerURL + "/" + id, InventoryAccessModule, AssetReceived); |
386 | return; | 390 | return; |
387 | } | 391 | } |
388 | } | 392 | } |