diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs | 21 |
1 files changed, 14 insertions, 7 deletions
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 |