From Justin Casey (IBM)

While exploring what it would take to get the 'new script' button working,
I encountered the fact, some way down in the rabbit hole, that if a user
renamed an item in their inventory and logged out (without a restart of
the simulator), on log in the new name was not preserved.

As far as I can see, this was because any updates which didn't occur
inside a transaction were ignored by opensim.  This patch pays attention
to those changes.  It generates a new asset when an item is updated and
changes the user's inventory properties appropriately.  I believe this
behaviour is in line with the copy-on-write semantics used in the Second
Life protocol - perhaps it could be optimized if we knew for sure that the
only copy of the object was in the user's inventory.

This also means that if you rename an item (e.g. a script) before you drag
it into an object's inventory, the inventory will receive the item's most
recent name and description.
This commit is contained in:
Sean Dague
2007-12-03 20:06:01 +00:00
parent 5061808afc
commit 8f58a9a107
5 changed files with 120 additions and 51 deletions

View File

@@ -310,8 +310,9 @@ namespace OpenSim.Framework
public delegate void RequestTaskInventory(IClientAPI remoteClient, uint localID);
public delegate void UpdateInventoryItemTransaction(
IClientAPI remoteClient, LLUUID transactionID, LLUUID assetID, LLUUID itemID);
public delegate void UpdateInventoryItem(
IClientAPI remoteClient, LLUUID transactionID, LLUUID itemID, string name, string description,
uint nextOwnerMask);
public delegate void CopyInventoryItem(
IClientAPI remoteClient, uint callbackID, LLUUID oldAgentID, LLUUID oldItemID, LLUUID newFolderID, string newName);
@@ -392,7 +393,7 @@ namespace OpenSim.Framework
event FetchInventoryDescendents OnFetchInventoryDescendents;
event FetchInventory OnFetchInventory;
event RequestTaskInventory OnRequestTaskInventory;
event UpdateInventoryItemTransaction OnUpdateInventoryItem;
event UpdateInventoryItem OnUpdateInventoryItem;
event CopyInventoryItem OnCopyInventoryItem;
event UDPAssetUploadRequest OnAssetUploadRequest;
event XferReceive OnXferReceive;
@@ -417,6 +418,8 @@ namespace OpenSim.Framework
LLUUID AgentId { get; }
LLUUID SessionId { get; }
LLUUID SecureSessionId { get; }
string FirstName { get; }
@@ -481,7 +484,7 @@ namespace OpenSim.Framework
/// <summary>
/// Tell the client that we have created the item it requested.
/// </summary>
/// <param name="Item"></param>
/// <param name="Item"></param>
void SendInventoryItemCreateUpdate(InventoryItemBase Item);
void SendRemoveInventoryItem(LLUUID itemID);