From f05f583613850ef480d7be6a74220da0507e8b9b Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 8 Feb 2008 22:39:08 +0000 Subject: Still chasing logout memory leak. Putting in small changes and temporary light verbosity to this end --- .../Framework/Communications/Cache/AssetTransactions.cs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'OpenSim/Framework/Communications') diff --git a/OpenSim/Framework/Communications/Cache/AssetTransactions.cs b/OpenSim/Framework/Communications/Cache/AssetTransactions.cs index d09e343..4a75f52 100644 --- a/OpenSim/Framework/Communications/Cache/AssetTransactions.cs +++ b/OpenSim/Framework/Communications/Cache/AssetTransactions.cs @@ -103,12 +103,22 @@ namespace OpenSim.Framework.Communications.Cache } } + /// + /// Get an uploaded asset. If the data is successfully retrieved, the transaction will be removed. + /// + /// + /// The asset if the upload has completed, null if it has not. public AssetBase GetTransactionAsset(LLUUID transactionID) { if (XferUploaders.ContainsKey(transactionID)) { - return XferUploaders[transactionID].GetAssetData(); + AssetXferUploader uploader = XferUploaders[transactionID]; + AssetBase asset = uploader.GetAssetData(); + XferUploaders.Remove(transactionID); + + return asset; } + return null; } @@ -237,6 +247,7 @@ namespace OpenSim.Framework.Communications.Cache SaveAssetToFile(filename, Asset.Data); } } + ///Left this in and commented in case there are unforseen issues //private void SaveAssetToFile(string filename, byte[] data) //{ @@ -311,10 +322,6 @@ namespace OpenSim.Framework.Communications.Cache } } - public void UpdateInventoryItem(LLUUID itemID) - { - } - public AssetBase GetAssetData() { if (m_finished) -- cgit v1.1