aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache/AssetTransactions.cs
diff options
context:
space:
mode:
authorMW2007-08-26 17:57:25 +0000
committerMW2007-08-26 17:57:25 +0000
commit291eb48fb0338d80e3baeed65664d7a72fea1892 (patch)
tree8fa18a9474cb998a2e20fa9a124979b01bd41a8f /OpenSim/Framework/Communications/Cache/AssetTransactions.cs
parentDanxors patch for >30prims with ODE (diff)
downloadopensim-SC-291eb48fb0338d80e3baeed65664d7a72fea1892.zip
opensim-SC-291eb48fb0338d80e3baeed65664d7a72fea1892.tar.gz
opensim-SC-291eb48fb0338d80e3baeed65664d7a72fea1892.tar.bz2
opensim-SC-291eb48fb0338d80e3baeed65664d7a72fea1892.tar.xz
Another attempt to fix the image sending bug (next week, I intend to rewrite the assetcache and asset server).
Attempt to fix bug # 326. (crashing when using save-xml and hollow prims) Attempt to fix bug # 328 (limit of 50 items in a folder)
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/AssetTransactions.cs')
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetTransactions.cs9
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 }