mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user