aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache
diff options
context:
space:
mode:
authorAdam Frisby2008-01-15 02:09:55 +0000
committerAdam Frisby2008-01-15 02:09:55 +0000
commitb25f9f322cdbcde7fd8c043137bf07992e5ef318 (patch)
tree7c1a5115b2849dfe388b825dd271271d347f9574 /OpenSim/Framework/Communications/Cache
parentSet svn:eol-style. (diff)
downloadopensim-SC_OLD-b25f9f322cdbcde7fd8c043137bf07992e5ef318.zip
opensim-SC_OLD-b25f9f322cdbcde7fd8c043137bf07992e5ef318.tar.gz
opensim-SC_OLD-b25f9f322cdbcde7fd8c043137bf07992e5ef318.tar.bz2
opensim-SC_OLD-b25f9f322cdbcde7fd8c043137bf07992e5ef318.tar.xz
* Mother of all commits:
* Cleaned up copyright notices in AssemblyInfo.cs's * Added Copyright headers to a bunch of files missing them * Replaced several common string instances with a static constant to prevent reallocation of the same strings thousands of times. "" -> String.Empty is the first such candidate.
Diffstat (limited to 'OpenSim/Framework/Communications/Cache')
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetCache.cs2
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetTransactions.cs22
-rw-r--r--OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs8
3 files changed, 16 insertions, 16 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs
index 988c558..6d9a0d6 100644
--- a/OpenSim/Framework/Communications/Cache/AssetCache.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs
@@ -208,7 +208,7 @@ namespace OpenSim.Framework.Communications.Cache
208 /// <param name="asset"></param> 208 /// <param name="asset"></param>
209 public void AddAsset(AssetBase asset) 209 public void AddAsset(AssetBase asset)
210 { 210 {
211 string temporary = asset.Temporary ? "temporary" : ""; 211 string temporary = asset.Temporary ? "temporary" : String.Empty;
212 string type = asset.Type == 0 ? "texture" : "asset"; 212 string type = asset.Type == 0 ? "texture" : "asset";
213 213
214 string result = "Ignored"; 214 string result = "Ignored";
diff --git a/OpenSim/Framework/Communications/Cache/AssetTransactions.cs b/OpenSim/Framework/Communications/Cache/AssetTransactions.cs
index dd1f8ba..74e2093 100644
--- a/OpenSim/Framework/Communications/Cache/AssetTransactions.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetTransactions.cs
@@ -123,8 +123,8 @@ namespace OpenSim.Framework.Communications.Cache
123 public LLUUID TransactionID = LLUUID.Zero; 123 public LLUUID TransactionID = LLUUID.Zero;
124 public bool UploadComplete; 124 public bool UploadComplete;
125 public ulong XferID; 125 public ulong XferID;
126 private string m_name = ""; 126 private string m_name = String.Empty;
127 private string m_description = ""; 127 private string m_description = String.Empty;
128 private sbyte type = 0; 128 private sbyte type = 0;
129 private sbyte invType = 0; 129 private sbyte invType = 0;
130 private uint nextPerm = 0; 130 private uint nextPerm = 0;
@@ -331,12 +331,12 @@ namespace OpenSim.Framework.Communications.Cache
331 // Fields 331 // Fields
332 private BaseHttpServer httpListener; 332 private BaseHttpServer httpListener;
333 private LLUUID inventoryItemID; 333 private LLUUID inventoryItemID;
334 private string m_assetDescription = ""; 334 private string m_assetDescription = String.Empty;
335 private string m_assetName = ""; 335 private string m_assetName = String.Empty;
336 private LLUUID m_folderID; 336 private LLUUID m_folderID;
337 private LLUUID newAssetID; 337 private LLUUID newAssetID;
338 private bool m_dumpImageToFile; 338 private bool m_dumpImageToFile;
339 private string uploaderPath = ""; 339 private string uploaderPath = String.Empty;
340 340
341 // Events 341 // Events
342 public event UpLoadedAsset OnUpLoad; 342 public event UpLoadedAsset OnUpLoad;
@@ -367,7 +367,7 @@ namespace OpenSim.Framework.Communications.Cache
367 public string uploaderCaps(byte[] data, string path, string param) 367 public string uploaderCaps(byte[] data, string path, string param)
368 { 368 {
369 LLUUID inventoryItemID = this.inventoryItemID; 369 LLUUID inventoryItemID = this.inventoryItemID;
370 string text = ""; 370 string text = String.Empty;
371 LLSDAssetUploadComplete complete = new LLSDAssetUploadComplete(); 371 LLSDAssetUploadComplete complete = new LLSDAssetUploadComplete();
372 complete.new_asset = newAssetID.ToString(); 372 complete.new_asset = newAssetID.ToString();
373 complete.new_inventory_item = inventoryItemID; 373 complete.new_inventory_item = inventoryItemID;
@@ -380,7 +380,7 @@ namespace OpenSim.Framework.Communications.Cache
380 } 380 }
381 if (OnUpLoad != null) 381 if (OnUpLoad != null)
382 { 382 {
383 OnUpLoad(m_assetName, "description", newAssetID, inventoryItemID, LLUUID.Zero, data, "", ""); 383 OnUpLoad(m_assetName, "description", newAssetID, inventoryItemID, LLUUID.Zero, data, String.Empty, String.Empty);
384 } 384 }
385 return text; 385 return text;
386 } 386 }
@@ -391,10 +391,10 @@ namespace OpenSim.Framework.Communications.Cache
391 // Fields 391 // Fields
392 private BaseHttpServer httpListener; 392 private BaseHttpServer httpListener;
393 private LLUUID inventoryItemID; 393 private LLUUID inventoryItemID;
394 private string m_assetName = ""; 394 private string m_assetName = String.Empty;
395 private LLUUID newAssetID; 395 private LLUUID newAssetID;
396 private bool SaveImages = false; 396 private bool SaveImages = false;
397 private string uploaderPath = ""; 397 private string uploaderPath = String.Empty;
398 398
399 // Events 399 // Events
400 public event UpLoadedAsset OnUpLoad; 400 public event UpLoadedAsset OnUpLoad;
@@ -420,7 +420,7 @@ namespace OpenSim.Framework.Communications.Cache
420 public string uploaderCaps(byte[] data, string path, string param) 420 public string uploaderCaps(byte[] data, string path, string param)
421 { 421 {
422 LLUUID inventoryItemID = this.inventoryItemID; 422 LLUUID inventoryItemID = this.inventoryItemID;
423 string text = ""; 423 string text = String.Empty;
424 LLSDAssetUploadComplete complete = new LLSDAssetUploadComplete(); 424 LLSDAssetUploadComplete complete = new LLSDAssetUploadComplete();
425 complete.new_asset = newAssetID.ToString(); 425 complete.new_asset = newAssetID.ToString();
426 complete.new_inventory_item = inventoryItemID; 426 complete.new_inventory_item = inventoryItemID;
@@ -433,7 +433,7 @@ namespace OpenSim.Framework.Communications.Cache
433 } 433 }
434 if (OnUpLoad != null) 434 if (OnUpLoad != null)
435 { 435 {
436 OnUpLoad(m_assetName, "description", newAssetID, inventoryItemID, LLUUID.Zero, data, "", ""); 436 OnUpLoad(m_assetName, "description", newAssetID, inventoryItemID, LLUUID.Zero, data, String.Empty, String.Empty);
437 } 437 }
438 return text; 438 return text;
439 } 439 }
diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
index 46ae9ce..ae07898 100644
--- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
+++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
@@ -152,13 +152,13 @@ namespace OpenSim.Framework.Communications.Cache
152 { 152 {
153 string foldersPath 153 string foldersPath
154 = Path.Combine( 154 = Path.Combine(
155 Util.inventoryDir(), config.GetString("foldersFile", "")); 155 Util.inventoryDir(), config.GetString("foldersFile", System.String.Empty));
156 156
157 LoadFromFile(foldersPath, "Library folders", ReadFolderFromConfig); 157 LoadFromFile(foldersPath, "Library folders", ReadFolderFromConfig);
158 158
159 string itemsPath 159 string itemsPath
160 = Path.Combine( 160 = Path.Combine(
161 Util.inventoryDir(), config.GetString("itemsFile", "")); 161 Util.inventoryDir(), config.GetString("itemsFile", System.String.Empty));
162 162
163 LoadFromFile(itemsPath, "Library items", ReadItemFromConfig); 163 LoadFromFile(itemsPath, "Library items", ReadItemFromConfig);
164 } 164 }
@@ -210,8 +210,8 @@ namespace OpenSim.Framework.Communications.Cache
210 item.inventoryID = new LLUUID(config.GetString("inventoryID", folderID.ToString())); 210 item.inventoryID = new LLUUID(config.GetString("inventoryID", folderID.ToString()));
211 item.assetID = new LLUUID(config.GetString("assetID", LLUUID.Random().ToString())); 211 item.assetID = new LLUUID(config.GetString("assetID", LLUUID.Random().ToString()));
212 item.parentFolderID = new LLUUID(config.GetString("folderID", folderID.ToString())); 212 item.parentFolderID = new LLUUID(config.GetString("folderID", folderID.ToString()));
213 item.inventoryDescription = config.GetString("description", ""); 213 item.inventoryDescription = config.GetString("description", System.String.Empty);
214 item.inventoryName = config.GetString("name", ""); 214 item.inventoryName = config.GetString("name", System.String.Empty);
215 item.assetType = config.GetInt("assetType", 0); 215 item.assetType = config.GetInt("assetType", 0);
216 item.invType = config.GetInt("inventoryType", 0); 216 item.invType = config.GetInt("inventoryType", 0);
217 item.inventoryCurrentPermissions = (uint)config.GetLong("currentPermissions", 0x7FFFFFFF); 217 item.inventoryCurrentPermissions = (uint)config.GetLong("currentPermissions", 0x7FFFFFFF);