diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index 58983d0029..df8c34a141 100755 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs @@ -709,7 +709,7 @@ namespace OpenSim.Region.CoreModules.Asset long heap = 0; //if (m_LogLevel >= 2) { - m_log.InfoFormat("[FLOTSAM ASSET CACHE]: Start background expiring files older then {0}.", purgeLine); + m_log.InfoFormat("[FLOTSAM ASSET CACHE]: Start background expiring files older than {0}.", purgeLine); heap = GC.GetTotalMemory(false); } @@ -1456,7 +1456,7 @@ namespace OpenSim.Region.CoreModules.Asset else if (cmdparams.Length == 1) { con.Output("fcache assets - Attempt a deep cache of all assets in all scenes"); - con.Output("fcache expire - Purge assets older then the specified date & time"); + con.Output("fcache expire - Purge assets older than the specified date & time"); con.Output("fcache clear [file] [memory] - Remove cached assets"); con.Output("fcache status - Display cache status"); con.Output("fcache cachedefaultassets - loads default assets to cache replacing existent ones, this may override grid assets. Use with care"); diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index 81b9e1c2c5..bb69351404 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs @@ -200,7 +200,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer } copyID = folderCopy.ID; - copyID.ToBytes(im.binaryBucket,1); im.imSessionID = copyID.Guid; if (recipientAgent != null) @@ -231,7 +230,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer } copyID = itemCopy.ID; - copyID.ToBytes(im.binaryBucket, 1); if (recipientAgent != null) recipientAgent.ControllingClient.SendBulkUpdateInventory(itemCopy); @@ -243,6 +241,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer // in their inventory, so it will not be lost if // they are offline. + im.binaryBucket = new byte[17]; + im.binaryBucket[0] = (byte)assetType; + copyID.ToBytes(im.binaryBucket, 1); + if (recipientAgent != null) { im.offline = 0; @@ -451,33 +453,42 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer if (im.binaryBucket.Length < 17) // Invalid return; - UUID recipientID = new UUID(im.toAgentID); - // First byte is the asset type AssetType assetType = (AssetType)im.binaryBucket[0]; + if (assetType == AssetType.LinkFolder || assetType == AssetType.Link) + return; + + UUID recipientID = new UUID(im.toAgentID); + UUID copyID; if (AssetType.Folder == assetType) { UUID folderID = new UUID(im.binaryBucket, 1); - InventoryFolderBase folder = - scene.InventoryService.GetFolder(recipientID, folderID); + InventoryFolderBase folder = scene.InventoryService.GetFolder(recipientID, folderID); - if (folder != null) - user.ControllingClient.SendBulkUpdateInventory(folder); + if (folder == null) + return; + + copyID = folder.ID; + user.ControllingClient.SendBulkUpdateInventory(folder); } else { UUID itemID = new UUID(im.binaryBucket, 1); - InventoryItemBase item = - scene.InventoryService.GetItem(recipientID, itemID); + InventoryItemBase item = scene.InventoryService.GetItem(recipientID, itemID); - if (item != null) - { - user.ControllingClient.SendBulkUpdateInventory(item); - } + if (item == null) + return; + user.ControllingClient.SendBulkUpdateInventory(item); + copyID = item.ID; } + + im.binaryBucket = new byte[17]; + im.binaryBucket[0] = (byte)assetType; + copyID.ToBytes(im.binaryBucket, 1); + user.ControllingClient.SendInstantMessage(im); break; }