diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 38 |
1 files changed, 28 insertions, 10 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 53217a0..c28e58d 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -8949,7 +8949,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8949 | if (aCircuit != null && aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI")) | 8949 | if (aCircuit != null && aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI")) |
8950 | { | 8950 | { |
8951 | string assetServer = aCircuit.ServiceURLs["AssetServerURI"].ToString(); | 8951 | string assetServer = aCircuit.ServiceURLs["AssetServerURI"].ToString(); |
8952 | return ((Scene)Scene).AssetService.Get(assetServer + "/" + id); | 8952 | if (!string.IsNullOrEmpty(assetServer)) |
8953 | return ((Scene)Scene).AssetService.Get(assetServer + "/" + id); | ||
8953 | } | 8954 | } |
8954 | 8955 | ||
8955 | return null; | 8956 | return null; |
@@ -12658,16 +12659,33 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
12658 | 12659 | ||
12659 | if (asset == null) | 12660 | if (asset == null) |
12660 | { | 12661 | { |
12661 | req.AssetInf = null; | 12662 | // Try the user's asset server |
12662 | req.AssetRequestSource = source; | 12663 | IInventoryAccessModule inventoryAccessModule = Scene.RequestModuleInterface<IInventoryAccessModule>(); |
12663 | req.IsTextureRequest = false; | 12664 | |
12664 | req.NumPackets = 0; | 12665 | string assetServerURL = string.Empty; |
12665 | req.Params = transferRequest.TransferInfo.Params; | 12666 | if (inventoryAccessModule.IsForeignUser(AgentId, out assetServerURL) && !string.IsNullOrEmpty(assetServerURL)) |
12666 | req.RequestAssetID = requestID; | 12667 | { |
12667 | req.TransferRequestID = transferRequest.TransferInfo.TransferID; | 12668 | if (!assetServerURL.EndsWith("/") && !assetServerURL.EndsWith("=")) |
12669 | assetServerURL = assetServerURL + "/"; | ||
12670 | |||
12671 | //m_log.DebugFormat("[LLCLIENTVIEW]: asset {0} not found in local storage. Trying user's storage.", assetServerURL + id); | ||
12672 | asset = m_scene.AssetService.Get(assetServerURL + id); | ||
12673 | } | ||
12674 | |||
12675 | if (asset == null) | ||
12676 | { | ||
12677 | req.AssetInf = null; | ||
12678 | req.AssetRequestSource = source; | ||
12679 | req.IsTextureRequest = false; | ||
12680 | req.NumPackets = 0; | ||
12681 | req.Params = transferRequest.TransferInfo.Params; | ||
12682 | req.RequestAssetID = requestID; | ||
12683 | req.TransferRequestID = transferRequest.TransferInfo.TransferID; | ||
12684 | |||
12685 | SendAssetNotFound(req); | ||
12686 | return; | ||
12687 | } | ||
12668 | 12688 | ||
12669 | SendAssetNotFound(req); | ||
12670 | return; | ||
12671 | } | 12689 | } |
12672 | 12690 | ||
12673 | if (transferRequest.TransferInfo.SourceType == (int)SourceType.Asset) | 12691 | if (transferRequest.TransferInfo.SourceType == (int)SourceType.Asset) |