Fix deletion persistence when freshly delinked prims are removed

Previously, Scene.Inventory.DeRezObjects() forced the persistence of prims before deletion.
This is necessary so that freshly delinked prims can be deleted (otherwise they remain as parts of their old group and reappear on server restart).
However, DeRezObjects() deleted to user inventory, which is not required by llDie() or direct region module unlink and deletion.
Therefore, forced persistence has been pushed down into Scene.UnlinkSceneObject() to be more general, this is still on the DeRezObjects() path.

Uncommented TestDelinkPersistence() since this now passes.
Tests required considerable elaboration of MockRegionDataPlugin to reflect underlying storing of parts.
This commit is contained in:
Justin Clark-Casey (justincc)
2010-09-07 00:34:06 +01:00
committed by Melanie
parent e55f6d47e9
commit 3d033520fa
10 changed files with 129 additions and 57 deletions

View File

@@ -1720,7 +1720,7 @@ namespace OpenSim.Region.Framework.Scenes
public virtual void DeRezObject(IClientAPI remoteClient, uint localID,
UUID groupID, DeRezAction action, UUID destinationID)
{
DeRezObjects(remoteClient, new List<uint>() { localID} , groupID, action, destinationID);
DeRezObjects(remoteClient, new List<uint>() { localID }, groupID, action, destinationID);
}
public virtual void DeRezObjects(IClientAPI remoteClient, List<uint> localIDs,
@@ -1757,11 +1757,6 @@ namespace OpenSim.Region.Framework.Scenes
deleteIDs.Add(localID);
deleteGroups.Add(grp);
// Force a database backup/update on this SceneObjectGroup
// So that we know the database is upto date,
// for when deleting the object from it
ForceSceneObjectBackup(grp);
if (remoteClient == null)
{
// Autoreturn has a null client. Nothing else does. So