diff options
author | Dr Scofield | 2008-06-27 23:03:39 +0000 |
---|---|---|
committer | Dr Scofield | 2008-06-27 23:03:39 +0000 |
commit | 748f72326d9a295958bc9ba63bbb1a5d39030ef7 (patch) | |
tree | 58f2c9a5f6b8ffab5ad3621070aa17cb1c1e3e6b /OpenSim/Data/SQLite | |
parent | more warnings to go. (diff) | |
download | opensim-SC_OLD-748f72326d9a295958bc9ba63bbb1a5d39030ef7.zip opensim-SC_OLD-748f72326d9a295958bc9ba63bbb1a5d39030ef7.tar.gz opensim-SC_OLD-748f72326d9a295958bc9ba63bbb1a5d39030ef7.tar.bz2 opensim-SC_OLD-748f72326d9a295958bc9ba63bbb1a5d39030ef7.tar.xz |
last round of warning squashing. calling it a day now.
Diffstat (limited to 'OpenSim/Data/SQLite')
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteAssetData.cs | 46 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteGridData.cs | 8 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteInventoryStore.cs | 20 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteRegionData.cs | 96 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteUserData.cs | 6 |
5 files changed, 88 insertions, 88 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs index 018501f..24c75e3 100644 --- a/OpenSim/Data/SQLite/SQLiteAssetData.cs +++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs | |||
@@ -250,22 +250,22 @@ namespace OpenSim.Data.SQLite | |||
250 | /// Create the "assets" table | 250 | /// Create the "assets" table |
251 | /// </summary> | 251 | /// </summary> |
252 | /// <returns></returns> | 252 | /// <returns></returns> |
253 | private static DataTable createAssetsTable() | 253 | // private static DataTable createAssetsTable() |
254 | { | 254 | // { |
255 | DataTable assets = new DataTable("assets"); | 255 | // DataTable assets = new DataTable("assets"); |
256 | 256 | ||
257 | SQLiteUtil.createCol(assets, "UUID", typeof (String)); | 257 | // SQLiteUtil.createCol(assets, "UUID", typeof (String)); |
258 | SQLiteUtil.createCol(assets, "Name", typeof (String)); | 258 | // SQLiteUtil.createCol(assets, "Name", typeof (String)); |
259 | SQLiteUtil.createCol(assets, "Description", typeof (String)); | 259 | // SQLiteUtil.createCol(assets, "Description", typeof (String)); |
260 | SQLiteUtil.createCol(assets, "Type", typeof (Int32)); | 260 | // SQLiteUtil.createCol(assets, "Type", typeof (Int32)); |
261 | SQLiteUtil.createCol(assets, "InvType", typeof (Int32)); | 261 | // SQLiteUtil.createCol(assets, "InvType", typeof (Int32)); |
262 | SQLiteUtil.createCol(assets, "Local", typeof (Boolean)); | 262 | // SQLiteUtil.createCol(assets, "Local", typeof (Boolean)); |
263 | SQLiteUtil.createCol(assets, "Temporary", typeof (Boolean)); | 263 | // SQLiteUtil.createCol(assets, "Temporary", typeof (Boolean)); |
264 | SQLiteUtil.createCol(assets, "Data", typeof (Byte[])); | 264 | // SQLiteUtil.createCol(assets, "Data", typeof (Byte[])); |
265 | // Add in contraints | 265 | // // Add in contraints |
266 | assets.PrimaryKey = new DataColumn[] {assets.Columns["UUID"]}; | 266 | // assets.PrimaryKey = new DataColumn[] {assets.Columns["UUID"]}; |
267 | return assets; | 267 | // return assets; |
268 | } | 268 | // } |
269 | 269 | ||
270 | /*********************************************************************** | 270 | /*********************************************************************** |
271 | * | 271 | * |
@@ -312,12 +312,12 @@ namespace OpenSim.Data.SQLite | |||
312 | /// | 312 | /// |
313 | /// </summary> | 313 | /// </summary> |
314 | /// <param name="conn"></param> | 314 | /// <param name="conn"></param> |
315 | private static void InitDB(SqliteConnection conn) | 315 | // private static void InitDB(SqliteConnection conn) |
316 | { | 316 | // { |
317 | string createAssets = SQLiteUtil.defineTable(createAssetsTable()); | 317 | // string createAssets = SQLiteUtil.defineTable(createAssetsTable()); |
318 | SqliteCommand pcmd = new SqliteCommand(createAssets, conn); | 318 | // SqliteCommand pcmd = new SqliteCommand(createAssets, conn); |
319 | pcmd.ExecuteNonQuery(); | 319 | // pcmd.ExecuteNonQuery(); |
320 | } | 320 | // } |
321 | 321 | ||
322 | /// <summary> | 322 | /// <summary> |
323 | /// | 323 | /// |
@@ -358,7 +358,7 @@ namespace OpenSim.Data.SQLite | |||
358 | get | 358 | get |
359 | { | 359 | { |
360 | Module module = GetType().Module; | 360 | Module module = GetType().Module; |
361 | string dllName = module.Assembly.ManifestModule.Name; | 361 | // string dllName = module.Assembly.ManifestModule.Name; |
362 | Version dllVersion = module.Assembly.GetName().Version; | 362 | Version dllVersion = module.Assembly.GetName().Version; |
363 | 363 | ||
364 | return | 364 | return |
diff --git a/OpenSim/Data/SQLite/SQLiteGridData.cs b/OpenSim/Data/SQLite/SQLiteGridData.cs index 0d24a40..6fd7235 100644 --- a/OpenSim/Data/SQLite/SQLiteGridData.cs +++ b/OpenSim/Data/SQLite/SQLiteGridData.cs | |||
@@ -230,11 +230,11 @@ namespace OpenSim.Data.SQLite | |||
230 | /// <returns></returns> | 230 | /// <returns></returns> |
231 | public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge) | 231 | public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge) |
232 | { | 232 | { |
233 | SHA512Managed HashProvider = new SHA512Managed(); | 233 | // SHA512Managed HashProvider = new SHA512Managed(); |
234 | Encoding TextProvider = new UTF8Encoding(); | 234 | // Encoding TextProvider = new UTF8Encoding(); |
235 | 235 | ||
236 | byte[] stream = TextProvider.GetBytes(uuid.ToString() + ":" + handle.ToString() + ":" + challenge); | 236 | // byte[] stream = TextProvider.GetBytes(uuid.ToString() + ":" + handle.ToString() + ":" + challenge); |
237 | byte[] hash = HashProvider.ComputeHash(stream); | 237 | // byte[] hash = HashProvider.ComputeHash(stream); |
238 | 238 | ||
239 | return false; | 239 | return false; |
240 | } | 240 | } |
diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs index f7a1fdc..99560a0 100644 --- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs | |||
@@ -297,7 +297,7 @@ namespace OpenSim.Data.SQLite | |||
297 | public string getVersion() | 297 | public string getVersion() |
298 | { | 298 | { |
299 | Module module = GetType().Module; | 299 | Module module = GetType().Module; |
300 | string dllName = module.Assembly.ManifestModule.Name; | 300 | // string dllName = module.Assembly.ManifestModule.Name; |
301 | Version dllVersion = module.Assembly.GetName().Version; | 301 | Version dllVersion = module.Assembly.GetName().Version; |
302 | 302 | ||
303 | 303 | ||
@@ -741,17 +741,17 @@ namespace OpenSim.Data.SQLite | |||
741 | /// | 741 | /// |
742 | /// </summary> | 742 | /// </summary> |
743 | /// <param name="conn"></param> | 743 | /// <param name="conn"></param> |
744 | private static void InitDB(SqliteConnection conn) | 744 | // private static void InitDB(SqliteConnection conn) |
745 | { | 745 | // { |
746 | string createInventoryItems = defineTable(createInventoryItemsTable()); | 746 | // string createInventoryItems = defineTable(createInventoryItemsTable()); |
747 | string createInventoryFolders = defineTable(createInventoryFoldersTable()); | 747 | // string createInventoryFolders = defineTable(createInventoryFoldersTable()); |
748 | 748 | ||
749 | SqliteCommand pcmd = new SqliteCommand(createInventoryItems, conn); | 749 | // SqliteCommand pcmd = new SqliteCommand(createInventoryItems, conn); |
750 | SqliteCommand scmd = new SqliteCommand(createInventoryFolders, conn); | 750 | // SqliteCommand scmd = new SqliteCommand(createInventoryFolders, conn); |
751 | 751 | ||
752 | pcmd.ExecuteNonQuery(); | 752 | // pcmd.ExecuteNonQuery(); |
753 | scmd.ExecuteNonQuery(); | 753 | // scmd.ExecuteNonQuery(); |
754 | } | 754 | // } |
755 | 755 | ||
756 | /// <summary> | 756 | /// <summary> |
757 | /// | 757 | /// |
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs index 86f4370..13d444e 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs | |||
@@ -1686,27 +1686,27 @@ namespace OpenSim.Data.SQLite | |||
1686 | /// </summary> | 1686 | /// </summary> |
1687 | /// <param name="dt">Data Table</param> | 1687 | /// <param name="dt">Data Table</param> |
1688 | /// <returns></returns> | 1688 | /// <returns></returns> |
1689 | private static string defineTable(DataTable dt) | 1689 | // private static string defineTable(DataTable dt) |
1690 | { | 1690 | // { |
1691 | string sql = "create table " + dt.TableName + "("; | 1691 | // string sql = "create table " + dt.TableName + "("; |
1692 | string subsql = String.Empty; | 1692 | // string subsql = String.Empty; |
1693 | foreach (DataColumn col in dt.Columns) | 1693 | // foreach (DataColumn col in dt.Columns) |
1694 | { | 1694 | // { |
1695 | if (subsql.Length > 0) | 1695 | // if (subsql.Length > 0) |
1696 | { | 1696 | // { |
1697 | // a map function would rock so much here | 1697 | // // a map function would rock so much here |
1698 | subsql += ",\n"; | 1698 | // subsql += ",\n"; |
1699 | } | 1699 | // } |
1700 | subsql += col.ColumnName + " " + sqliteType(col.DataType); | 1700 | // subsql += col.ColumnName + " " + sqliteType(col.DataType); |
1701 | if (dt.PrimaryKey.Length > 0 && col == dt.PrimaryKey[0]) | 1701 | // if (dt.PrimaryKey.Length > 0 && col == dt.PrimaryKey[0]) |
1702 | { | 1702 | // { |
1703 | subsql += " primary key"; | 1703 | // subsql += " primary key"; |
1704 | } | 1704 | // } |
1705 | } | 1705 | // } |
1706 | sql += subsql; | 1706 | // sql += subsql; |
1707 | sql += ")"; | 1707 | // sql += ")"; |
1708 | return sql; | 1708 | // return sql; |
1709 | } | 1709 | // } |
1710 | 1710 | ||
1711 | /*********************************************************************** | 1711 | /*********************************************************************** |
1712 | * | 1712 | * |
@@ -2083,32 +2083,32 @@ namespace OpenSim.Data.SQLite | |||
2083 | /// <param name="type">a Type</param> | 2083 | /// <param name="type">a Type</param> |
2084 | /// <returns>an sqliteType</returns> | 2084 | /// <returns>an sqliteType</returns> |
2085 | /// <remarks>this is something we'll need to implement for each db slightly differently.</remarks> | 2085 | /// <remarks>this is something we'll need to implement for each db slightly differently.</remarks> |
2086 | private static string sqliteType(Type type) | 2086 | // private static string sqliteType(Type type) |
2087 | { | 2087 | // { |
2088 | if (type == typeof (String)) | 2088 | // if (type == typeof (String)) |
2089 | { | 2089 | // { |
2090 | return "varchar(255)"; | 2090 | // return "varchar(255)"; |
2091 | } | 2091 | // } |
2092 | else if (type == typeof (Int32)) | 2092 | // else if (type == typeof (Int32)) |
2093 | { | 2093 | // { |
2094 | return "integer"; | 2094 | // return "integer"; |
2095 | } | 2095 | // } |
2096 | else if (type == typeof (Int64)) | 2096 | // else if (type == typeof (Int64)) |
2097 | { | 2097 | // { |
2098 | return "integer"; | 2098 | // return "integer"; |
2099 | } | 2099 | // } |
2100 | else if (type == typeof (Double)) | 2100 | // else if (type == typeof (Double)) |
2101 | { | 2101 | // { |
2102 | return "float"; | 2102 | // return "float"; |
2103 | } | 2103 | // } |
2104 | else if (type == typeof (Byte[])) | 2104 | // else if (type == typeof (Byte[])) |
2105 | { | 2105 | // { |
2106 | return "blob"; | 2106 | // return "blob"; |
2107 | } | 2107 | // } |
2108 | else | 2108 | // else |
2109 | { | 2109 | // { |
2110 | return "string"; | 2110 | // return "string"; |
2111 | } | 2111 | // } |
2112 | } | 2112 | // } |
2113 | } | 2113 | } |
2114 | } | 2114 | } |
diff --git a/OpenSim/Data/SQLite/SQLiteUserData.cs b/OpenSim/Data/SQLite/SQLiteUserData.cs index 24c7944..c7673bd 100644 --- a/OpenSim/Data/SQLite/SQLiteUserData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserData.cs | |||
@@ -557,8 +557,8 @@ namespace OpenSim.Data.SQLite | |||
557 | try { | 557 | try { |
558 | aa = aplist[user]; | 558 | aa = aplist[user]; |
559 | m_log.Info("[APPEARANCE] Found appearance for " + user.ToString() + aa.ToString()); | 559 | m_log.Info("[APPEARANCE] Found appearance for " + user.ToString() + aa.ToString()); |
560 | } catch (System.Collections.Generic.KeyNotFoundException e) { | 560 | } catch (System.Collections.Generic.KeyNotFoundException) { |
561 | m_log.Info("[APPEARANCE] No appearance found for " + user.ToString()); | 561 | m_log.InfoFormat("[APPEARANCE] No appearance found for {0}", user.ToString()); |
562 | } | 562 | } |
563 | return aa; | 563 | return aa; |
564 | } | 564 | } |
@@ -971,7 +971,7 @@ namespace OpenSim.Data.SQLite | |||
971 | private static bool TestTables(SqliteConnection conn, Migration m) | 971 | private static bool TestTables(SqliteConnection conn, Migration m) |
972 | { | 972 | { |
973 | SqliteCommand cmd = new SqliteCommand(userSelect, conn); | 973 | SqliteCommand cmd = new SqliteCommand(userSelect, conn); |
974 | SqliteCommand fcmd = new SqliteCommand(userFriendsSelect, conn); | 974 | // SqliteCommand fcmd = new SqliteCommand(userFriendsSelect, conn); |
975 | SqliteDataAdapter pDa = new SqliteDataAdapter(cmd); | 975 | SqliteDataAdapter pDa = new SqliteDataAdapter(cmd); |
976 | SqliteDataAdapter fDa = new SqliteDataAdapter(cmd); | 976 | SqliteDataAdapter fDa = new SqliteDataAdapter(cmd); |
977 | 977 | ||