aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorAdam Frisby2008-05-01 16:23:53 +0000
committerAdam Frisby2008-05-01 16:23:53 +0000
commit01f31fd933bbaec246d2fef5756b7d83be7980e0 (patch)
tree45ce7727e83238bf492924bea3ff5f0b6c82acbc /OpenSim/Framework
parent* In ur code. Making it static. (diff)
downloadopensim-SC-01f31fd933bbaec246d2fef5756b7d83be7980e0.zip
opensim-SC-01f31fd933bbaec246d2fef5756b7d83be7980e0.tar.gz
opensim-SC-01f31fd933bbaec246d2fef5756b7d83be7980e0.tar.bz2
opensim-SC-01f31fd933bbaec246d2fef5756b7d83be7980e0.tar.xz
* Breaking all the code, breaking all the code..!
* Made a bunch more members static, removed some dead code, general cleaning.
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs8
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetCache.cs2
-rw-r--r--OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs2
-rw-r--r--OpenSim/Framework/Communications/Capabilities/Caps.cs8
-rw-r--r--OpenSim/Framework/Communications/LoginResponse.cs2
-rw-r--r--OpenSim/Framework/Communications/LoginService.cs2
-rw-r--r--OpenSim/Framework/Communications/RestClient.cs4
-rw-r--r--OpenSim/Framework/ConfigurationMember.cs2
-rw-r--r--OpenSim/Framework/Console/ConsoleBase.cs2
-rw-r--r--OpenSim/Framework/Console/OpenSimAppender.cs2
-rw-r--r--OpenSim/Framework/PacketPool.cs4
-rw-r--r--OpenSim/Framework/Remoting.cs2
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs8
-rw-r--r--OpenSim/Framework/Servers/BinaryStreamHandler.cs2
14 files changed, 25 insertions, 25 deletions
diff --git a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs
index 0cc10c4..945163c 100644
--- a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs
+++ b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
43 { 43 {
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 45
46 protected AssetBase CreateAsset(string assetIdStr, string name, string path, bool isImage) 46 protected static AssetBase CreateAsset(string assetIdStr, string name, string path, bool isImage)
47 { 47 {
48 AssetBase asset = new AssetBase( 48 AssetBase asset = new AssetBase(
49 new LLUUID(assetIdStr), 49 new LLUUID(assetIdStr),
@@ -64,7 +64,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
64 return asset; 64 return asset;
65 } 65 }
66 66
67 protected void LoadAsset(AssetBase info, bool image, string path) 67 protected static void LoadAsset(AssetBase info, bool image, string path)
68 { 68 {
69 FileInfo fInfo = new FileInfo(path); 69 FileInfo fInfo = new FileInfo(path);
70 long numBytes = fInfo.Length; 70 long numBytes = fInfo.Length;
@@ -119,9 +119,9 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
119 /// <summary> 119 /// <summary>
120 /// Use the asset set information at path to load assets 120 /// Use the asset set information at path to load assets
121 /// </summary> 121 /// </summary>
122 /// <param name="path"></param> 122 /// <param name="assetSetPath"></param>
123 /// <param name="assets"></param> 123 /// <param name="assets"></param>
124 protected void LoadXmlAssetSet(string assetSetPath, List<AssetBase> assets) 124 protected static void LoadXmlAssetSet(string assetSetPath, List<AssetBase> assets)
125 { 125 {
126 m_log.InfoFormat("[ASSETS]: Loading asset set {0}", assetSetPath); 126 m_log.InfoFormat("[ASSETS]: Loading asset set {0}", assetSetPath);
127 127
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs
index c81ea35..69e0437 100644
--- a/OpenSim/Framework/Communications/Cache/AssetCache.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs
@@ -542,7 +542,7 @@ namespace OpenSim.Framework.Communications.Cache
542 /// </summary> 542 /// </summary>
543 /// <param name="data"></param> 543 /// <param name="data"></param>
544 /// <returns></returns> 544 /// <returns></returns>
545 private int CalculateNumPackets(byte[] data) 545 private static int CalculateNumPackets(byte[] data)
546 { 546 {
547 const uint m_maxPacketSize = 600; 547 const uint m_maxPacketSize = 600;
548 int numPackets = 1; 548 int numPackets = 1;
diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
index a39738d..b3852c0 100644
--- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
+++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
@@ -241,7 +241,7 @@ namespace OpenSim.Framework.Communications.Cache
241 /// <param name="path"></param> 241 /// <param name="path"></param>
242 /// <param name="fileDescription"></param> 242 /// <param name="fileDescription"></param>
243 /// <param name="action"></param> 243 /// <param name="action"></param>
244 private void LoadFromFile(string path, string fileDescription, ConfigAction action) 244 private static void LoadFromFile(string path, string fileDescription, ConfigAction action)
245 { 245 {
246 if (File.Exists(path)) 246 if (File.Exists(path))
247 { 247 {
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs
index b6ee04d..8061e28 100644
--- a/OpenSim/Framework/Communications/Capabilities/Caps.cs
+++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs
@@ -378,7 +378,7 @@ namespace OpenSim.Framework.Communications.Capabilities
378 /// 378 ///
379 /// </summary> 379 /// </summary>
380 /// <returns></returns> 380 /// <returns></returns>
381 protected LLSDMapLayer GetLLSDMapLayerResponse() 381 protected static LLSDMapLayer GetLLSDMapLayerResponse()
382 { 382 {
383 LLSDMapLayer mapLayer = new LLSDMapLayer(); 383 LLSDMapLayer mapLayer = new LLSDMapLayer();
384 mapLayer.Right = 5000; 384 mapLayer.Right = 5000;
@@ -758,7 +758,7 @@ namespace OpenSim.Framework.Communications.Capabilities
758 // bw.Close(); 758 // bw.Close();
759 // fs.Close(); 759 // fs.Close();
760 //} 760 //}
761 private void SaveAssetToFile(string filename, byte[] data) 761 private static void SaveAssetToFile(string filename, byte[] data)
762 { 762 {
763 string assetPath = "UserAssets"; 763 string assetPath = "UserAssets";
764 if (!Directory.Exists(assetPath)) 764 if (!Directory.Exists(assetPath))
@@ -840,7 +840,7 @@ namespace OpenSim.Framework.Communications.Capabilities
840 // bw.Close(); 840 // bw.Close();
841 // fs.Close(); 841 // fs.Close();
842 //} 842 //}
843 private void SaveAssetToFile(string filename, byte[] data) 843 private static void SaveAssetToFile(string filename, byte[] data)
844 { 844 {
845 string assetPath = "UserAssets"; 845 string assetPath = "UserAssets";
846 if (!Directory.Exists(assetPath)) 846 if (!Directory.Exists(assetPath))
@@ -945,7 +945,7 @@ namespace OpenSim.Framework.Communications.Capabilities
945 // bw.Close(); 945 // bw.Close();
946 // fs.Close(); 946 // fs.Close();
947 //} 947 //}
948 private void SaveAssetToFile(string filename, byte[] data) 948 private static void SaveAssetToFile(string filename, byte[] data)
949 { 949 {
950 string assetPath = "UserAssets"; 950 string assetPath = "UserAssets";
951 if (!Directory.Exists(assetPath)) 951 if (!Directory.Exists(assetPath))
diff --git a/OpenSim/Framework/Communications/LoginResponse.cs b/OpenSim/Framework/Communications/LoginResponse.cs
index f7989ab..b6f1f69 100644
--- a/OpenSim/Framework/Communications/LoginResponse.cs
+++ b/OpenSim/Framework/Communications/LoginResponse.cs
@@ -496,7 +496,7 @@ namespace OpenSim.Framework.Communications
496 return llsdBack; 496 return llsdBack;
497 } 497 }
498 498
499 private LLSDArray WrapLLSDMap(LLSDMap wrapMe) 499 private static LLSDArray WrapLLSDMap(LLSDMap wrapMe)
500 { 500 {
501 LLSDArray array = new LLSDArray(); 501 LLSDArray array = new LLSDArray();
502 array.Add(wrapMe); 502 array.Add(wrapMe);
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs
index db4e2ec..fa78a30 100644
--- a/OpenSim/Framework/Communications/LoginService.cs
+++ b/OpenSim/Framework/Communications/LoginService.cs
@@ -728,7 +728,7 @@ namespace OpenSim.Framework.Communications
728 return m_welcomeMessage; 728 return m_welcomeMessage;
729 } 729 }
730 730
731 private LoginResponse.BuddyList ConvertFriendListItem(List<FriendListItem> LFL) 731 private static LoginResponse.BuddyList ConvertFriendListItem(List<FriendListItem> LFL)
732 { 732 {
733 LoginResponse.BuddyList buddylistreturn = new LoginResponse.BuddyList(); 733 LoginResponse.BuddyList buddylistreturn = new LoginResponse.BuddyList();
734 foreach (FriendListItem fl in LFL) 734 foreach (FriendListItem fl in LFL)
diff --git a/OpenSim/Framework/Communications/RestClient.cs b/OpenSim/Framework/Communications/RestClient.cs
index 91284e8..b0b7b1e 100644
--- a/OpenSim/Framework/Communications/RestClient.cs
+++ b/OpenSim/Framework/Communications/RestClient.cs
@@ -164,7 +164,7 @@ namespace OpenSim.Framework.Communications
164 /// </summary> 164 /// </summary>
165 /// <param name="s">string to be examined</param> 165 /// <param name="s">string to be examined</param>
166 /// <returns>true if slash is present</returns> 166 /// <returns>true if slash is present</returns>
167 private bool isSlashed(string s) 167 private static bool isSlashed(string s)
168 { 168 {
169 return s.Substring(s.Length - 1, 1) == "/"; 169 return s.Substring(s.Length - 1, 1) == "/";
170 } 170 }
@@ -196,7 +196,7 @@ namespace OpenSim.Framework.Communications
196 sb.Append("&"); 196 sb.Append("&");
197 197
198 sb.Append(kv.Key); 198 sb.Append(kv.Key);
199 if (kv.Value != null && kv.Value.Length != 0) 199 if (!string.IsNullOrEmpty(kv.Value))
200 { 200 {
201 sb.Append("="); 201 sb.Append("=");
202 sb.Append(kv.Value); 202 sb.Append(kv.Value);
diff --git a/OpenSim/Framework/ConfigurationMember.cs b/OpenSim/Framework/ConfigurationMember.cs
index 91b87a5..b452794 100644
--- a/OpenSim/Framework/ConfigurationMember.cs
+++ b/OpenSim/Framework/ConfigurationMember.cs
@@ -472,7 +472,7 @@ namespace OpenSim.Framework
472 } 472 }
473 } 473 }
474 474
475 private IGenericConfig LoadConfigDll(string dllName) 475 private static IGenericConfig LoadConfigDll(string dllName)
476 { 476 {
477 Assembly pluginAssembly = Assembly.LoadFrom(dllName); 477 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
478 IGenericConfig plug = null; 478 IGenericConfig plug = null;
diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs
index 0b22d0e..b336545 100644
--- a/OpenSim/Framework/Console/ConsoleBase.cs
+++ b/OpenSim/Framework/Console/ConsoleBase.cs
@@ -66,7 +66,7 @@ namespace OpenSim.Framework.Console
66 /// </summary> 66 /// </summary>
67 /// <param name="input">arbitrary string for input</param> 67 /// <param name="input">arbitrary string for input</param>
68 /// <returns>an ansii color</returns> 68 /// <returns>an ansii color</returns>
69 private ConsoleColor DeriveColor(string input) 69 private static ConsoleColor DeriveColor(string input)
70 { 70 {
71 int colIdx = (input.ToUpper().GetHashCode() % 6) + 9; 71 int colIdx = (input.ToUpper().GetHashCode() % 6) + 9;
72 return (ConsoleColor) colIdx; 72 return (ConsoleColor) colIdx;
diff --git a/OpenSim/Framework/Console/OpenSimAppender.cs b/OpenSim/Framework/Console/OpenSimAppender.cs
index 86df3c0..d381179 100644
--- a/OpenSim/Framework/Console/OpenSimAppender.cs
+++ b/OpenSim/Framework/Console/OpenSimAppender.cs
@@ -101,7 +101,7 @@ namespace OpenSim.Framework.Console
101 } 101 }
102 } 102 }
103 103
104 private ConsoleColor DeriveColor(string input) 104 private static ConsoleColor DeriveColor(string input)
105 { 105 {
106 int colIdx = (input.ToUpper().GetHashCode() % 6) + 9; 106 int colIdx = (input.ToUpper().GetHashCode() % 6) + 9;
107 return (ConsoleColor) colIdx; 107 return (ConsoleColor) colIdx;
diff --git a/OpenSim/Framework/PacketPool.cs b/OpenSim/Framework/PacketPool.cs
index be56cdc..5eac9de 100644
--- a/OpenSim/Framework/PacketPool.cs
+++ b/OpenSim/Framework/PacketPool.cs
@@ -89,7 +89,7 @@ namespace OpenSim.Framework
89 89
90 public Packet GetPacket(PacketType type) 90 public Packet GetPacket(PacketType type)
91 { 91 {
92 Packet packet = null; 92 Packet packet;
93 93
94 lock (pool) 94 lock (pool)
95 { 95 {
@@ -109,7 +109,7 @@ namespace OpenSim.Framework
109 } 109 }
110 110
111 // private byte[] decoded_header = new byte[10]; 111 // private byte[] decoded_header = new byte[10];
112 private PacketType GetType(byte[] bytes) 112 private static PacketType GetType(byte[] bytes)
113 { 113 {
114 byte[] decoded_header = new byte[10 + 8]; 114 byte[] decoded_header = new byte[10 + 8];
115 ushort id; 115 ushort id;
diff --git a/OpenSim/Framework/Remoting.cs b/OpenSim/Framework/Remoting.cs
index 7f18221..cb0911e 100644
--- a/OpenSim/Framework/Remoting.cs
+++ b/OpenSim/Framework/Remoting.cs
@@ -123,7 +123,7 @@ namespace OpenSim.Framework
123 /// <param name="a">A</param> 123 /// <param name="a">A</param>
124 /// <param name="b">B</param> 124 /// <param name="b">B</param>
125 /// <returns>C</returns> 125 /// <returns>C</returns>
126 private byte[] AppendArrays(byte[] a, byte[] b) 126 private static byte[] AppendArrays(byte[] a, byte[] b)
127 { 127 {
128 byte[] c = new byte[a.Length + b.Length]; 128 byte[] c = new byte[a.Length + b.Length];
129 Buffer.BlockCopy(a, 0, c, 0, a.Length); 129 Buffer.BlockCopy(a, 0, c, 0, a.Length);
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index 7c268ed..088d944 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -496,7 +496,7 @@ namespace OpenSim.Framework.Servers
496 } 496 }
497 } 497 }
498 498
499 private void DoHTTPGruntWork(Hashtable responsedata, HttpListenerResponse response) 499 private static void DoHTTPGruntWork(Hashtable responsedata, HttpListenerResponse response)
500 { 500 {
501 int responsecode = (int)responsedata["int_response_code"]; 501 int responsecode = (int)responsedata["int_response_code"];
502 string responseString = (string)responsedata["str_response_string"]; 502 string responseString = (string)responsedata["str_response_string"];
@@ -505,7 +505,7 @@ namespace OpenSim.Framework.Servers
505 //Even though only one other part of the entire code uses HTTPHandlers, we shouldn't expect this 505 //Even though only one other part of the entire code uses HTTPHandlers, we shouldn't expect this
506 //and should check for NullReferenceExceptions 506 //and should check for NullReferenceExceptions
507 507
508 if (contentType == null || contentType == "") 508 if (string.IsNullOrEmpty(contentType))
509 { 509 {
510 contentType = "text/html"; 510 contentType = "text/html";
511 } 511 }
@@ -677,12 +677,12 @@ namespace OpenSim.Framework.Servers
677 } 677 }
678 678
679 // Fallback HTTP responses in case the HTTP error response files don't exist 679 // Fallback HTTP responses in case the HTTP error response files don't exist
680 private string getDefaultHTTP404(string host) 680 private static string getDefaultHTTP404(string host)
681 { 681 {
682 return "<HTML><HEAD><TITLE>404 Page not found</TITLE><BODY><BR /><H1>Ooops!</H1><P>The page you requested has been obsconded with by knomes. Find hippos quick!</P><P>If you are trying to log-in, your link parameters should have: &quot;-loginpage http://" + host + "/?method=login -loginuri http://" + host + "/&quot; in your link </P></BODY></HTML>"; 682 return "<HTML><HEAD><TITLE>404 Page not found</TITLE><BODY><BR /><H1>Ooops!</H1><P>The page you requested has been obsconded with by knomes. Find hippos quick!</P><P>If you are trying to log-in, your link parameters should have: &quot;-loginpage http://" + host + "/?method=login -loginuri http://" + host + "/&quot; in your link </P></BODY></HTML>";
683 } 683 }
684 684
685 private string getDefaultHTTP500() 685 private static string getDefaultHTTP500()
686 { 686 {
687 return "<HTML><HEAD><TITLE>500 Internal Server Error</TITLE><BODY><BR /><H1>Ooops!</H1><P>The server you requested is overun by knomes! Find hippos quick!</P></BODY></HTML>"; 687 return "<HTML><HEAD><TITLE>500 Internal Server Error</TITLE><BODY><BR /><H1>Ooops!</H1><P>The server you requested is overun by knomes! Find hippos quick!</P></BODY></HTML>";
688 } 688 }
diff --git a/OpenSim/Framework/Servers/BinaryStreamHandler.cs b/OpenSim/Framework/Servers/BinaryStreamHandler.cs
index bfa3bd5..dcd1cba 100644
--- a/OpenSim/Framework/Servers/BinaryStreamHandler.cs
+++ b/OpenSim/Framework/Servers/BinaryStreamHandler.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Framework.Servers
51 m_method = binaryMethod; 51 m_method = binaryMethod;
52 } 52 }
53 53
54 private byte[] ReadFully(Stream stream) 54 private static byte[] ReadFully(Stream stream)
55 { 55 {
56 byte[] buffer = new byte[32768]; 56 byte[] buffer = new byte[32768];
57 using (MemoryStream ms = new MemoryStream()) 57 using (MemoryStream ms = new MemoryStream())