This little sucker had evaded my attention forever. As a consequence some assets associated with foreign users were being missed.

bullet-2.82
Diva Canto 2014-05-09 11:06:03 -07:00
parent afb938e579
commit 667a272cce
1 changed files with 28 additions and 10 deletions

View File

@ -8949,6 +8949,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (aCircuit != null && aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI"))
{
string assetServer = aCircuit.ServiceURLs["AssetServerURI"].ToString();
if (!string.IsNullOrEmpty(assetServer))
return ((Scene)Scene).AssetService.Get(assetServer + "/" + id);
}
@ -12656,6 +12657,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
AssetRequestToClient req = new AssetRequestToClient();
if (asset == null)
{
// Try the user's asset server
IInventoryAccessModule inventoryAccessModule = Scene.RequestModuleInterface<IInventoryAccessModule>();
string assetServerURL = string.Empty;
if (inventoryAccessModule.IsForeignUser(AgentId, out assetServerURL) && !string.IsNullOrEmpty(assetServerURL))
{
if (!assetServerURL.EndsWith("/") && !assetServerURL.EndsWith("="))
assetServerURL = assetServerURL + "/";
//m_log.DebugFormat("[LLCLIENTVIEW]: asset {0} not found in local storage. Trying user's storage.", assetServerURL + id);
asset = m_scene.AssetService.Get(assetServerURL + id);
}
if (asset == null)
{
req.AssetInf = null;
@ -12670,6 +12686,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return;
}
}
if (transferRequest.TransferInfo.SourceType == (int)SourceType.Asset)
{
requestID = new UUID(transferRequest.TransferInfo.Params, 0);