More on mantis #4869. This fixes the problem of objects showing up as no copy when they are copy-able. It works, but I have no idea what I'm doing.

prebuild-update
Diva Canto 2010-07-14 06:57:56 -07:00
parent d64c09160c
commit 87fb19162e
1 changed files with 9 additions and 0 deletions

View File

@ -276,6 +276,7 @@ namespace OpenSim.Region.Framework.Scenes
{ {
if (UUID.Zero == transactionID) if (UUID.Zero == transactionID)
{ {
m_log.DebugFormat("[XXX] UUID.Zero = transactionID");
item.Name = itemUpd.Name; item.Name = itemUpd.Name;
item.Description = itemUpd.Description; item.Description = itemUpd.Description;
item.NextPermissions = itemUpd.NextPermissions & item.BasePermissions; item.NextPermissions = itemUpd.NextPermissions & item.BasePermissions;
@ -302,6 +303,7 @@ namespace OpenSim.Region.Framework.Scenes
} }
else else
{ {
m_log.DebugFormat("[XXX] UUID.Zero != transactionID");
IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>(); IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>();
if (agentTransactions != null) if (agentTransactions != null)
{ {
@ -386,6 +388,7 @@ namespace OpenSim.Region.Framework.Scenes
if (Permissions.PropagatePermissions() && recipient != senderId) if (Permissions.PropagatePermissions() && recipient != senderId)
{ {
m_log.Debug("[XXX] Permissions.PropagatePermissions()");
// Trying to do this right this time. This is evil. If // Trying to do this right this time. This is evil. If
// you believe in Good, go elsewhere. Vampires and other // you believe in Good, go elsewhere. Vampires and other
// evil creatores only beyond this point. You have been // evil creatores only beyond this point. You have been
@ -449,12 +452,18 @@ namespace OpenSim.Region.Framework.Scenes
(uint)PermissionMask.Modify) != 0 ? (uint)PermissionMask.Modify) != 0 ?
true : false; true : false;
bool isRootCopy = (item.CurrentPermissions &
(uint)PermissionMask.Copy) != 0 ?
true : false;
// Mask the owner perms to the folded perms // Mask the owner perms to the folded perms
ownerPerms &= foldedPerms; ownerPerms &= foldedPerms;
// If the root was mod, let the mask reflect that // If the root was mod, let the mask reflect that
if (isRootMod) if (isRootMod)
ownerPerms |= (uint)PermissionMask.Modify; ownerPerms |= (uint)PermissionMask.Modify;
if (isRootCopy)
ownerPerms |= (uint)PermissionMask.Copy;
} }
// These will be applied to the root prim at next rez. // These will be applied to the root prim at next rez.