diff options
author | David Walter Seikel | 2016-11-03 21:44:39 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-11-03 21:44:39 +1000 |
commit | 134f86e8d5c414409631b25b8c6f0ee45fbd8631 (patch) | |
tree | 216b89d3fb89acfb81be1e440c25c41ab09fa96d /OpenSim/Region/CoreModules/Agent/AssetTransaction | |
parent | More changing to production grid. Double oops. (diff) | |
download | opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.zip opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.gz opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.bz2 opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.xz |
Initial update to OpenSim 0.8.2.1 source code.
Diffstat (limited to 'OpenSim/Region/CoreModules/Agent/AssetTransaction')
3 files changed, 24 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs index 0271738..f56d17d 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs | |||
@@ -33,6 +33,7 @@ using OpenSim.Framework; | |||
33 | 33 | ||
34 | using OpenSim.Region.Framework.Scenes; | 34 | using OpenSim.Region.Framework.Scenes; |
35 | using OpenSim.Services.Interfaces; | 35 | using OpenSim.Services.Interfaces; |
36 | using OpenSim.Region.Framework.Interfaces; | ||
36 | 37 | ||
37 | namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | 38 | namespace OpenSim.Region.CoreModules.Agent.AssetTransaction |
38 | { | 39 | { |
@@ -119,6 +120,14 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
119 | } | 120 | } |
120 | else | 121 | else |
121 | { | 122 | { |
123 | // Check if the xfer is a terrain xfer | ||
124 | IEstateModule estateModule = m_Scene.RequestModuleInterface<IEstateModule>(); | ||
125 | if (estateModule != null) | ||
126 | { | ||
127 | if (estateModule.IsTerrainXfer(xferID)) | ||
128 | return; | ||
129 | } | ||
130 | |||
122 | m_log.ErrorFormat( | 131 | m_log.ErrorFormat( |
123 | "[AGENT ASSET TRANSACTIONS]: Could not find uploader for xfer id {0}, packet id {1}, data length {2}", | 132 | "[AGENT ASSET TRANSACTIONS]: Could not find uploader for xfer id {0}, packet id {1}, data length {2}", |
124 | xferID, packetID, data.Length); | 133 | xferID, packetID, data.Length); |
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs index d1ad74f..b67c0df 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs | |||
@@ -42,7 +42,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
42 | public class AssetTransactionModule : INonSharedRegionModule, | 42 | public class AssetTransactionModule : INonSharedRegionModule, |
43 | IAgentAssetTransactions | 43 | IAgentAssetTransactions |
44 | { | 44 | { |
45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 45 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
46 | 46 | ||
47 | protected Scene m_Scene; | 47 | protected Scene m_Scene; |
48 | private bool m_dumpAssetsToFile = false; | 48 | private bool m_dumpAssetsToFile = false; |
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs index 11efe6d..5143204 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs | |||
@@ -31,8 +31,10 @@ using System.Reflection; | |||
31 | using log4net; | 31 | using log4net; |
32 | using OpenMetaverse; | 32 | using OpenMetaverse; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Region.Framework.Interfaces; | ||
34 | using OpenSim.Region.Framework.Scenes; | 35 | using OpenSim.Region.Framework.Scenes; |
35 | using OpenSim.Services.Interfaces; | 36 | using OpenSim.Services.Interfaces; |
37 | using PermissionMask = OpenSim.Framework.PermissionMask; | ||
36 | 38 | ||
37 | namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | 39 | namespace OpenSim.Region.CoreModules.Agent.AssetTransaction |
38 | { | 40 | { |
@@ -317,12 +319,14 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
317 | m_asset.Description = item.Description; | 319 | m_asset.Description = item.Description; |
318 | m_asset.Type = (sbyte)item.AssetType; | 320 | m_asset.Type = (sbyte)item.AssetType; |
319 | 321 | ||
320 | // We must always store the item at this point even if the asset hasn't finished uploading, in order | 322 | if (m_asset.FullID != UUID.Zero) |
321 | // to avoid a race condition when the appearance module retrieves the item to set the asset id in | 323 | { |
322 | // the AvatarAppearance structure. | 324 | // We must always store the item at this point even if the asset hasn't finished uploading, in order |
323 | item.AssetID = m_asset.FullID; | 325 | // to avoid a race condition when the appearance module retrieves the item to set the asset id in |
324 | if (item.AssetID != UUID.Zero) | 326 | // the AvatarAppearance structure. |
327 | item.AssetID = m_asset.FullID; | ||
325 | m_Scene.InventoryService.UpdateItem(item); | 328 | m_Scene.InventoryService.UpdateItem(item); |
329 | } | ||
326 | 330 | ||
327 | if (m_uploadState == UploadState.Complete) | 331 | if (m_uploadState == UploadState.Complete) |
328 | { | 332 | { |
@@ -375,6 +379,8 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
375 | m_Scene.AssetService.Store(m_asset); | 379 | m_Scene.AssetService.Store(m_asset); |
376 | 380 | ||
377 | m_transactions.RemoveXferUploader(m_transactionID); | 381 | m_transactions.RemoveXferUploader(m_transactionID); |
382 | |||
383 | m_Scene.EventManager.TriggerOnNewInventoryItemUploadComplete(ourClient.AgentId, (AssetType)type, m_asset.FullID, m_asset.Name, 0); | ||
378 | } | 384 | } |
379 | 385 | ||
380 | /// <summary> | 386 | /// <summary> |
@@ -406,8 +412,8 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
406 | item.AssetType = type; | 412 | item.AssetType = type; |
407 | item.InvType = invType; | 413 | item.InvType = invType; |
408 | item.Folder = InventFolder; | 414 | item.Folder = InventFolder; |
409 | item.BasePermissions = 0x7fffffff; | 415 | item.BasePermissions = (uint)(PermissionMask.All | PermissionMask.Export); |
410 | item.CurrentPermissions = 0x7fffffff; | 416 | item.CurrentPermissions = item.BasePermissions; |
411 | item.GroupPermissions=0; | 417 | item.GroupPermissions=0; |
412 | item.EveryOnePermissions=0; | 418 | item.EveryOnePermissions=0; |
413 | item.NextPermissions = nextPerm; | 419 | item.NextPermissions = nextPerm; |
@@ -421,5 +427,6 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
421 | 427 | ||
422 | m_transactions.RemoveXferUploader(m_transactionID); | 428 | m_transactions.RemoveXferUploader(m_transactionID); |
423 | } | 429 | } |
430 | |||
424 | } | 431 | } |
425 | } \ No newline at end of file | 432 | } \ No newline at end of file |