aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2013-01-27 01:07:37 +0000
committerJustin Clark-Casey (justincc)2013-02-08 21:29:15 +0000
commiteab57cdd13b11523f4b83c7479a74309142bb56e (patch)
treee6ddd663e7adb496bdb7f2331f88582cb3758c1e /OpenSim/Region
parentFix issue where the "set terrain texture" console command did not tell the vi... (diff)
downloadopensim-SC_OLD-eab57cdd13b11523f4b83c7479a74309142bb56e.zip
opensim-SC_OLD-eab57cdd13b11523f4b83c7479a74309142bb56e.tar.gz
opensim-SC_OLD-eab57cdd13b11523f4b83c7479a74309142bb56e.tar.bz2
opensim-SC_OLD-eab57cdd13b11523f4b83c7479a74309142bb56e.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. Conflicts: OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs3
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs11
2 files changed, 8 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
index 8add4bb..11efe6d 100644
--- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
+++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
@@ -321,7 +321,8 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
321 // to avoid a race condition when the appearance module retrieves the item to set the asset id in 321 // to avoid a race condition when the appearance module retrieves the item to set the asset id in
322 // the AvatarAppearance structure. 322 // the AvatarAppearance structure.
323 item.AssetID = m_asset.FullID; 323 item.AssetID = m_asset.FullID;
324 m_Scene.InventoryService.UpdateItem(item); 324 if (item.AssetID != UUID.Zero)
325 m_Scene.InventoryService.UpdateItem(item);
325 326
326 if (m_uploadState == UploadState.Complete) 327 if (m_uploadState == UploadState.Complete)
327 { 328 {
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 5c8b097..a6db4de 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -407,16 +407,16 @@ namespace OpenSim.Region.Framework.Scenes
407 if (item.Owner != remoteClient.AgentId) 407 if (item.Owner != remoteClient.AgentId)
408 return; 408 return;
409 409
410 if (UUID.Zero == transactionID) 410 item.Name = itemUpd.Name;
411 { 411 item.Description = itemUpd.Description;
412 item.Name = itemUpd.Name;
413 item.Description = itemUpd.Description;
414 412
415// m_log.DebugFormat( 413// m_log.DebugFormat(
416// "[USER INVENTORY]: itemUpd {0} {1} {2} {3}, item {4} {5} {6} {7}", 414// "[USER INVENTORY]: itemUpd {0} {1} {2} {3}, item {4} {5} {6} {7}",
417// itemUpd.NextPermissions, itemUpd.GroupPermissions, itemUpd.EveryOnePermissions, item.Flags, 415// itemUpd.NextPermissions, itemUpd.GroupPermissions, itemUpd.EveryOnePermissions, item.Flags,
418// item.NextPermissions, item.GroupPermissions, item.EveryOnePermissions, item.CurrentPermissions); 416// item.NextPermissions, item.GroupPermissions, item.EveryOnePermissions, item.CurrentPermissions);
419 417
418 if (itemUpd.NextPermissions != 0) // Use this to determine validity. Can never be 0 if valid
419 {
420 if (item.NextPermissions != (itemUpd.NextPermissions & item.BasePermissions)) 420 if (item.NextPermissions != (itemUpd.NextPermissions & item.BasePermissions))
421 item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteNextOwner; 421 item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteNextOwner;
422 item.NextPermissions = itemUpd.NextPermissions & item.BasePermissions; 422 item.NextPermissions = itemUpd.NextPermissions & item.BasePermissions;
@@ -451,7 +451,8 @@ namespace OpenSim.Region.Framework.Scenes
451 451
452 InventoryService.UpdateItem(item); 452 InventoryService.UpdateItem(item);
453 } 453 }
454 else 454
455 if (UUID.Zero != transactionID)
455 { 456 {
456 if (AgentTransactionsModule != null) 457 if (AgentTransactionsModule != null)
457 { 458 {