From 8f58a9a107047bf9d9aff4d8c25171acaa8e9805 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Mon, 3 Dec 2007 20:06:01 +0000 Subject: 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. --- OpenSim/Framework/IClientAPI.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index a3177f7..68a0591 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -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 /// /// Tell the client that we have created the item it requested. /// - /// + /// void SendInventoryItemCreateUpdate(InventoryItemBase Item); void SendRemoveInventoryItem(LLUUID itemID); -- cgit v1.1