aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP
diff options
context:
space:
mode:
authorDiva Canto2010-07-04 14:59:15 -0700
committerDiva Canto2010-07-04 14:59:15 -0700
commitb84f72df0b7b3917e917a36546c911cb1953b30b (patch)
tree83655b4b5d17dd10605882fd0258914dc7c1f44f /OpenSim/Region/ClientStack/LindenUDP
parentStarted to clean up the mess with HyperAssets in LLClientView. Fixed HG acces... (diff)
downloadopensim-SC_OLD-b84f72df0b7b3917e917a36546c911cb1953b30b.zip
opensim-SC_OLD-b84f72df0b7b3917e917a36546c911cb1953b30b.tar.gz
opensim-SC_OLD-b84f72df0b7b3917e917a36546c911cb1953b30b.tar.bz2
opensim-SC_OLD-b84f72df0b7b3917e917a36546c911cb1953b30b.tar.xz
Got rid of all hyperassets references. Also fixed accessing textures in user's inventory in foreign grids.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs17
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs2
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs5
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;