diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 25eb5cd..ad92494 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -117,6 +117,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
117 | protected int m_avatarTerseUpdatesPerPacket = 5; | 117 | protected int m_avatarTerseUpdatesPerPacket = 5; |
118 | protected int m_packetMTU = 1400; | 118 | protected int m_packetMTU = 1400; |
119 | protected IAssetService m_assetService; | 119 | protected IAssetService m_assetService; |
120 | private IHyperAssetService m_hyperAssets; | ||
120 | 121 | ||
121 | 122 | ||
122 | #region Properties | 123 | #region Properties |
@@ -172,6 +173,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
172 | 173 | ||
173 | m_scene = scene; | 174 | m_scene = scene; |
174 | m_assetService = m_scene.RequestModuleInterface<IAssetService>(); | 175 | m_assetService = m_scene.RequestModuleInterface<IAssetService>(); |
176 | m_hyperAssets = m_scene.RequestModuleInterface<IHyperAssetService>(); | ||
175 | m_GroupsModule = scene.RequestModuleInterface<IGroupsModule>(); | 177 | m_GroupsModule = scene.RequestModuleInterface<IGroupsModule>(); |
176 | m_imageManager = new LLImageManager(this, m_assetService, Scene.RequestModuleInterface<IJ2KDecoder>()); | 178 | m_imageManager = new LLImageManager(this, m_assetService, Scene.RequestModuleInterface<IJ2KDecoder>()); |
177 | m_channelVersion = Utils.StringToBytes(scene.GetSimulatorVersion()); | 179 | m_channelVersion = Utils.StringToBytes(scene.GetSimulatorVersion()); |
@@ -10342,14 +10344,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
10342 | { | 10344 | { |
10343 | //inventory asset request | 10345 | //inventory asset request |
10344 | requestID = new UUID(transferRequest.TransferInfo.Params, 80); | 10346 | requestID = new UUID(transferRequest.TransferInfo.Params, 80); |
10345 | //m_log.Debug("asset request " + requestID); | 10347 | //m_log.Debug("[XXX] inventory asset request " + requestID); |
10346 | if (taskID == UUID.Zero) // Agent | 10348 | //if (taskID == UUID.Zero) // Agent |
10347 | if (m_scene is HGScene) | 10349 | // if (m_scene is HGScene) |
10348 | { | 10350 | // { |
10349 | // We may need to fetch the asset from the user's asset server into the local asset server | 10351 | // m_log.Debug("[XXX] hg asset request " + requestID); |
10350 | HGAssetMapper mapper = ((HGScene)m_scene).AssetMapper; | 10352 | // // We may need to fetch the asset from the user's asset server into the local asset server |
10351 | mapper.Get(requestID, AgentId); | 10353 | // HGAssetMapper mapper = ((HGScene)m_scene).AssetMapper; |
10352 | } | 10354 | // mapper.Get(requestID, AgentId); |
10355 | // } | ||
10353 | } | 10356 | } |
10354 | 10357 | ||
10355 | //check to see if asset is in local cache, if not we need to request it from asset server. | 10358 | //check to see if asset is in local cache, if not we need to request it from asset server. |
@@ -10378,10 +10381,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
10378 | //m_log.Debug("asset request " + requestID); | 10381 | //m_log.Debug("asset request " + requestID); |
10379 | } | 10382 | } |
10380 | 10383 | ||
10381 | // FIXME: We never tell the client about assets which do not exist when requested by this transfer mechanism, which can't be right. | ||
10382 | if (null == asset) | 10384 | if (null == asset) |
10383 | { | 10385 | { |
10386 | // Try the user's inventory, but only if it's different from the regions' | ||
10387 | string userAssets = m_hyperAssets.GetUserAssetServer(AgentId); | ||
10388 | if ((userAssets != string.Empty) && (userAssets != m_hyperAssets.GetSimAssetServer())) | ||
10389 | { | ||
10390 | m_log.DebugFormat("[CLIENT]: asset {0} not found in local asset storage. Trying user's storage.", id); | ||
10391 | transferRequest.TransferInfo.SourceType = 9999; // marker | ||
10392 | m_assetService.Get(userAssets + "/" + id, transferRequest, AssetReceived); | ||
10393 | return; | ||
10394 | } | ||
10395 | |||
10384 | //m_log.DebugFormat("[ASSET CACHE]: Asset transfer request for asset which is {0} already known to be missing. Dropping", requestID); | 10396 | //m_log.DebugFormat("[ASSET CACHE]: Asset transfer request for asset which is {0} already known to be missing. Dropping", requestID); |
10397 | |||
10398 | // FIXME: We never tell the client about assets which do not exist when requested by this transfer mechanism, which can't be right. | ||
10385 | return; | 10399 | return; |
10386 | } | 10400 | } |
10387 | 10401 | ||