diff options
author | Adam Frisby | 2008-05-01 16:23:53 +0000 |
---|---|---|
committer | Adam Frisby | 2008-05-01 16:23:53 +0000 |
commit | 01f31fd933bbaec246d2fef5756b7d83be7980e0 (patch) | |
tree | 45ce7727e83238bf492924bea3ff5f0b6c82acbc /OpenSim | |
parent | * In ur code. Making it static. (diff) | |
download | opensim-SC_OLD-01f31fd933bbaec246d2fef5756b7d83be7980e0.zip opensim-SC_OLD-01f31fd933bbaec246d2fef5756b7d83be7980e0.tar.gz opensim-SC_OLD-01f31fd933bbaec246d2fef5756b7d83be7980e0.tar.bz2 opensim-SC_OLD-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 'OpenSim')
25 files changed, 59 insertions, 70 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs index 9a610a4..9908735 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs | |||
@@ -1352,7 +1352,7 @@ namespace OpenSim.Data.SQLite | |||
1352 | * | 1352 | * |
1353 | **********************************************************************/ | 1353 | **********************************************************************/ |
1354 | 1354 | ||
1355 | private SqliteCommand createInsertCommand(string table, DataTable dt) | 1355 | private static SqliteCommand createInsertCommand(string table, DataTable dt) |
1356 | { | 1356 | { |
1357 | /** | 1357 | /** |
1358 | * This is subtle enough to deserve some commentary. | 1358 | * This is subtle enough to deserve some commentary. |
@@ -1387,7 +1387,7 @@ namespace OpenSim.Data.SQLite | |||
1387 | return cmd; | 1387 | return cmd; |
1388 | } | 1388 | } |
1389 | 1389 | ||
1390 | private SqliteCommand createUpdateCommand(string table, string pk, DataTable dt) | 1390 | private static SqliteCommand createUpdateCommand(string table, string pk, DataTable dt) |
1391 | { | 1391 | { |
1392 | string sql = "update " + table + " set "; | 1392 | string sql = "update " + table + " set "; |
1393 | string subsql = String.Empty; | 1393 | string subsql = String.Empty; |
@@ -1415,7 +1415,7 @@ namespace OpenSim.Data.SQLite | |||
1415 | } | 1415 | } |
1416 | 1416 | ||
1417 | 1417 | ||
1418 | private string defineTable(DataTable dt) | 1418 | private static string defineTable(DataTable dt) |
1419 | { | 1419 | { |
1420 | string sql = "create table " + dt.TableName + "("; | 1420 | string sql = "create table " + dt.TableName + "("; |
1421 | string subsql = String.Empty; | 1421 | string subsql = String.Empty; |
@@ -1457,7 +1457,7 @@ namespace OpenSim.Data.SQLite | |||
1457 | /// for us. | 1457 | /// for us. |
1458 | ///</summary> | 1458 | ///</summary> |
1459 | ///<returns>a built sqlite parameter</returns> | 1459 | ///<returns>a built sqlite parameter</returns> |
1460 | private SqliteParameter createSqliteParameter(string name, Type type) | 1460 | private static SqliteParameter createSqliteParameter(string name, Type type) |
1461 | { | 1461 | { |
1462 | SqliteParameter param = new SqliteParameter(); | 1462 | SqliteParameter param = new SqliteParameter(); |
1463 | param.ParameterName = ":" + name; | 1463 | param.ParameterName = ":" + name; |
diff --git a/OpenSim/Data/SQLite/SQLiteUserData.cs b/OpenSim/Data/SQLite/SQLiteUserData.cs index 7f017b7..6891373 100644 --- a/OpenSim/Data/SQLite/SQLiteUserData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserData.cs | |||
@@ -784,7 +784,7 @@ namespace OpenSim.Data.SQLite | |||
784 | conn.Close(); | 784 | conn.Close(); |
785 | } | 785 | } |
786 | 786 | ||
787 | private bool TestTables(SqliteConnection conn) | 787 | private static bool TestTables(SqliteConnection conn) |
788 | { | 788 | { |
789 | SqliteCommand cmd = new SqliteCommand(userSelect, conn); | 789 | SqliteCommand cmd = new SqliteCommand(userSelect, conn); |
790 | SqliteCommand fcmd = new SqliteCommand(userFriendsSelect, conn); | 790 | SqliteCommand fcmd = new SqliteCommand(userFriendsSelect, conn); |
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: "-loginpage http://" + host + "/?method=login -loginuri http://" + host + "/" 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: "-loginpage http://" + host + "/?method=login -loginuri http://" + host + "/" 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()) |
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs index ee2f129..7eb9c34 100644 --- a/OpenSim/Grid/GridServer/GridManager.cs +++ b/OpenSim/Grid/GridServer/GridManager.cs | |||
@@ -78,8 +78,6 @@ namespace OpenSim.Grid.GridServer | |||
78 | m_log.Info("[DATA]: Added IGridData Interface"); | 78 | m_log.Info("[DATA]: Added IGridData Interface"); |
79 | } | 79 | } |
80 | 80 | ||
81 | typeInterface = null; | ||
82 | |||
83 | // Logs go here | 81 | // Logs go here |
84 | typeInterface = pluginType.GetInterface("ILogData", true); | 82 | typeInterface = pluginType.GetInterface("ILogData", true); |
85 | 83 | ||
@@ -91,12 +89,8 @@ namespace OpenSim.Grid.GridServer | |||
91 | _logplugins.Add(plug.getName(), plug); | 89 | _logplugins.Add(plug.getName(), plug); |
92 | m_log.Info("[DATA]: Added ILogData Interface"); | 90 | m_log.Info("[DATA]: Added ILogData Interface"); |
93 | } | 91 | } |
94 | |||
95 | typeInterface = null; | ||
96 | } | 92 | } |
97 | } | 93 | } |
98 | |||
99 | pluginAssembly = null; | ||
100 | } | 94 | } |
101 | 95 | ||
102 | /// <summary> | 96 | /// <summary> |
@@ -274,7 +268,7 @@ namespace OpenSim.Grid.GridServer | |||
274 | sim.regionSendKey == Config.SimRecvKey); | 268 | sim.regionSendKey == Config.SimRecvKey); |
275 | } | 269 | } |
276 | 270 | ||
277 | private XmlRpcResponse ErrorResponse(string error) | 271 | private static XmlRpcResponse ErrorResponse(string error) |
278 | { | 272 | { |
279 | XmlRpcResponse errorResponse = new XmlRpcResponse(); | 273 | XmlRpcResponse errorResponse = new XmlRpcResponse(); |
280 | Hashtable errorResponseData = new Hashtable(); | 274 | Hashtable errorResponseData = new Hashtable(); |
@@ -609,7 +603,7 @@ namespace OpenSim.Grid.GridServer | |||
609 | response.Value = responseData; | 603 | response.Value = responseData; |
610 | 604 | ||
611 | //RegionProfileData TheSim = null; | 605 | //RegionProfileData TheSim = null; |
612 | string uuid = String.Empty; ; | 606 | string uuid; |
613 | Hashtable requestData = (Hashtable)request.Params[0]; | 607 | Hashtable requestData = (Hashtable)request.Params[0]; |
614 | 608 | ||
615 | if (requestData.ContainsKey("UUID")) | 609 | if (requestData.ContainsKey("UUID")) |
@@ -744,8 +738,7 @@ namespace OpenSim.Grid.GridServer | |||
744 | response.Value = responseData; | 738 | response.Value = responseData; |
745 | IList simProfileList = new ArrayList(); | 739 | IList simProfileList = new ArrayList(); |
746 | 740 | ||
747 | bool fastMode = false; // MySQL Only | 741 | bool fastMode = (Config.DatabaseProvider == "OpenSim.Data.MySQL.dll"); |
748 | fastMode = (Config.DatabaseProvider == "OpenSim.Data.MySQL.dll"); | ||
749 | 742 | ||
750 | if (fastMode) | 743 | if (fastMode) |
751 | { | 744 | { |
diff --git a/OpenSim/Grid/InventoryServer/InventoryManager.cs b/OpenSim/Grid/InventoryServer/InventoryManager.cs index 1d4a4e3..5c65317 100644 --- a/OpenSim/Grid/InventoryServer/InventoryManager.cs +++ b/OpenSim/Grid/InventoryServer/InventoryManager.cs | |||
@@ -71,12 +71,8 @@ namespace OpenSim.Grid.InventoryServer | |||
71 | "Invenstorage: Added IInventoryData Interface"); | 71 | "Invenstorage: Added IInventoryData Interface"); |
72 | break; | 72 | break; |
73 | } | 73 | } |
74 | |||
75 | typeInterface = null; | ||
76 | } | 74 | } |
77 | } | 75 | } |
78 | |||
79 | pluginAssembly = null; | ||
80 | } | 76 | } |
81 | 77 | ||
82 | protected static SerializableInventory loadInventoryFromXmlFile(string fileName) | 78 | protected static SerializableInventory loadInventoryFromXmlFile(string fileName) |
diff --git a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs index 729d262..528b51c 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs | |||
@@ -80,14 +80,14 @@ namespace OpenSim.Grid.ScriptServer | |||
80 | Console.ReadLine(); | 80 | Console.ReadLine(); |
81 | } | 81 | } |
82 | 82 | ||
83 | private void RPC_ReceiveCommand(int ID, string Command, object[] p) | 83 | private static void RPC_ReceiveCommand(int ID, string Command, object[] p) |
84 | { | 84 | { |
85 | m_log.Info("[SERVER]: Received command: '" + Command + "'"); | 85 | m_log.Info("[SERVER]: Received command: '" + Command + "'"); |
86 | if (p != null) | 86 | if (p != null) |
87 | { | 87 | { |
88 | for (int i = 0; i < p.Length; i++) | 88 | for (int i = 0; i < p.Length; i++) |
89 | { | 89 | { |
90 | m_log.Info("[SERVER]: Param " + i + ": " + p[i].ToString()); | 90 | m_log.Info("[SERVER]: Param " + i + ": " + p[i]); |
91 | } | 91 | } |
92 | } | 92 | } |
93 | 93 | ||
diff --git a/OpenSim/Grid/UserServer/MessageServersConnector.cs b/OpenSim/Grid/UserServer/MessageServersConnector.cs index 22505cb..28f5c4c 100644 --- a/OpenSim/Grid/UserServer/MessageServersConnector.cs +++ b/OpenSim/Grid/UserServer/MessageServersConnector.cs | |||
@@ -209,7 +209,7 @@ namespace OpenSim.Grid.UserServer | |||
209 | XmlRpcRequest GridReq = new XmlRpcRequest("logout_of_simulator", SendParams); | 209 | XmlRpcRequest GridReq = new XmlRpcRequest("logout_of_simulator", SendParams); |
210 | try | 210 | try |
211 | { | 211 | { |
212 | XmlRpcResponse GridResp = GridReq.Send(serv.URI, 6000); | 212 | GridReq.Send(serv.URI, 6000); |
213 | } | 213 | } |
214 | catch (WebException) | 214 | catch (WebException) |
215 | { | 215 | { |
@@ -243,7 +243,7 @@ namespace OpenSim.Grid.UserServer | |||
243 | XmlRpcRequest GridReq = new XmlRpcRequest("login_to_simulator", SendParams); | 243 | XmlRpcRequest GridReq = new XmlRpcRequest("login_to_simulator", SendParams); |
244 | try | 244 | try |
245 | { | 245 | { |
246 | XmlRpcResponse GridResp = GridReq.Send(serv.URI, 6000); | 246 | GridReq.Send(serv.URI, 6000); |
247 | m_log.Info("[LOGIN]: Notified : " + serv.URI + " about user login"); | 247 | m_log.Info("[LOGIN]: Notified : " + serv.URI + " about user login"); |
248 | } | 248 | } |
249 | catch (WebException) | 249 | catch (WebException) |
diff --git a/OpenSim/Region/ClientStack/PacketQueue.cs b/OpenSim/Region/ClientStack/PacketQueue.cs index 54c9fdc..7101b4c 100644 --- a/OpenSim/Region/ClientStack/PacketQueue.cs +++ b/OpenSim/Region/ClientStack/PacketQueue.cs | |||
@@ -377,9 +377,9 @@ namespace OpenSim.Region.ClientStack | |||
377 | } | 377 | } |
378 | 378 | ||
379 | 379 | ||
380 | private int ScaleThrottle(int value, int curmax, int newmax) | 380 | private static int ScaleThrottle(int value, int curmax, int newmax) |
381 | { | 381 | { |
382 | return (int) (((float) value/(float) curmax)*newmax); | 382 | return (value / curmax) * newmax; |
383 | } | 383 | } |
384 | 384 | ||
385 | public byte[] GetThrottlesPacked(float multiplier) | 385 | public byte[] GetThrottlesPacked(float multiplier) |
diff --git a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs index 40de537..f3b3a20 100644 --- a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs +++ b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs | |||
@@ -653,7 +653,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin | |||
653 | GC.Collect(); | 653 | GC.Collect(); |
654 | } | 654 | } |
655 | 655 | ||
656 | internal void BulletXMessage(string message, bool isWarning) | 656 | internal static void BulletXMessage(string message, bool isWarning) |
657 | { | 657 | { |
658 | PhysicsPluginManager.PhysicsPluginMessage("[Modified BulletX]:\t" + message, isWarning); | 658 | PhysicsPluginManager.PhysicsPluginMessage("[Modified BulletX]:\t" + message, isWarning); |
659 | } | 659 | } |
@@ -1455,7 +1455,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin | |||
1455 | } | 1455 | } |
1456 | catch (Exception ex) | 1456 | catch (Exception ex) |
1457 | { | 1457 | { |
1458 | _parent_scene.BulletXMessage(_parent_scene.is_ex_message + ex.Message, true); | 1458 | BulletXScene.BulletXMessage(_parent_scene.is_ex_message + ex.Message, true); |
1459 | rigidBody.ActivationState = ActivationState.DisableSimulation; | 1459 | rigidBody.ActivationState = ActivationState.DisableSimulation; |
1460 | _parent_scene.AddForgottenRigidBody(rigidBody); | 1460 | _parent_scene.AddForgottenRigidBody(rigidBody); |
1461 | } | 1461 | } |
@@ -1532,10 +1532,10 @@ namespace OpenSim.Region.Physics.BulletXPlugin | |||
1532 | } | 1532 | } |
1533 | catch (Exception ex) | 1533 | catch (Exception ex) |
1534 | { | 1534 | { |
1535 | _parentscene.BulletXMessage(ex.Message, true); | 1535 | BulletXScene.BulletXMessage(ex.Message, true); |
1536 | } | 1536 | } |
1537 | } | 1537 | } |
1538 | _parentscene.BulletXMessage("BulletXPlanet created.", false); | 1538 | BulletXScene.BulletXMessage("BulletXPlanet created.", false); |
1539 | } | 1539 | } |
1540 | 1540 | ||
1541 | internal float HeightValue(Vector3 position) | 1541 | internal float HeightValue(Vector3 position) |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs index 7dad7ee..f3af621 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs | |||
@@ -66,7 +66,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
66 | StartThread(); | 66 | StartThread(); |
67 | } | 67 | } |
68 | 68 | ||
69 | private void StartThread() | 69 | private static void StartThread() |
70 | { | 70 | { |
71 | if (cmdHandlerThread == null) | 71 | if (cmdHandlerThread == null) |
72 | { | 72 | { |
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs index c4a721e..39babd6 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs | |||
@@ -343,7 +343,7 @@ namespace OpenSim.DataStore.MSSQL | |||
343 | dt.Columns.Add(col); | 343 | dt.Columns.Add(col); |
344 | } | 344 | } |
345 | 345 | ||
346 | private DataTable createTerrainTable() | 346 | private static DataTable createTerrainTable() |
347 | { | 347 | { |
348 | DataTable terrain = new DataTable("terrain"); | 348 | DataTable terrain = new DataTable("terrain"); |
349 | 349 | ||
@@ -354,7 +354,7 @@ namespace OpenSim.DataStore.MSSQL | |||
354 | return terrain; | 354 | return terrain; |
355 | } | 355 | } |
356 | 356 | ||
357 | private DataTable createPrimTable() | 357 | private static DataTable createPrimTable() |
358 | { | 358 | { |
359 | DataTable prims = new DataTable("prims"); | 359 | DataTable prims = new DataTable("prims"); |
360 | 360 | ||
@@ -418,7 +418,7 @@ namespace OpenSim.DataStore.MSSQL | |||
418 | return prims; | 418 | return prims; |
419 | } | 419 | } |
420 | 420 | ||
421 | private DataTable createShapeTable() | 421 | private static DataTable createShapeTable() |
422 | { | 422 | { |
423 | DataTable shapes = new DataTable("primshapes"); | 423 | DataTable shapes = new DataTable("primshapes"); |
424 | createCol(shapes, "UUID", typeof (String)); | 424 | createCol(shapes, "UUID", typeof (String)); |
@@ -619,7 +619,7 @@ namespace OpenSim.DataStore.MSSQL | |||
619 | } | 619 | } |
620 | } | 620 | } |
621 | 621 | ||
622 | private PrimitiveBaseShape buildShape(DataRow row) | 622 | private static PrimitiveBaseShape buildShape(DataRow row) |
623 | { | 623 | { |
624 | PrimitiveBaseShape s = new PrimitiveBaseShape(); | 624 | PrimitiveBaseShape s = new PrimitiveBaseShape(); |
625 | s.Scale = new LLVector3( | 625 | s.Scale = new LLVector3( |
@@ -675,7 +675,7 @@ namespace OpenSim.DataStore.MSSQL | |||
675 | return s; | 675 | return s; |
676 | } | 676 | } |
677 | 677 | ||
678 | private void fillShapeRow(DataRow row, SceneObjectPart prim) | 678 | private static void fillShapeRow(DataRow row, SceneObjectPart prim) |
679 | { | 679 | { |
680 | PrimitiveBaseShape s = prim.Shape; | 680 | PrimitiveBaseShape s = prim.Shape; |
681 | row["UUID"] = prim.UUID; | 681 | row["UUID"] = prim.UUID; |
@@ -770,7 +770,7 @@ namespace OpenSim.DataStore.MSSQL | |||
770 | * | 770 | * |
771 | **********************************************************************/ | 771 | **********************************************************************/ |
772 | 772 | ||
773 | private SqlCommand createInsertCommand(string table, DataTable dt) | 773 | private static SqlCommand createInsertCommand(string table, DataTable dt) |
774 | { | 774 | { |
775 | /** | 775 | /** |
776 | * This is subtle enough to deserve some commentary. | 776 | * This is subtle enough to deserve some commentary. |
@@ -804,7 +804,7 @@ namespace OpenSim.DataStore.MSSQL | |||
804 | return cmd; | 804 | return cmd; |
805 | } | 805 | } |
806 | 806 | ||
807 | private SqlCommand createUpdateCommand(string table, string pk, DataTable dt) | 807 | private static SqlCommand createUpdateCommand(string table, string pk, DataTable dt) |
808 | { | 808 | { |
809 | string sql = "update " + table + " set "; | 809 | string sql = "update " + table + " set "; |
810 | string subsql = String.Empty; | 810 | string subsql = String.Empty; |
@@ -831,7 +831,7 @@ namespace OpenSim.DataStore.MSSQL | |||
831 | } | 831 | } |
832 | 832 | ||
833 | 833 | ||
834 | private string defineTable(DataTable dt) | 834 | private static string defineTable(DataTable dt) |
835 | { | 835 | { |
836 | string sql = "create table " + dt.TableName + "("; | 836 | string sql = "create table " + dt.TableName + "("; |
837 | string subsql = String.Empty; | 837 | string subsql = String.Empty; |
@@ -854,7 +854,7 @@ namespace OpenSim.DataStore.MSSQL | |||
854 | return sql; | 854 | return sql; |
855 | } | 855 | } |
856 | 856 | ||
857 | private void fillTerrainRow(DataRow row, LLUUID regionUUID, int rev, double[,] val) | 857 | private static void fillTerrainRow(DataRow row, LLUUID regionUUID, int rev, double[,] val) |
858 | { | 858 | { |
859 | row["RegionUUID"] = regionUUID; | 859 | row["RegionUUID"] = regionUUID; |
860 | row["Revision"] = rev; | 860 | row["Revision"] = rev; |
@@ -890,7 +890,7 @@ namespace OpenSim.DataStore.MSSQL | |||
890 | /// for us. | 890 | /// for us. |
891 | ///</summary> | 891 | ///</summary> |
892 | ///<returns>a built Sql parameter</returns> | 892 | ///<returns>a built Sql parameter</returns> |
893 | private SqlParameter createSqlParameter(string name, Type type) | 893 | private static SqlParameter createSqlParameter(string name, Type type) |
894 | { | 894 | { |
895 | SqlParameter param = new SqlParameter(); | 895 | SqlParameter param = new SqlParameter(); |
896 | param.ParameterName = "@" + name; | 896 | param.ParameterName = "@" + name; |
@@ -934,7 +934,7 @@ namespace OpenSim.DataStore.MSSQL | |||
934 | da.InsertCommand.Connection = conn; | 934 | da.InsertCommand.Connection = conn; |
935 | } | 935 | } |
936 | 936 | ||
937 | private void InitDB(SqlConnection conn) | 937 | private static void InitDB(SqlConnection conn) |
938 | { | 938 | { |
939 | string createPrims = defineTable(createPrimTable()); | 939 | string createPrims = defineTable(createPrimTable()); |
940 | string createShapes = defineTable(createShapeTable()); | 940 | string createShapes = defineTable(createShapeTable()); |
@@ -977,7 +977,7 @@ namespace OpenSim.DataStore.MSSQL | |||
977 | conn.Close(); | 977 | conn.Close(); |
978 | } | 978 | } |
979 | 979 | ||
980 | private bool TestTables(SqlConnection conn) | 980 | private static bool TestTables(SqlConnection conn) |
981 | { | 981 | { |
982 | SqlCommand primSelectCmd = new SqlCommand(primSelect, conn); | 982 | SqlCommand primSelectCmd = new SqlCommand(primSelect, conn); |
983 | SqlDataAdapter pDa = new SqlDataAdapter(primSelectCmd); | 983 | SqlDataAdapter pDa = new SqlDataAdapter(primSelectCmd); |
@@ -1046,7 +1046,7 @@ namespace OpenSim.DataStore.MSSQL | |||
1046 | * | 1046 | * |
1047 | **********************************************************************/ | 1047 | **********************************************************************/ |
1048 | 1048 | ||
1049 | private DbType dbtypeFromType(Type type) | 1049 | private static DbType dbtypeFromType(Type type) |
1050 | { | 1050 | { |
1051 | if (type == typeof (String)) | 1051 | if (type == typeof (String)) |
1052 | { | 1052 | { |
@@ -1072,7 +1072,7 @@ namespace OpenSim.DataStore.MSSQL | |||
1072 | 1072 | ||
1073 | // this is something we'll need to implement for each db | 1073 | // this is something we'll need to implement for each db |
1074 | // slightly differently. | 1074 | // slightly differently. |
1075 | private string SqlType(Type type) | 1075 | private static string SqlType(Type type) |
1076 | { | 1076 | { |
1077 | if (type == typeof (String)) | 1077 | if (type == typeof (String)) |
1078 | { | 1078 | { |
diff --git a/OpenSim/Tools/Export/OpenSimExport.cs b/OpenSim/Tools/Export/OpenSimExport.cs index 76d8d11..4891ea7 100644 --- a/OpenSim/Tools/Export/OpenSimExport.cs +++ b/OpenSim/Tools/Export/OpenSimExport.cs | |||
@@ -72,7 +72,7 @@ namespace OpenSimExport | |||
72 | } | 72 | } |
73 | } | 73 | } |
74 | 74 | ||
75 | protected ConsoleBase CreateConsole() | 75 | protected static ConsoleBase CreateConsole() |
76 | { | 76 | { |
77 | return new ConsoleBase("Export", null); | 77 | return new ConsoleBase("Export", null); |
78 | } | 78 | } |