diff options
author | Diva Canto | 2010-07-04 14:59:15 -0700 |
---|---|---|
committer | Diva Canto | 2010-07-04 15:10:52 -0700 |
commit | 80e16907bf269db0013d14a2bb123b6bdd27d1bf (patch) | |
tree | 1ebcab6c4714fc410484197a1b2a094ef55dc020 /OpenSim/Region/ClientStack/LindenUDP | |
parent | Started to clean up the mess with HyperAssets in LLClientView. Fixed HG acces... (diff) | |
download | opensim-SC-80e16907bf269db0013d14a2bb123b6bdd27d1bf.zip opensim-SC-80e16907bf269db0013d14a2bb123b6bdd27d1bf.tar.gz opensim-SC-80e16907bf269db0013d14a2bb123b6bdd27d1bf.tar.bz2 opensim-SC-80e16907bf269db0013d14a2bb123b6bdd27d1bf.tar.xz |
Got rid of all hyperassets references. Also fixed accessing textures in user's inventory in foreign grids.
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs | 17 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs | 5 |
3 files changed, 11 insertions, 13 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs b/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs index f6ad6e1..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,15 +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 | 382 | // don't have any distinguishing feature. As such, in order to serve those when the | |
383 | if ((userAssets != string.Empty) && (userAssets != HyperAssets.GetSimAssetServer())) | 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)) | ||
384 | { | 387 | { |
385 | 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); |
386 | AssetService.Get(userAssets + "/" + id, HyperAssets, AssetReceived); | 389 | AssetService.Get(assetServerURL + "/" + id, InventoryAccessModule, AssetReceived); |
387 | return; | 390 | return; |
388 | } | 391 | } |
389 | } | 392 | } |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 3a2c019..247c2b2 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -357,7 +357,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
357 | protected uint m_agentFOVCounter; | 357 | protected uint m_agentFOVCounter; |
358 | 358 | ||
359 | protected IAssetService m_assetService; | 359 | protected IAssetService m_assetService; |
360 | private IHyperAssetService m_hyperAssets; | ||
361 | private const bool m_checkPackets = true; | 360 | private const bool m_checkPackets = true; |
362 | 361 | ||
363 | private Timer m_propertiesPacketTimer; | 362 | private Timer m_propertiesPacketTimer; |
@@ -432,7 +431,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
432 | // m_attachmentsSent = new HashSet<uint>(); | 431 | // m_attachmentsSent = new HashSet<uint>(); |
433 | 432 | ||
434 | m_assetService = m_scene.RequestModuleInterface<IAssetService>(); | 433 | m_assetService = m_scene.RequestModuleInterface<IAssetService>(); |
435 | m_hyperAssets = m_scene.RequestModuleInterface<IHyperAssetService>(); | ||
436 | m_GroupsModule = scene.RequestModuleInterface<IGroupsModule>(); | 434 | m_GroupsModule = scene.RequestModuleInterface<IGroupsModule>(); |
437 | m_imageManager = new LLImageManager(this, m_assetService, Scene.RequestModuleInterface<IJ2KDecoder>()); | 435 | m_imageManager = new LLImageManager(this, m_assetService, Scene.RequestModuleInterface<IJ2KDecoder>()); |
438 | m_channelVersion = Util.StringToBytes256(scene.GetSimulatorVersion()); | 436 | m_channelVersion = Util.StringToBytes256(scene.GetSimulatorVersion()); |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs b/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs index 938cf50..9e0db12 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs | |||
@@ -58,8 +58,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
58 | private C5.IntervalHeap<J2KImage> m_priorityQueue = new C5.IntervalHeap<J2KImage>(10, new J2KImageComparer()); | 58 | private C5.IntervalHeap<J2KImage> m_priorityQueue = new C5.IntervalHeap<J2KImage>(10, new J2KImageComparer()); |
59 | private object m_syncRoot = new object(); | 59 | private object m_syncRoot = new object(); |
60 | 60 | ||
61 | private IHyperAssetService m_hyperAssets; | ||
62 | |||
63 | public LLClientView Client { get { return m_client; } } | 61 | public LLClientView Client { get { return m_client; } } |
64 | public AssetBase MissingImage { get { return m_missingImage; } } | 62 | public AssetBase MissingImage { get { return m_missingImage; } } |
65 | 63 | ||
@@ -75,7 +73,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
75 | m_log.Error("[ClientView] - Couldn't set missing image asset, falling back to missing image packet. This is known to crash the client"); | 73 | m_log.Error("[ClientView] - Couldn't set missing image asset, falling back to missing image packet. This is known to crash the client"); |
76 | 74 | ||
77 | m_j2kDecodeModule = pJ2kDecodeModule; | 75 | m_j2kDecodeModule = pJ2kDecodeModule; |
78 | m_hyperAssets = client.Scene.RequestModuleInterface<IHyperAssetService>(); | ||
79 | } | 76 | } |
80 | 77 | ||
81 | /// <summary> | 78 | /// <summary> |
@@ -149,7 +146,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
149 | imgrequest.J2KDecoder = m_j2kDecodeModule; | 146 | imgrequest.J2KDecoder = m_j2kDecodeModule; |
150 | imgrequest.AssetService = m_assetCache; | 147 | imgrequest.AssetService = m_assetCache; |
151 | imgrequest.AgentID = m_client.AgentId; | 148 | imgrequest.AgentID = m_client.AgentId; |
152 | imgrequest.HyperAssets = m_hyperAssets; | 149 | imgrequest.InventoryAccessModule = m_client.Scene.RequestModuleInterface<IInventoryAccessModule>(); |
153 | imgrequest.DiscardLevel = newRequest.DiscardLevel; | 150 | imgrequest.DiscardLevel = newRequest.DiscardLevel; |
154 | imgrequest.StartPacket = Math.Max(1, newRequest.PacketNumber); | 151 | imgrequest.StartPacket = Math.Max(1, newRequest.PacketNumber); |
155 | imgrequest.Priority = newRequest.Priority; | 152 | imgrequest.Priority = newRequest.Priority; |