aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications')
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetTransactions.cs17
1 files changed, 12 insertions, 5 deletions
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
103 } 103 }
104 } 104 }
105 105
106 /// <summary>
107 /// Get an uploaded asset. If the data is successfully retrieved, the transaction will be removed.
108 /// </summary>
109 /// <param name="transactionID"></param>
110 /// <returns>The asset if the upload has completed, null if it has not.</returns>
106 public AssetBase GetTransactionAsset(LLUUID transactionID) 111 public AssetBase GetTransactionAsset(LLUUID transactionID)
107 { 112 {
108 if (XferUploaders.ContainsKey(transactionID)) 113 if (XferUploaders.ContainsKey(transactionID))
109 { 114 {
110 return XferUploaders[transactionID].GetAssetData(); 115 AssetXferUploader uploader = XferUploaders[transactionID];
116 AssetBase asset = uploader.GetAssetData();
117 XferUploaders.Remove(transactionID);
118
119 return asset;
111 } 120 }
121
112 return null; 122 return null;
113 } 123 }
114 124
@@ -237,6 +247,7 @@ namespace OpenSim.Framework.Communications.Cache
237 SaveAssetToFile(filename, Asset.Data); 247 SaveAssetToFile(filename, Asset.Data);
238 } 248 }
239 } 249 }
250
240 ///Left this in and commented in case there are unforseen issues 251 ///Left this in and commented in case there are unforseen issues
241 //private void SaveAssetToFile(string filename, byte[] data) 252 //private void SaveAssetToFile(string filename, byte[] data)
242 //{ 253 //{
@@ -311,10 +322,6 @@ namespace OpenSim.Framework.Communications.Cache
311 } 322 }
312 } 323 }
313 324
314 public void UpdateInventoryItem(LLUUID itemID)
315 {
316 }
317
318 public AssetBase GetAssetData() 325 public AssetBase GetAssetData()
319 { 326 {
320 if (m_finished) 327 if (m_finished)