aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
diff options
context:
space:
mode:
authorMelanie2009-10-14 05:10:43 +0100
committerMelanie2009-10-14 05:10:43 +0100
commitd83ace0d3ba3178aab852ae4ed63ea3953ea7c52 (patch)
tree56575e321d60daaf36fa5b3261f4ed9154826566 /OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
parent* Split Task category into Task and State (diff)
parentSet the estate owner to be the master avatar if it's not set. (diff)
downloadopensim-SC-d83ace0d3ba3178aab852ae4ed63ea3953ea7c52.zip
opensim-SC-d83ace0d3ba3178aab852ae4ed63ea3953ea7c52.tar.gz
opensim-SC-d83ace0d3ba3178aab852ae4ed63ea3953ea7c52.tar.bz2
opensim-SC-d83ace0d3ba3178aab852ae4ed63ea3953ea7c52.tar.xz
Merge branch 'master' into htb-throttle
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs50
1 files changed, 39 insertions, 11 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 3b1a0bd..cfc1ebc 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -43,6 +43,7 @@ using OpenSim.Framework.Communications.Cache;
43using OpenSim.Framework.Statistics; 43using OpenSim.Framework.Statistics;
44using OpenSim.Region.Framework.Interfaces; 44using OpenSim.Region.Framework.Interfaces;
45using OpenSim.Region.Framework.Scenes; 45using OpenSim.Region.Framework.Scenes;
46using OpenSim.Region.Framework.Scenes.Hypergrid;
46using OpenSim.Services.Interfaces; 47using OpenSim.Services.Interfaces;
47using Timer=System.Timers.Timer; 48using Timer=System.Timers.Timer;
48using AssetLandmark = OpenSim.Framework.AssetLandmark; 49using AssetLandmark = OpenSim.Framework.AssetLandmark;
@@ -318,6 +319,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
318 protected int m_avatarTerseUpdateRate = 50; 319 protected int m_avatarTerseUpdateRate = 50;
319 protected int m_avatarTerseUpdatesPerPacket = 5; 320 protected int m_avatarTerseUpdatesPerPacket = 5;
320 protected IAssetService m_assetService; 321 protected IAssetService m_assetService;
322 private IHyperAssetService m_hyperAssets;
323
321 324
322 #endregion Class Members 325 #endregion Class Members
323 326
@@ -376,6 +379,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
376 379
377 m_scene = scene; 380 m_scene = scene;
378 m_assetService = m_scene.RequestModuleInterface<IAssetService>(); 381 m_assetService = m_scene.RequestModuleInterface<IAssetService>();
382 m_hyperAssets = m_scene.RequestModuleInterface<IHyperAssetService>();
379 m_GroupsModule = scene.RequestModuleInterface<IGroupsModule>(); 383 m_GroupsModule = scene.RequestModuleInterface<IGroupsModule>();
380 m_imageManager = new LLImageManager(this, m_assetService, Scene.RequestModuleInterface<IJ2KDecoder>()); 384 m_imageManager = new LLImageManager(this, m_assetService, Scene.RequestModuleInterface<IJ2KDecoder>());
381 m_channelVersion = Utils.StringToBytes(scene.GetSimulatorVersion()); 385 m_channelVersion = Utils.StringToBytes(scene.GetSimulatorVersion());
@@ -6894,7 +6898,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6894 #endregion 6898 #endregion
6895 6899
6896 //handlerTextureRequest = null; 6900 //handlerTextureRequest = null;
6897
6898 for (int i = 0; i < imageRequest.RequestImage.Length; i++) 6901 for (int i = 0; i < imageRequest.RequestImage.Length; i++)
6899 { 6902 {
6900 if (OnRequestTexture != null) 6903 if (OnRequestTexture != null)
@@ -6905,7 +6908,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6905 args.PacketNumber = imageRequest.RequestImage[i].Packet; 6908 args.PacketNumber = imageRequest.RequestImage[i].Packet;
6906 args.Priority = imageRequest.RequestImage[i].DownloadPriority; 6909 args.Priority = imageRequest.RequestImage[i].DownloadPriority;
6907 args.requestSequence = imageRequest.Header.Sequence; 6910 args.requestSequence = imageRequest.Header.Sequence;
6908
6909 //handlerTextureRequest = OnRequestTexture; 6911 //handlerTextureRequest = OnRequestTexture;
6910 6912
6911 //if (handlerTextureRequest != null) 6913 //if (handlerTextureRequest != null)
@@ -6928,10 +6930,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6928 // Validate inventory transfers 6930 // Validate inventory transfers
6929 // Has to be done here, because AssetCache can't do it 6931 // Has to be done here, because AssetCache can't do it
6930 // 6932 //
6931 6933 UUID taskID = UUID.Zero;
6932 if (transfer.TransferInfo.SourceType == 3) 6934 if (transfer.TransferInfo.SourceType == 3)
6933 { 6935 {
6934 UUID taskID = new UUID(transfer.TransferInfo.Params, 48); 6936 taskID = new UUID(transfer.TransferInfo.Params, 48);
6935 UUID itemID = new UUID(transfer.TransferInfo.Params, 64); 6937 UUID itemID = new UUID(transfer.TransferInfo.Params, 64);
6936 UUID requestID = new UUID(transfer.TransferInfo.Params, 80); 6938 UUID requestID = new UUID(transfer.TransferInfo.Params, 80);
6937 if (!(((Scene)m_scene).Permissions.BypassPermissions())) 6939 if (!(((Scene)m_scene).Permissions.BypassPermissions()))
@@ -7002,7 +7004,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7002 7004
7003 //m_assetCache.AddAssetRequest(this, transfer); 7005 //m_assetCache.AddAssetRequest(this, transfer);
7004 7006
7005 MakeAssetRequest(transfer); 7007 MakeAssetRequest(transfer, taskID);
7006 7008
7007 /* RequestAsset = OnRequestAsset; 7009 /* RequestAsset = OnRequestAsset;
7008 if (RequestAsset != null) 7010 if (RequestAsset != null)
@@ -10209,7 +10211,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10209 return String.Empty; 10211 return String.Empty;
10210 } 10212 }
10211 10213
10212 public void MakeAssetRequest(TransferRequestPacket transferRequest) 10214 public void MakeAssetRequest(TransferRequestPacket transferRequest, UUID taskID)
10213 { 10215 {
10214 UUID requestID = UUID.Zero; 10216 UUID requestID = UUID.Zero;
10215 if (transferRequest.TransferInfo.SourceType == 2) 10217 if (transferRequest.TransferInfo.SourceType == 2)
@@ -10221,12 +10223,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10221 { 10223 {
10222 //inventory asset request 10224 //inventory asset request
10223 requestID = new UUID(transferRequest.TransferInfo.Params, 80); 10225 requestID = new UUID(transferRequest.TransferInfo.Params, 80);
10224 //m_log.Debug("asset request " + requestID); 10226 //m_log.Debug("[XXX] inventory asset request " + requestID);
10227 //if (taskID == UUID.Zero) // Agent
10228 // if (m_scene is HGScene)
10229 // {
10230 // m_log.Debug("[XXX] hg asset request " + requestID);
10231 // // We may need to fetch the asset from the user's asset server into the local asset server
10232 // HGAssetMapper mapper = ((HGScene)m_scene).AssetMapper;
10233 // mapper.Get(requestID, AgentId);
10234 // }
10225 } 10235 }
10226 10236
10227 //check to see if asset is in local cache, if not we need to request it from asset server. 10237 //check to see if asset is in local cache, if not we need to request it from asset server.
10228 //m_log.Debug("asset request " + requestID); 10238 //m_log.Debug("asset request " + requestID);
10229 10239
10230 m_assetService.Get(requestID.ToString(), transferRequest, AssetReceived); 10240 m_assetService.Get(requestID.ToString(), transferRequest, AssetReceived);
10231 10241
10232 } 10242 }
@@ -10237,12 +10247,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10237 10247
10238 UUID requestID = UUID.Zero; 10248 UUID requestID = UUID.Zero;
10239 byte source = 2; 10249 byte source = 2;
10240 if (transferRequest.TransferInfo.SourceType == 2) 10250 if ((transferRequest.TransferInfo.SourceType == 2) || (transferRequest.TransferInfo.SourceType == 2222))
10241 { 10251 {
10242 //direct asset request 10252 //direct asset request
10243 requestID = new UUID(transferRequest.TransferInfo.Params, 0); 10253 requestID = new UUID(transferRequest.TransferInfo.Params, 0);
10244 } 10254 }
10245 else if (transferRequest.TransferInfo.SourceType == 3) 10255 else if ((transferRequest.TransferInfo.SourceType == 3) || (transferRequest.TransferInfo.SourceType == 3333))
10246 { 10256 {
10247 //inventory asset request 10257 //inventory asset request
10248 requestID = new UUID(transferRequest.TransferInfo.Params, 80); 10258 requestID = new UUID(transferRequest.TransferInfo.Params, 80);
@@ -10250,10 +10260,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10250 //m_log.Debug("asset request " + requestID); 10260 //m_log.Debug("asset request " + requestID);
10251 } 10261 }
10252 10262
10253 // FIXME: We never tell the client about assets which do not exist when requested by this transfer mechanism, which can't be right.
10254 if (null == asset) 10263 if (null == asset)
10255 { 10264 {
10265 if ((m_hyperAssets != null) && (transferRequest.TransferInfo.SourceType < 2000))
10266 {
10267 // Try the user's inventory, but only if it's different from the regions'
10268 string userAssets = m_hyperAssets.GetUserAssetServer(AgentId);
10269 if ((userAssets != string.Empty) && (userAssets != m_hyperAssets.GetSimAssetServer()))
10270 {
10271 m_log.DebugFormat("[CLIENT]: asset {0} not found in local asset storage. Trying user's storage.", id);
10272 if (transferRequest.TransferInfo.SourceType == 2)
10273 transferRequest.TransferInfo.SourceType = 2222; // marker
10274 else if (transferRequest.TransferInfo.SourceType == 3)
10275 transferRequest.TransferInfo.SourceType = 3333; // marker
10276
10277 m_assetService.Get(userAssets + "/" + id, transferRequest, AssetReceived);
10278 return;
10279 }
10280 }
10281
10256 //m_log.DebugFormat("[ASSET CACHE]: Asset transfer request for asset which is {0} already known to be missing. Dropping", requestID); 10282 //m_log.DebugFormat("[ASSET CACHE]: Asset transfer request for asset which is {0} already known to be missing. Dropping", requestID);
10283
10284 // FIXME: We never tell the client about assets which do not exist when requested by this transfer mechanism, which can't be right.
10257 return; 10285 return;
10258 } 10286 }
10259 10287