diff options
author | Melanie | 2013-01-27 00:20:34 +0100 |
---|---|---|
committer | Melanie | 2013-01-27 00:20:34 +0100 |
commit | 380b017e3295eaf30a4a96c23faed5be78495256 (patch) | |
tree | 215d0cf08ca8dfcf473b308e3c4871444cee94f7 | |
parent | Reinstate cleaning objects from parcel when avatars sit on them. Instead do it (diff) | |
download | opensim-SC-380b017e3295eaf30a4a96c23faed5be78495256.zip opensim-SC-380b017e3295eaf30a4a96c23faed5be78495256.tar.gz opensim-SC-380b017e3295eaf30a4a96c23faed5be78495256.tar.bz2 opensim-SC-380b017e3295eaf30a4a96c23faed5be78495256.tar.xz |
Prevent items being destroyed by rename operations. Renaming of a wearable also
sends an asset transaciton but it is empty. So we can't ignore name data
when a transaction is present and can't treat every transaction as valid.
-rw-r--r-- | OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 13 |
2 files changed, 9 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs index 0aa4693..43b8b44 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs | |||
@@ -339,7 +339,8 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
339 | // to avoid a race condition when the appearance module retrieves the item to set the asset id in | 339 | // to avoid a race condition when the appearance module retrieves the item to set the asset id in |
340 | // the AvatarAppearance structure. | 340 | // the AvatarAppearance structure. |
341 | item.AssetID = m_asset.FullID; | 341 | item.AssetID = m_asset.FullID; |
342 | m_Scene.InventoryService.UpdateItem(item); | 342 | if (item.AssetID != UUID.Zero) |
343 | m_Scene.InventoryService.UpdateItem(item); | ||
343 | 344 | ||
344 | if (m_uploadState == UploadState.Complete) | 345 | if (m_uploadState == UploadState.Complete) |
345 | { | 346 | { |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index c9d1205..4130029 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -401,17 +401,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
401 | if (item.Owner != remoteClient.AgentId) | 401 | if (item.Owner != remoteClient.AgentId) |
402 | return; | 402 | return; |
403 | 403 | ||
404 | if (UUID.Zero == transactionID) | 404 | item.Flags = (item.Flags & ~(uint)255) | (itemUpd.Flags & (uint)255); |
405 | { | 405 | item.Name = itemUpd.Name; |
406 | item.Flags = (item.Flags & ~(uint)255) | (itemUpd.Flags & (uint)255); | 406 | item.Description = itemUpd.Description; |
407 | item.Name = itemUpd.Name; | ||
408 | item.Description = itemUpd.Description; | ||
409 | 407 | ||
410 | // m_log.DebugFormat( | 408 | // m_log.DebugFormat( |
411 | // "[USER INVENTORY]: itemUpd {0} {1} {2} {3}, item {4} {5} {6} {7}", | 409 | // "[USER INVENTORY]: itemUpd {0} {1} {2} {3}, item {4} {5} {6} {7}", |
412 | // itemUpd.NextPermissions, itemUpd.GroupPermissions, itemUpd.EveryOnePermissions, item.Flags, | 410 | // itemUpd.NextPermissions, itemUpd.GroupPermissions, itemUpd.EveryOnePermissions, item.Flags, |
413 | // item.NextPermissions, item.GroupPermissions, item.EveryOnePermissions, item.CurrentPermissions); | 411 | // item.NextPermissions, item.GroupPermissions, item.EveryOnePermissions, item.CurrentPermissions); |
414 | 412 | ||
413 | if (itemUpd.NextPermissions != 0) // Use this to determine validity. Can never be 0 if valid | ||
414 | { | ||
415 | if (item.NextPermissions != (itemUpd.NextPermissions & item.BasePermissions)) | 415 | if (item.NextPermissions != (itemUpd.NextPermissions & item.BasePermissions)) |
416 | item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteNextOwner; | 416 | item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteNextOwner; |
417 | item.NextPermissions = itemUpd.NextPermissions & item.BasePermissions; | 417 | item.NextPermissions = itemUpd.NextPermissions & item.BasePermissions; |
@@ -446,7 +446,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
446 | 446 | ||
447 | InventoryService.UpdateItem(item); | 447 | InventoryService.UpdateItem(item); |
448 | } | 448 | } |
449 | else | 449 | |
450 | if (UUID.Zero != transactionID) | ||
450 | { | 451 | { |
451 | if (AgentTransactionsModule != null) | 452 | if (AgentTransactionsModule != null) |
452 | { | 453 | { |