diff options
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/AssetTransactions.cs')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/AssetTransactions.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetTransactions.cs b/OpenSim/Framework/Communications/Cache/AssetTransactions.cs index 4cde5f6..63623a4 100644 --- a/OpenSim/Framework/Communications/Cache/AssetTransactions.cs +++ b/OpenSim/Framework/Communications/Cache/AssetTransactions.cs | |||
@@ -189,6 +189,7 @@ namespace OpenSim.Framework.Communications.Caches | |||
189 | private bool m_finished = false; | 189 | private bool m_finished = false; |
190 | private bool m_createItem = false; | 190 | private bool m_createItem = false; |
191 | private AgentAssetTransactions m_userTransactions; | 191 | private AgentAssetTransactions m_userTransactions; |
192 | private bool m_storeLocal; | ||
192 | 193 | ||
193 | public AssetXferUploader(AgentAssetTransactions transactions) | 194 | public AssetXferUploader(AgentAssetTransactions transactions) |
194 | { | 195 | { |
@@ -224,7 +225,7 @@ namespace OpenSim.Framework.Communications.Caches | |||
224 | } | 225 | } |
225 | } | 226 | } |
226 | 227 | ||
227 | public void Initialise(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data) | 228 | public void Initialise(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data, bool storeLocal) |
228 | { | 229 | { |
229 | this.ourClient = remoteClient; | 230 | this.ourClient = remoteClient; |
230 | this.Asset = new AssetBase(); | 231 | this.Asset = new AssetBase(); |
@@ -235,6 +236,7 @@ namespace OpenSim.Framework.Communications.Caches | |||
235 | this.Asset.Name = "blank"; | 236 | this.Asset.Name = "blank"; |
236 | this.Asset.Description = "empty"; | 237 | this.Asset.Description = "empty"; |
237 | this.TransactionID = transaction; | 238 | this.TransactionID = transaction; |
239 | this.m_storeLocal = storeLocal; | ||
238 | if (this.Asset.Data.Length > 2) | 240 | if (this.Asset.Data.Length > 2) |
239 | { | 241 | { |
240 | this.SendCompleteMessage(); | 242 | this.SendCompleteMessage(); |
@@ -271,6 +273,11 @@ namespace OpenSim.Framework.Communications.Caches | |||
271 | { | 273 | { |
272 | DoCreateItem(); | 274 | DoCreateItem(); |
273 | } | 275 | } |
276 | else if (m_storeLocal) | ||
277 | { | ||
278 | this.m_userTransactions.Manager.CommsManager.AssetCache.AddAsset(this.Asset); | ||
279 | } | ||
280 | |||
274 | // Console.WriteLine("upload complete "+ this.TransactionID); | 281 | // Console.WriteLine("upload complete "+ this.TransactionID); |
275 | //SaveAssetToFile("testudpupload" + Util.RandomClass.Next(1, 1000) + ".dat", this.Asset.Data); | 282 | //SaveAssetToFile("testudpupload" + Util.RandomClass.Next(1, 1000) + ".dat", this.Asset.Data); |
276 | } | 283 | } |