diff options
Diffstat (limited to 'OpenSim')
72 files changed, 734 insertions, 544 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLDataStore.cs b/OpenSim/Data/MSSQL/MSSQLDataStore.cs index 42eab8e..17a52a8 100644 --- a/OpenSim/Data/MSSQL/MSSQLDataStore.cs +++ b/OpenSim/Data/MSSQL/MSSQLDataStore.cs | |||
@@ -370,7 +370,7 @@ namespace OpenSim.Data.MSSQL | |||
370 | int revision = Util.UnixTimeSinceEpoch(); | 370 | int revision = Util.UnixTimeSinceEpoch(); |
371 | m_log.Info("[REGION DB]: Storing terrain revision r" + revision.ToString()); | 371 | m_log.Info("[REGION DB]: Storing terrain revision r" + revision.ToString()); |
372 | 372 | ||
373 | DataTable terrain = m_dataSet.Tables["terrain"]; | 373 | // DataTable terrain = m_dataSet.Tables["terrain"]; |
374 | lock (m_dataSet) | 374 | lock (m_dataSet) |
375 | { | 375 | { |
376 | SqlCommand cmd = new SqlCommand("insert into terrain(RegionUUID, Revision, Heightfield)" + | 376 | SqlCommand cmd = new SqlCommand("insert into terrain(RegionUUID, Revision, Heightfield)" + |
@@ -400,7 +400,7 @@ namespace OpenSim.Data.MSSQL | |||
400 | where RegionUUID=@RegionUUID order by Revision desc" | 400 | where RegionUUID=@RegionUUID order by Revision desc" |
401 | , m_connection); | 401 | , m_connection); |
402 | 402 | ||
403 | SqlParameter param = new SqlParameter(); | 403 | // SqlParameter param = new SqlParameter(); |
404 | cmd.Parameters.Add(new SqlParameter("@RegionUUID", regionID.UUID)); | 404 | cmd.Parameters.Add(new SqlParameter("@RegionUUID", regionID.UUID)); |
405 | 405 | ||
406 | if (m_connection.State != ConnectionState.Open) | 406 | if (m_connection.State != ConnectionState.Open) |
diff --git a/OpenSim/Data/MSSQL/MSSQLGridData.cs b/OpenSim/Data/MSSQL/MSSQLGridData.cs index d67e463..e2b0dd6 100644 --- a/OpenSim/Data/MSSQL/MSSQLGridData.cs +++ b/OpenSim/Data/MSSQL/MSSQLGridData.cs | |||
@@ -434,11 +434,11 @@ namespace OpenSim.Data.MSSQL | |||
434 | /// <returns></returns> | 434 | /// <returns></returns> |
435 | public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge) | 435 | public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge) |
436 | { | 436 | { |
437 | SHA512Managed HashProvider = new SHA512Managed(); | 437 | // SHA512Managed HashProvider = new SHA512Managed(); |
438 | Encoding TextProvider = new UTF8Encoding(); | 438 | // Encoding TextProvider = new UTF8Encoding(); |
439 | 439 | ||
440 | byte[] stream = TextProvider.GetBytes(uuid.ToString() + ":" + handle.ToString() + ":" + challenge); | 440 | // byte[] stream = TextProvider.GetBytes(uuid.ToString() + ":" + handle.ToString() + ":" + challenge); |
441 | byte[] hash = HashProvider.ComputeHash(stream); | 441 | // byte[] hash = HashProvider.ComputeHash(stream); |
442 | return false; | 442 | return false; |
443 | } | 443 | } |
444 | 444 | ||
diff --git a/OpenSim/Data/MSSQL/MSSQLManager.cs b/OpenSim/Data/MSSQL/MSSQLManager.cs index a170a87..bea02fe 100644 --- a/OpenSim/Data/MSSQL/MSSQLManager.cs +++ b/OpenSim/Data/MSSQL/MSSQLManager.cs | |||
@@ -544,7 +544,7 @@ namespace OpenSim.Data.MSSQL | |||
544 | public string getVersion() | 544 | public string getVersion() |
545 | { | 545 | { |
546 | Module module = GetType().Module; | 546 | Module module = GetType().Module; |
547 | string dllName = module.Assembly.ManifestModule.Name; | 547 | // string dllName = module.Assembly.ManifestModule.Name; |
548 | Version dllVersion = module.Assembly.GetName().Version; | 548 | Version dllVersion = module.Assembly.GetName().Version; |
549 | 549 | ||
550 | 550 | ||
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs index ac7fa1d..fc331cd 100644 --- a/OpenSim/Data/MySQL/MySQLAssetData.cs +++ b/OpenSim/Data/MySQL/MySQLAssetData.cs | |||
@@ -120,16 +120,16 @@ namespace OpenSim.Data.MySQL | |||
120 | /// </list> | 120 | /// </list> |
121 | /// </summary> | 121 | /// </summary> |
122 | /// <param name="oldVersion"></param> | 122 | /// <param name="oldVersion"></param> |
123 | private void UpgradeAssetsTable(string oldVersion) | 123 | // private void UpgradeAssetsTable(string oldVersion) |
124 | { | 124 | // { |
125 | // null as the version, indicates that the table didn't exist | 125 | // // null as the version, indicates that the table didn't exist |
126 | if (oldVersion == null) | 126 | // if (oldVersion == null) |
127 | { | 127 | // { |
128 | m_log.Info("[ASSETS DB]: Creating new database tables"); | 128 | // m_log.Info("[ASSETS DB]: Creating new database tables"); |
129 | _dbConnection.ExecuteResourceSql("CreateAssetsTable.sql"); | 129 | // _dbConnection.ExecuteResourceSql("CreateAssetsTable.sql"); |
130 | return; | 130 | // return; |
131 | } | 131 | // } |
132 | } | 132 | // } |
133 | 133 | ||
134 | /// <summary> | 134 | /// <summary> |
135 | /// Ensure that the assets related tables exists and are at the latest version | 135 | /// Ensure that the assets related tables exists and are at the latest version |
diff --git a/OpenSim/Data/MySQL/MySQLDataStore.cs b/OpenSim/Data/MySQL/MySQLDataStore.cs index aa4c111..87bce10 100644 --- a/OpenSim/Data/MySQL/MySQLDataStore.cs +++ b/OpenSim/Data/MySQL/MySQLDataStore.cs | |||
@@ -272,19 +272,19 @@ namespace OpenSim.Data.MySQL | |||
272 | /// </summary> | 272 | /// </summary> |
273 | /// <param name="oldVersion"></param> | 273 | /// <param name="oldVersion"></param> |
274 | /// <param name="dbconn">The database connection handler</param> | 274 | /// <param name="dbconn">The database connection handler</param> |
275 | private void UpgradeLandTable(string oldVersion, MySqlConnection dbconn) | 275 | // private void UpgradeLandTable(string oldVersion, MySqlConnection dbconn) |
276 | { | 276 | // { |
277 | // null as the version, indicates that the table didn't exist | 277 | // // null as the version, indicates that the table didn't exist |
278 | if (oldVersion == null) | 278 | // if (oldVersion == null) |
279 | { | 279 | // { |
280 | ExecuteResourceSql("CreateLandTable.sql",dbconn); | 280 | // ExecuteResourceSql("CreateLandTable.sql",dbconn); |
281 | oldVersion = "Rev. 2; InnoDB free: 0 kB"; | 281 | // oldVersion = "Rev. 2; InnoDB free: 0 kB"; |
282 | } | 282 | // } |
283 | if (!oldVersion.Contains("Rev.")) | 283 | // if (!oldVersion.Contains("Rev.")) |
284 | { | 284 | // { |
285 | ExecuteResourceSql("UpgradeLandTableToVersion2.sql", dbconn); | 285 | // ExecuteResourceSql("UpgradeLandTableToVersion2.sql", dbconn); |
286 | } | 286 | // } |
287 | } | 287 | // } |
288 | 288 | ||
289 | /// <summary> | 289 | /// <summary> |
290 | /// Adds an object into region storage | 290 | /// Adds an object into region storage |
@@ -534,7 +534,7 @@ namespace OpenSim.Data.MySQL | |||
534 | where RegionUUID=?RegionUUID order by Revision desc limit 1" | 534 | where RegionUUID=?RegionUUID order by Revision desc limit 1" |
535 | , m_connection); | 535 | , m_connection); |
536 | 536 | ||
537 | MySqlParameter param = new MySqlParameter(); | 537 | // MySqlParameter param = new MySqlParameter(); |
538 | cmd.Parameters.Add(new MySqlParameter("?RegionUUID", Util.ToRawUuidString(regionID))); | 538 | cmd.Parameters.Add(new MySqlParameter("?RegionUUID", Util.ToRawUuidString(regionID))); |
539 | 539 | ||
540 | if (m_connection.State != ConnectionState.Open) | 540 | if (m_connection.State != ConnectionState.Open) |
@@ -1768,30 +1768,30 @@ namespace OpenSim.Data.MySQL | |||
1768 | /// </summary> | 1768 | /// </summary> |
1769 | /// <param name="dt"></param> | 1769 | /// <param name="dt"></param> |
1770 | /// <returns></returns> | 1770 | /// <returns></returns> |
1771 | private static string defineTable(DataTable dt) | 1771 | // private static string defineTable(DataTable dt) |
1772 | { | 1772 | // { |
1773 | string sql = "create table " + dt.TableName + "("; | 1773 | // string sql = "create table " + dt.TableName + "("; |
1774 | string subsql = String.Empty; | 1774 | // string subsql = String.Empty; |
1775 | foreach (DataColumn col in dt.Columns) | 1775 | // foreach (DataColumn col in dt.Columns) |
1776 | { | 1776 | // { |
1777 | if (subsql.Length > 0) | 1777 | // if (subsql.Length > 0) |
1778 | { | 1778 | // { |
1779 | // a map function would rock so much here | 1779 | // // a map function would rock so much here |
1780 | subsql += ",\n"; | 1780 | // subsql += ",\n"; |
1781 | } | 1781 | // } |
1782 | subsql += col.ColumnName + " " + MySqlType(col.DataType); | 1782 | // subsql += col.ColumnName + " " + MySqlType(col.DataType); |
1783 | if (dt.PrimaryKey.Length > 0 && col == dt.PrimaryKey[0]) | 1783 | // if (dt.PrimaryKey.Length > 0 && col == dt.PrimaryKey[0]) |
1784 | { | 1784 | // { |
1785 | subsql += " primary key"; | 1785 | // subsql += " primary key"; |
1786 | } | 1786 | // } |
1787 | } | 1787 | // } |
1788 | sql += subsql; | 1788 | // sql += subsql; |
1789 | sql += ")"; | 1789 | // sql += ")"; |
1790 | 1790 | ||
1791 | //m_log.InfoFormat("[DATASTORE]: defineTable() sql {0}", sql); | 1791 | // //m_log.InfoFormat("[DATASTORE]: defineTable() sql {0}", sql); |
1792 | 1792 | ||
1793 | return sql; | 1793 | // return sql; |
1794 | } | 1794 | // } |
1795 | 1795 | ||
1796 | /*********************************************************************** | 1796 | /*********************************************************************** |
1797 | * | 1797 | * |
@@ -1944,93 +1944,93 @@ namespace OpenSim.Data.MySQL | |||
1944 | /// | 1944 | /// |
1945 | /// </summary> | 1945 | /// </summary> |
1946 | /// <param name="conn">MySQL connection handler</param> | 1946 | /// <param name="conn">MySQL connection handler</param> |
1947 | private static void InitDB(MySqlConnection conn) | 1947 | // private static void InitDB(MySqlConnection conn) |
1948 | { | 1948 | // { |
1949 | string createPrims = defineTable(createPrimTable()); | 1949 | // string createPrims = defineTable(createPrimTable()); |
1950 | string createShapes = defineTable(createShapeTable()); | 1950 | // string createShapes = defineTable(createShapeTable()); |
1951 | string createItems = defineTable(createItemsTable()); | 1951 | // string createItems = defineTable(createItemsTable()); |
1952 | string createTerrain = defineTable(createTerrainTable()); | 1952 | // string createTerrain = defineTable(createTerrainTable()); |
1953 | 1953 | ||
1954 | // Land table is created from the Versionable Test Table routine now. | 1954 | // // Land table is created from the Versionable Test Table routine now. |
1955 | //string createLand = defineTable(createLandTable()); | 1955 | // //string createLand = defineTable(createLandTable()); |
1956 | string createLandAccessList = defineTable(createLandAccessListTable()); | 1956 | // string createLandAccessList = defineTable(createLandAccessListTable()); |
1957 | 1957 | ||
1958 | MySqlCommand pcmd = new MySqlCommand(createPrims, conn); | 1958 | // MySqlCommand pcmd = new MySqlCommand(createPrims, conn); |
1959 | MySqlCommand scmd = new MySqlCommand(createShapes, conn); | 1959 | // MySqlCommand scmd = new MySqlCommand(createShapes, conn); |
1960 | MySqlCommand icmd = new MySqlCommand(createItems, conn); | 1960 | // MySqlCommand icmd = new MySqlCommand(createItems, conn); |
1961 | MySqlCommand tcmd = new MySqlCommand(createTerrain, conn); | 1961 | // MySqlCommand tcmd = new MySqlCommand(createTerrain, conn); |
1962 | //MySqlCommand lcmd = new MySqlCommand(createLand, conn); | 1962 | // //MySqlCommand lcmd = new MySqlCommand(createLand, conn); |
1963 | MySqlCommand lalcmd = new MySqlCommand(createLandAccessList, conn); | 1963 | // MySqlCommand lalcmd = new MySqlCommand(createLandAccessList, conn); |
1964 | 1964 | ||
1965 | if (conn.State != ConnectionState.Open) | 1965 | // if (conn.State != ConnectionState.Open) |
1966 | { | 1966 | // { |
1967 | try | 1967 | // try |
1968 | { | 1968 | // { |
1969 | conn.Open(); | 1969 | // conn.Open(); |
1970 | } | 1970 | // } |
1971 | catch (Exception ex) | 1971 | // catch (Exception ex) |
1972 | { | 1972 | // { |
1973 | m_log.Error("[REGION DB]: Error connecting to MySQL server: " + ex.Message); | 1973 | // m_log.Error("[REGION DB]: Error connecting to MySQL server: " + ex.Message); |
1974 | m_log.Error("[REGION DB]: Application is terminating!"); | 1974 | // m_log.Error("[REGION DB]: Application is terminating!"); |
1975 | Thread.CurrentThread.Abort(); | 1975 | // Thread.CurrentThread.Abort(); |
1976 | } | 1976 | // } |
1977 | } | 1977 | // } |
1978 | 1978 | ||
1979 | try | 1979 | // try |
1980 | { | 1980 | // { |
1981 | pcmd.ExecuteNonQuery(); | 1981 | // pcmd.ExecuteNonQuery(); |
1982 | } | 1982 | // } |
1983 | catch (MySqlException e) | 1983 | // catch (MySqlException e) |
1984 | { | 1984 | // { |
1985 | m_log.WarnFormat("[REGION DB]: Primitives Table Already Exists: {0}", e); | 1985 | // m_log.WarnFormat("[REGION DB]: Primitives Table Already Exists: {0}", e); |
1986 | } | 1986 | // } |
1987 | 1987 | ||
1988 | try | 1988 | // try |
1989 | { | 1989 | // { |
1990 | scmd.ExecuteNonQuery(); | 1990 | // scmd.ExecuteNonQuery(); |
1991 | } | 1991 | // } |
1992 | catch (MySqlException e) | 1992 | // catch (MySqlException e) |
1993 | { | 1993 | // { |
1994 | m_log.WarnFormat("[REGION DB]: Shapes Table Already Exists: {0}", e); | 1994 | // m_log.WarnFormat("[REGION DB]: Shapes Table Already Exists: {0}", e); |
1995 | } | 1995 | // } |
1996 | 1996 | ||
1997 | try | 1997 | // try |
1998 | { | 1998 | // { |
1999 | icmd.ExecuteNonQuery(); | 1999 | // icmd.ExecuteNonQuery(); |
2000 | } | 2000 | // } |
2001 | catch (MySqlException e) | 2001 | // catch (MySqlException e) |
2002 | { | 2002 | // { |
2003 | m_log.WarnFormat("[REGION DB]: Items Table Already Exists: {0}", e); | 2003 | // m_log.WarnFormat("[REGION DB]: Items Table Already Exists: {0}", e); |
2004 | } | 2004 | // } |
2005 | 2005 | ||
2006 | try | 2006 | // try |
2007 | { | 2007 | // { |
2008 | tcmd.ExecuteNonQuery(); | 2008 | // tcmd.ExecuteNonQuery(); |
2009 | } | 2009 | // } |
2010 | catch (MySqlException e) | 2010 | // catch (MySqlException e) |
2011 | { | 2011 | // { |
2012 | m_log.WarnFormat("[REGION DB]: Terrain Table Already Exists: {0}", e); | 2012 | // m_log.WarnFormat("[REGION DB]: Terrain Table Already Exists: {0}", e); |
2013 | } | 2013 | // } |
2014 | 2014 | ||
2015 | //try | 2015 | // //try |
2016 | //{ | 2016 | // //{ |
2017 | //lcmd.ExecuteNonQuery(); | 2017 | // //lcmd.ExecuteNonQuery(); |
2018 | //} | 2018 | // //} |
2019 | //catch (MySqlException e) | 2019 | // //catch (MySqlException e) |
2020 | //{ | 2020 | // //{ |
2021 | //m_log.WarnFormat("[MySql]: Land Table Already Exists: {0}", e); | 2021 | // //m_log.WarnFormat("[MySql]: Land Table Already Exists: {0}", e); |
2022 | //} | 2022 | // //} |
2023 | 2023 | ||
2024 | try | 2024 | // try |
2025 | { | 2025 | // { |
2026 | lalcmd.ExecuteNonQuery(); | 2026 | // lalcmd.ExecuteNonQuery(); |
2027 | } | 2027 | // } |
2028 | catch (MySqlException e) | 2028 | // catch (MySqlException e) |
2029 | { | 2029 | // { |
2030 | m_log.WarnFormat("[REGION DB]: LandAccessList Table Already Exists: {0}", e); | 2030 | // m_log.WarnFormat("[REGION DB]: LandAccessList Table Already Exists: {0}", e); |
2031 | } | 2031 | // } |
2032 | conn.Close(); | 2032 | // conn.Close(); |
2033 | } | 2033 | // } |
2034 | 2034 | ||
2035 | /// <summary> | 2035 | /// <summary> |
2036 | /// | 2036 | /// |
@@ -2189,32 +2189,32 @@ namespace OpenSim.Data.MySQL | |||
2189 | /// <param name="type"></param> | 2189 | /// <param name="type"></param> |
2190 | /// <returns></returns> | 2190 | /// <returns></returns> |
2191 | /// <remarks>this is something we'll need to implement for each db slightly differently.</remarks> | 2191 | /// <remarks>this is something we'll need to implement for each db slightly differently.</remarks> |
2192 | private static string MySqlType(Type type) | 2192 | // private static string MySqlType(Type type) |
2193 | { | 2193 | // { |
2194 | if (type == typeof (String)) | 2194 | // if (type == typeof (String)) |
2195 | { | 2195 | // { |
2196 | return "varchar(255)"; | 2196 | // return "varchar(255)"; |
2197 | } | 2197 | // } |
2198 | else if (type == typeof (Int32)) | 2198 | // else if (type == typeof (Int32)) |
2199 | { | 2199 | // { |
2200 | return "integer"; | 2200 | // return "integer"; |
2201 | } | 2201 | // } |
2202 | else if (type == typeof (Int64)) | 2202 | // else if (type == typeof (Int64)) |
2203 | { | 2203 | // { |
2204 | return "bigint"; | 2204 | // return "bigint"; |
2205 | } | 2205 | // } |
2206 | else if (type == typeof (Double)) | 2206 | // else if (type == typeof (Double)) |
2207 | { | 2207 | // { |
2208 | return "float"; | 2208 | // return "float"; |
2209 | } | 2209 | // } |
2210 | else if (type == typeof (Byte[])) | 2210 | // else if (type == typeof (Byte[])) |
2211 | { | 2211 | // { |
2212 | return "longblob"; | 2212 | // return "longblob"; |
2213 | } | 2213 | // } |
2214 | else | 2214 | // else |
2215 | { | 2215 | // { |
2216 | return "string"; | 2216 | // return "string"; |
2217 | } | 2217 | // } |
2218 | } | 2218 | // } |
2219 | } | 2219 | } |
2220 | } | 2220 | } |
diff --git a/OpenSim/Data/MySQL/MySQLGridData.cs b/OpenSim/Data/MySQL/MySQLGridData.cs index 7abc85a..bb71c99 100644 --- a/OpenSim/Data/MySQL/MySQLGridData.cs +++ b/OpenSim/Data/MySQL/MySQLGridData.cs | |||
@@ -402,11 +402,11 @@ namespace OpenSim.Data.MySQL | |||
402 | /// <returns></returns> | 402 | /// <returns></returns> |
403 | public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge) | 403 | public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge) |
404 | { | 404 | { |
405 | SHA512Managed HashProvider = new SHA512Managed(); | 405 | // SHA512Managed HashProvider = new SHA512Managed(); |
406 | Encoding TextProvider = new UTF8Encoding(); | 406 | // Encoding TextProvider = new UTF8Encoding(); |
407 | 407 | ||
408 | byte[] stream = TextProvider.GetBytes(uuid.ToString() + ":" + handle.ToString() + ":" + challenge); | 408 | // byte[] stream = TextProvider.GetBytes(uuid.ToString() + ":" + handle.ToString() + ":" + challenge); |
409 | byte[] hash = HashProvider.ComputeHash(stream); | 409 | // byte[] hash = HashProvider.ComputeHash(stream); |
410 | 410 | ||
411 | return false; | 411 | return false; |
412 | } | 412 | } |
diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs index 7c3ed28..61fd039 100644 --- a/OpenSim/Data/MySQL/MySQLManager.cs +++ b/OpenSim/Data/MySQL/MySQLManager.cs | |||
@@ -156,7 +156,7 @@ namespace OpenSim.Data.MySQL | |||
156 | public string getVersion() | 156 | public string getVersion() |
157 | { | 157 | { |
158 | Module module = GetType().Module; | 158 | Module module = GetType().Module; |
159 | string dllName = module.Assembly.ManifestModule.Name; | 159 | // string dllName = module.Assembly.ManifestModule.Name; |
160 | Version dllVersion = module.Assembly.GetName().Version; | 160 | Version dllVersion = module.Assembly.GetName().Version; |
161 | 161 | ||
162 | return | 162 | return |
@@ -916,8 +916,12 @@ namespace OpenSim.Data.MySQL | |||
916 | IDbCommand result = Query(sql, parameters); | 916 | IDbCommand result = Query(sql, parameters); |
917 | 917 | ||
918 | //Console.WriteLine(result.CommandText); | 918 | //Console.WriteLine(result.CommandText); |
919 | int x; | 919 | // int x; |
920 | if ((x = result.ExecuteNonQuery()) > 0) | 920 | // if ((x = result.ExecuteNonQuery()) > 0) |
921 | // { | ||
922 | // returnval = true; | ||
923 | // } | ||
924 | if (result.ExecuteNonQuery() > 0) | ||
921 | { | 925 | { |
922 | returnval = true; | 926 | returnval = true; |
923 | } | 927 | } |
@@ -952,8 +956,12 @@ namespace OpenSim.Data.MySQL | |||
952 | 956 | ||
953 | IDbCommand result = Query(sql, parameters); | 957 | IDbCommand result = Query(sql, parameters); |
954 | 958 | ||
955 | int x; | 959 | // int x; |
956 | if ((x = result.ExecuteNonQuery()) > 0) | 960 | // if ((x = result.ExecuteNonQuery()) > 0) |
961 | // { | ||
962 | // returnval = true; | ||
963 | // } | ||
964 | if (result.ExecuteNonQuery() > 0) | ||
957 | { | 965 | { |
958 | returnval = true; | 966 | returnval = true; |
959 | } | 967 | } |
@@ -1000,8 +1008,12 @@ namespace OpenSim.Data.MySQL | |||
1000 | IDbCommand result = Query(sql, parameters); | 1008 | IDbCommand result = Query(sql, parameters); |
1001 | 1009 | ||
1002 | //Console.WriteLine(result.CommandText); | 1010 | //Console.WriteLine(result.CommandText); |
1003 | int x; | 1011 | // int x; |
1004 | if ((x = result.ExecuteNonQuery()) > 0) | 1012 | // if ((x = result.ExecuteNonQuery()) > 0) |
1013 | // { | ||
1014 | // returnval = true; | ||
1015 | // } | ||
1016 | if (result.ExecuteNonQuery() > 0) | ||
1005 | { | 1017 | { |
1006 | returnval = true; | 1018 | returnval = true; |
1007 | } | 1019 | } |
diff --git a/OpenSim/Data/NHibernate/NHibernateAssetData.cs b/OpenSim/Data/NHibernate/NHibernateAssetData.cs index a339ee3..174667e 100644 --- a/OpenSim/Data/NHibernate/NHibernateAssetData.cs +++ b/OpenSim/Data/NHibernate/NHibernateAssetData.cs | |||
@@ -137,18 +137,18 @@ namespace OpenSim.Data.NHibernate | |||
137 | } | 137 | } |
138 | } | 138 | } |
139 | 139 | ||
140 | private void LogAssetLoad(AssetBase asset) | 140 | // private void LogAssetLoad(AssetBase asset) |
141 | { | 141 | // { |
142 | string temporary = asset.Temporary ? "Temporary" : "Stored"; | 142 | // string temporary = asset.Temporary ? "Temporary" : "Stored"; |
143 | string local = asset.Local ? "Local" : "Remote"; | 143 | // string local = asset.Local ? "Local" : "Remote"; |
144 | 144 | ||
145 | int assetLength = (asset.Data != null) ? asset.Data.Length : 0; | 145 | // int assetLength = (asset.Data != null) ? asset.Data.Length : 0; |
146 | 146 | ||
147 | m_log.Info("[SQLITE]: " + | 147 | // m_log.Info("[SQLITE]: " + |
148 | string.Format("Loaded {6} {5} Asset: [{0}][{3}/{4}] \"{1}\":{2} ({7} bytes)", | 148 | // string.Format("Loaded {6} {5} Asset: [{0}][{3}/{4}] \"{1}\":{2} ({7} bytes)", |
149 | asset.FullID, asset.Name, asset.Description, asset.Type, | 149 | // asset.FullID, asset.Name, asset.Description, asset.Type, |
150 | asset.InvType, temporary, local, assetLength)); | 150 | // asset.InvType, temporary, local, assetLength)); |
151 | } | 151 | // } |
152 | 152 | ||
153 | override public bool ExistsAsset(LLUUID uuid) | 153 | override public bool ExistsAsset(LLUUID uuid) |
154 | { | 154 | { |
diff --git a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs index 46dcbad..153d2d5 100644 --- a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs +++ b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs | |||
@@ -277,7 +277,7 @@ namespace OpenSim.Data.NHibernate | |||
277 | public string getVersion() | 277 | public string getVersion() |
278 | { | 278 | { |
279 | Module module = GetType().Module; | 279 | Module module = GetType().Module; |
280 | string dllName = module.Assembly.ManifestModule.Name; | 280 | // string dllName = module.Assembly.ManifestModule.Name; |
281 | Version dllVersion = module.Assembly.GetName().Version; | 281 | Version dllVersion = module.Assembly.GetName().Version; |
282 | 282 | ||
283 | 283 | ||
diff --git a/OpenSim/Data/NHibernate/NHibernateManager.cs b/OpenSim/Data/NHibernate/NHibernateManager.cs index 6f13294..4c5ec01 100644 --- a/OpenSim/Data/NHibernate/NHibernateManager.cs +++ b/OpenSim/Data/NHibernate/NHibernateManager.cs | |||
@@ -33,11 +33,11 @@ namespace OpenSim.Data.NHibernate | |||
33 | { | 33 | { |
34 | internal class NHibernateManager | 34 | internal class NHibernateManager |
35 | { | 35 | { |
36 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 36 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
37 | 37 | ||
38 | private ISessionFactory factory; | 38 | // private ISessionFactory factory; |
39 | private ISession session; | 39 | // private ISession session; |
40 | private ITransaction transaction; | 40 | // private ITransaction transaction; |
41 | 41 | ||
42 | public NHibernateManager() | 42 | public NHibernateManager() |
43 | { | 43 | { |
diff --git a/OpenSim/Data/NHibernate/NHibernateUserData.cs b/OpenSim/Data/NHibernate/NHibernateUserData.cs index 9cb576d..9d9aec9 100644 --- a/OpenSim/Data/NHibernate/NHibernateUserData.cs +++ b/OpenSim/Data/NHibernate/NHibernateUserData.cs | |||
@@ -91,7 +91,7 @@ namespace OpenSim.Data.NHibernate | |||
91 | { | 91 | { |
92 | user = session.Load(typeof(UserProfileData), uuid) as UserProfileData; | 92 | user = session.Load(typeof(UserProfileData), uuid) as UserProfileData; |
93 | } | 93 | } |
94 | catch (ObjectNotFoundException e) | 94 | catch (ObjectNotFoundException) |
95 | { | 95 | { |
96 | user = null; | 96 | user = null; |
97 | } | 97 | } |
@@ -108,7 +108,7 @@ namespace OpenSim.Data.NHibernate | |||
108 | user = session.Load(typeof(UserProfileData), uuid) as UserProfileData; | 108 | user = session.Load(typeof(UserProfileData), uuid) as UserProfileData; |
109 | user.CurrentAgent = GetAgentByUUID(uuid); | 109 | user.CurrentAgent = GetAgentByUUID(uuid); |
110 | } | 110 | } |
111 | catch (ObjectNotFoundException e) | 111 | catch (ObjectNotFoundException) |
112 | { | 112 | { |
113 | user = null; | 113 | user = null; |
114 | } | 114 | } |
@@ -143,7 +143,7 @@ namespace OpenSim.Data.NHibernate | |||
143 | UserAgentData old = session.Load(typeof(UserAgentData), uuid) as UserAgentData; | 143 | UserAgentData old = session.Load(typeof(UserAgentData), uuid) as UserAgentData; |
144 | session.Delete(old); | 144 | session.Delete(old); |
145 | } | 145 | } |
146 | catch (ObjectNotFoundException e) | 146 | catch (ObjectNotFoundException) |
147 | { | 147 | { |
148 | } | 148 | } |
149 | session.Save(agent); | 149 | session.Save(agent); |
@@ -173,7 +173,7 @@ namespace OpenSim.Data.NHibernate | |||
173 | UserAgentData old = session.Load(typeof(UserAgentData), agent.ProfileID) as UserAgentData; | 173 | UserAgentData old = session.Load(typeof(UserAgentData), agent.ProfileID) as UserAgentData; |
174 | session.Delete(old); | 174 | session.Delete(old); |
175 | } | 175 | } |
176 | catch (ObjectNotFoundException e) | 176 | catch (ObjectNotFoundException) |
177 | { | 177 | { |
178 | } | 178 | } |
179 | session.Save(agent); | 179 | session.Save(agent); |
@@ -260,7 +260,7 @@ namespace OpenSim.Data.NHibernate | |||
260 | // TODO: I'm sure I'll have to do something silly here | 260 | // TODO: I'm sure I'll have to do something silly here |
261 | try { | 261 | try { |
262 | appearance = session.Load(typeof(AvatarAppearance), user) as AvatarAppearance; | 262 | appearance = session.Load(typeof(AvatarAppearance), user) as AvatarAppearance; |
263 | } catch (ObjectNotFoundException e) { | 263 | } catch (ObjectNotFoundException) { |
264 | appearance = null; | 264 | appearance = null; |
265 | } | 265 | } |
266 | return appearance; | 266 | return appearance; |
@@ -271,7 +271,7 @@ namespace OpenSim.Data.NHibernate | |||
271 | AvatarAppearance appearance; | 271 | AvatarAppearance appearance; |
272 | try { | 272 | try { |
273 | appearance = session.Load(typeof(AvatarAppearance), uuid) as AvatarAppearance; | 273 | appearance = session.Load(typeof(AvatarAppearance), uuid) as AvatarAppearance; |
274 | } catch (ObjectNotFoundException e) { | 274 | } catch (ObjectNotFoundException) { |
275 | appearance = null; | 275 | appearance = null; |
276 | } | 276 | } |
277 | 277 | ||
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 | ||
diff --git a/OpenSim/Grid/AssetServer/RestService.cs b/OpenSim/Grid/AssetServer/RestService.cs index e0e5656..98f86f1 100644 --- a/OpenSim/Grid/AssetServer/RestService.cs +++ b/OpenSim/Grid/AssetServer/RestService.cs | |||
@@ -44,7 +44,7 @@ namespace OpenSim.Grid.AssetServer | |||
44 | { | 44 | { |
45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
46 | 46 | ||
47 | private OpenAsset_Main m_assetManager; | 47 | // private OpenAsset_Main m_assetManager; |
48 | private IAssetProvider m_assetProvider; | 48 | private IAssetProvider m_assetProvider; |
49 | 49 | ||
50 | /// <summary> | 50 | /// <summary> |
@@ -56,7 +56,7 @@ namespace OpenSim.Grid.AssetServer | |||
56 | : base("GET", "/assets") | 56 | : base("GET", "/assets") |
57 | { | 57 | { |
58 | m_log.Info("[REST]: In Get Request"); | 58 | m_log.Info("[REST]: In Get Request"); |
59 | m_assetManager = assetManager; | 59 | // m_assetManager = assetManager; |
60 | m_assetProvider = assetProvider; | 60 | m_assetProvider = assetProvider; |
61 | } | 61 | } |
62 | 62 | ||
@@ -120,7 +120,7 @@ namespace OpenSim.Grid.AssetServer | |||
120 | { | 120 | { |
121 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 121 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
122 | 122 | ||
123 | private OpenAsset_Main m_assetManager; | 123 | // private OpenAsset_Main m_assetManager; |
124 | private IAssetProvider m_assetProvider; | 124 | private IAssetProvider m_assetProvider; |
125 | 125 | ||
126 | public override byte[] Handle(string path, Stream request, | 126 | public override byte[] Handle(string path, Stream request, |
@@ -131,7 +131,7 @@ namespace OpenSim.Grid.AssetServer | |||
131 | LLUUID assetId; | 131 | LLUUID assetId; |
132 | if (param.Length > 0) | 132 | if (param.Length > 0) |
133 | LLUUID.TryParse(param, out assetId); | 133 | LLUUID.TryParse(param, out assetId); |
134 | byte[] txBuffer = new byte[4096]; | 134 | // byte[] txBuffer = new byte[4096]; |
135 | 135 | ||
136 | XmlSerializer xs = new XmlSerializer(typeof (AssetBase)); | 136 | XmlSerializer xs = new XmlSerializer(typeof (AssetBase)); |
137 | AssetBase asset = (AssetBase) xs.Deserialize(request); | 137 | AssetBase asset = (AssetBase) xs.Deserialize(request); |
@@ -146,7 +146,7 @@ namespace OpenSim.Grid.AssetServer | |||
146 | public PostAssetStreamHandler(OpenAsset_Main assetManager, IAssetProvider assetProvider) | 146 | public PostAssetStreamHandler(OpenAsset_Main assetManager, IAssetProvider assetProvider) |
147 | : base("POST", "/assets") | 147 | : base("POST", "/assets") |
148 | { | 148 | { |
149 | m_assetManager = assetManager; | 149 | // m_assetManager = assetManager; |
150 | m_assetProvider = assetProvider; | 150 | m_assetProvider = assetProvider; |
151 | } | 151 | } |
152 | } | 152 | } |
diff --git a/OpenSim/Grid/MessagingServer/Main.cs b/OpenSim/Grid/MessagingServer/Main.cs index 91f2101..781b49b 100644 --- a/OpenSim/Grid/MessagingServer/Main.cs +++ b/OpenSim/Grid/MessagingServer/Main.cs | |||
@@ -48,7 +48,7 @@ namespace OpenSim.Grid.MessagingServer | |||
48 | private MessageServerConfig Cfg; | 48 | private MessageServerConfig Cfg; |
49 | private MessageService msgsvc; | 49 | private MessageService msgsvc; |
50 | 50 | ||
51 | private LLUUID m_lastCreatedUser = LLUUID.Random(); | 51 | // private LLUUID m_lastCreatedUser = LLUUID.Random(); |
52 | 52 | ||
53 | [STAThread] | 53 | [STAThread] |
54 | public static void Main(string[] args) | 54 | public static void Main(string[] args) |
diff --git a/OpenSim/Grid/MessagingServer/MessageService.cs b/OpenSim/Grid/MessagingServer/MessageService.cs index cec596f..7be62b0 100644 --- a/OpenSim/Grid/MessagingServer/MessageService.cs +++ b/OpenSim/Grid/MessagingServer/MessageService.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Grid.MessagingServer | |||
58 | private Hashtable m_presence_BackReferences = new Hashtable(); | 58 | private Hashtable m_presence_BackReferences = new Hashtable(); |
59 | 59 | ||
60 | // Hashtable containing work units that need to be processed | 60 | // Hashtable containing work units that need to be processed |
61 | private Hashtable m_unProcessedWorkUnits = new Hashtable(); | 61 | // private Hashtable m_unProcessedWorkUnits = new Hashtable(); |
62 | 62 | ||
63 | public MessageService(MessageServerConfig cfg) | 63 | public MessageService(MessageServerConfig cfg) |
64 | { | 64 | { |
@@ -588,9 +588,9 @@ namespace OpenSim.Grid.MessagingServer | |||
588 | uint regX = Convert.ToUInt32((string)responseData["region_locx"]); | 588 | uint regX = Convert.ToUInt32((string)responseData["region_locx"]); |
589 | uint regY = Convert.ToUInt32((string)responseData["region_locy"]); | 589 | uint regY = Convert.ToUInt32((string)responseData["region_locy"]); |
590 | string internalIpStr = (string)responseData["sim_ip"]; | 590 | string internalIpStr = (string)responseData["sim_ip"]; |
591 | uint port = Convert.ToUInt32(responseData["sim_port"]); | 591 | // uint port = Convert.ToUInt32(responseData["sim_port"]); |
592 | string externalUri = (string)responseData["sim_uri"]; | 592 | // string externalUri = (string)responseData["sim_uri"]; |
593 | string neighbourExternalUri = externalUri; | 593 | // string neighbourExternalUri = externalUri; |
594 | 594 | ||
595 | regionProfile = new RegionProfileData(); | 595 | regionProfile = new RegionProfileData(); |
596 | regionProfile.httpPort = (uint)Convert.ToInt32((string)responseData["http_port"]); | 596 | regionProfile.httpPort = (uint)Convert.ToInt32((string)responseData["http_port"]); |
@@ -655,7 +655,7 @@ namespace OpenSim.Grid.MessagingServer | |||
655 | throw(ex); | 655 | throw(ex); |
656 | } | 656 | } |
657 | Hashtable GridRespData = (Hashtable)UserResp.Value; | 657 | Hashtable GridRespData = (Hashtable)UserResp.Value; |
658 | Hashtable griddatahash = GridRespData; | 658 | // Hashtable griddatahash = GridRespData; |
659 | 659 | ||
660 | // Process Response | 660 | // Process Response |
661 | if (GridRespData.ContainsKey("responsestring")) | 661 | if (GridRespData.ContainsKey("responsestring")) |
@@ -704,7 +704,7 @@ namespace OpenSim.Grid.MessagingServer | |||
704 | throw (ex); | 704 | throw (ex); |
705 | } | 705 | } |
706 | Hashtable UserRespData = (Hashtable)UserResp.Value; | 706 | Hashtable UserRespData = (Hashtable)UserResp.Value; |
707 | Hashtable userdatahash = UserRespData; | 707 | // Hashtable userdatahash = UserRespData; |
708 | 708 | ||
709 | // Process Response | 709 | // Process Response |
710 | if (UserRespData.ContainsKey("responsestring")) | 710 | if (UserRespData.ContainsKey("responsestring")) |
diff --git a/OpenSim/Grid/MessagingServer/PresenceInformer.cs b/OpenSim/Grid/MessagingServer/PresenceInformer.cs index e02aa06..39fcadb 100644 --- a/OpenSim/Grid/MessagingServer/PresenceInformer.cs +++ b/OpenSim/Grid/MessagingServer/PresenceInformer.cs | |||
@@ -118,7 +118,8 @@ namespace OpenSim.Grid.MessagingServer | |||
118 | try | 118 | try |
119 | { | 119 | { |
120 | 120 | ||
121 | XmlRpcResponse RegionResp = RegionReq.Send(whichRegion.httpServerURI, 6000); | 121 | // XmlRpcResponse RegionResp = RegionReq.Send(whichRegion.httpServerURI, 6000); |
122 | RegionReq.Send(whichRegion.httpServerURI, 6000); | ||
122 | } | 123 | } |
123 | catch (WebException) | 124 | catch (WebException) |
124 | { | 125 | { |
diff --git a/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs b/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs index efe077d..13bf290 100644 --- a/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs +++ b/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs | |||
@@ -84,7 +84,7 @@ namespace OpenSim.Grid.MessagingServer | |||
84 | 84 | ||
85 | public class PostXMPPStreamHandler : BaseStreamHandler | 85 | public class PostXMPPStreamHandler : BaseStreamHandler |
86 | { | 86 | { |
87 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 87 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
88 | 88 | ||
89 | public override byte[] Handle(string path, Stream request, | 89 | public override byte[] Handle(string path, Stream request, |
90 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) | 90 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) |
@@ -94,7 +94,7 @@ namespace OpenSim.Grid.MessagingServer | |||
94 | LLUUID assetId; | 94 | LLUUID assetId; |
95 | if (param.Length > 0) | 95 | if (param.Length > 0) |
96 | LLUUID.TryParse(param, out assetId); | 96 | LLUUID.TryParse(param, out assetId); |
97 | byte[] txBuffer = new byte[4096]; | 97 | // byte[] txBuffer = new byte[4096]; |
98 | 98 | ||
99 | // TODO: Read POST serialize XMPP stanzas | 99 | // TODO: Read POST serialize XMPP stanzas |
100 | 100 | ||
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs index 8c31b9b..97be5c3 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs | |||
@@ -29,13 +29,13 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer.Region | |||
29 | { | 29 | { |
30 | public class RegionConnectionManager : RegionBase | 30 | public class RegionConnectionManager : RegionBase |
31 | { | 31 | { |
32 | private ScriptServerMain m_ScriptServerMain; | 32 | // private ScriptServerMain m_ScriptServerMain; |
33 | private object m_Connection; | 33 | // private object m_Connection; |
34 | 34 | ||
35 | public RegionConnectionManager(ScriptServerMain scm, object Connection) | 35 | public RegionConnectionManager(ScriptServerMain scm, object Connection) |
36 | { | 36 | { |
37 | m_ScriptServerMain = scm; | 37 | // m_ScriptServerMain = scm; |
38 | m_Connection = Connection; | 38 | // m_Connection = Connection; |
39 | } | 39 | } |
40 | } | 40 | } |
41 | } \ No newline at end of file | 41 | } \ No newline at end of file |
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs index 9d67602..37fbcfb 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs | |||
@@ -34,12 +34,12 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer | |||
34 | { | 34 | { |
35 | private ScriptEngineLoader ScriptEngineLoader; | 35 | private ScriptEngineLoader ScriptEngineLoader; |
36 | private List<ScriptServerInterfaces.ScriptEngine> scriptEngines = new List<ScriptServerInterfaces.ScriptEngine>(); | 36 | private List<ScriptServerInterfaces.ScriptEngine> scriptEngines = new List<ScriptServerInterfaces.ScriptEngine>(); |
37 | private ScriptServerMain m_ScriptServerMain; | 37 | // private ScriptServerMain m_ScriptServerMain; |
38 | 38 | ||
39 | // Initialize | 39 | // Initialize |
40 | public ScriptEngineManager(ScriptServerMain scm) | 40 | public ScriptEngineManager(ScriptServerMain scm) |
41 | { | 41 | { |
42 | m_ScriptServerMain = scm; | 42 | // m_ScriptServerMain = scm; |
43 | ScriptEngineLoader = new ScriptEngineLoader(); | 43 | ScriptEngineLoader = new ScriptEngineLoader(); |
44 | } | 44 | } |
45 | 45 | ||
diff --git a/OpenSim/Grid/UserServer/MessageServersConnector.cs b/OpenSim/Grid/UserServer/MessageServersConnector.cs index 208131e..b3f8b19 100644 --- a/OpenSim/Grid/UserServer/MessageServersConnector.cs +++ b/OpenSim/Grid/UserServer/MessageServersConnector.cs | |||
@@ -140,12 +140,12 @@ namespace OpenSim.Grid.UserServer | |||
140 | 140 | ||
141 | if (requestData.Contains("fromuri")) | 141 | if (requestData.Contains("fromuri")) |
142 | { | 142 | { |
143 | string sURI = (string)requestData["fromuri"]; | 143 | // string sURI = (string)requestData["fromuri"]; |
144 | string sagentID = (string)requestData["agentid"]; | 144 | // string sagentID = (string)requestData["agentid"]; |
145 | string ssessionID = (string)requestData["sessionid"]; | 145 | // string ssessionID = (string)requestData["sessionid"]; |
146 | string scurrentRegionID = (string)requestData["regionid"]; | 146 | // string scurrentRegionID = (string)requestData["regionid"]; |
147 | string sregionhandle = (string)requestData["regionhandle"]; | 147 | // string sregionhandle = (string)requestData["regionhandle"]; |
148 | string scurrentpos = (string)requestData["currentpos"]; | 148 | // string scurrentpos = (string)requestData["currentpos"]; |
149 | //LLVector3.TryParse((string)reader["currentPos"], out retval.currentPos); | 149 | //LLVector3.TryParse((string)reader["currentPos"], out retval.currentPos); |
150 | // TODO: Okay now raise event so the user server can pass this data to the Usermanager | 150 | // TODO: Okay now raise event so the user server can pass this data to the Usermanager |
151 | 151 | ||
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index 907a530..d4fb187 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs | |||
@@ -164,7 +164,7 @@ namespace OpenSim.Grid.UserServer | |||
164 | 164 | ||
165 | public XmlRpcResponse XmlRPCGetAvatarPickerAvatar(XmlRpcRequest request) | 165 | public XmlRpcResponse XmlRPCGetAvatarPickerAvatar(XmlRpcRequest request) |
166 | { | 166 | { |
167 | XmlRpcResponse response = new XmlRpcResponse(); | 167 | // XmlRpcResponse response = new XmlRpcResponse(); |
168 | Hashtable requestData = (Hashtable) request.Params[0]; | 168 | Hashtable requestData = (Hashtable) request.Params[0]; |
169 | List<AvatarPickerAvatar> returnAvatar = new List<AvatarPickerAvatar>(); | 169 | List<AvatarPickerAvatar> returnAvatar = new List<AvatarPickerAvatar>(); |
170 | LLUUID queryID = new LLUUID(LLUUID.Zero.ToString()); | 170 | LLUUID queryID = new LLUUID(LLUUID.Zero.ToString()); |
@@ -188,25 +188,25 @@ namespace OpenSim.Grid.UserServer | |||
188 | 188 | ||
189 | if (requestData.Contains("avatar_id") && requestData.Contains("region_handle") && requestData.Contains("region_uuid")) | 189 | if (requestData.Contains("avatar_id") && requestData.Contains("region_handle") && requestData.Contains("region_uuid")) |
190 | { | 190 | { |
191 | ulong cregionhandle = 0; | 191 | // ulong cregionhandle = 0; |
192 | LLUUID regionUUID = LLUUID.Zero; | 192 | LLUUID regionUUID = LLUUID.Zero; |
193 | LLUUID AvatarID = LLUUID.Zero; | 193 | LLUUID AvatarID = LLUUID.Zero; |
194 | 194 | ||
195 | Helpers.TryParse((string)requestData["avatar_id"], out AvatarID); | 195 | Helpers.TryParse((string)requestData["avatar_id"], out AvatarID); |
196 | Helpers.TryParse((string)requestData["region_uuid"], out regionUUID); | 196 | Helpers.TryParse((string)requestData["region_uuid"], out regionUUID); |
197 | try | 197 | // try |
198 | { | 198 | // { |
199 | cregionhandle = (ulong)Convert.ToInt64((string)requestData["region_handle"]); | 199 | // cregionhandle = (ulong)Convert.ToInt64((string)requestData["region_handle"]); |
200 | } | 200 | // } |
201 | catch (ArgumentException) | 201 | // catch (ArgumentException) |
202 | { | 202 | // { |
203 | } | 203 | // } |
204 | catch (OverflowException) | 204 | // catch (OverflowException) |
205 | { | 205 | // { |
206 | } | 206 | // } |
207 | catch (FormatException) | 207 | // catch (FormatException) |
208 | { | 208 | // { |
209 | } | 209 | // } |
210 | 210 | ||
211 | if (AvatarID != LLUUID.Zero) | 211 | if (AvatarID != LLUUID.Zero) |
212 | { | 212 | { |
@@ -285,9 +285,9 @@ namespace OpenSim.Grid.UserServer | |||
285 | 285 | ||
286 | public XmlRpcResponse XmlRpcResponseXmlRPCGetUserFriendList(XmlRpcRequest request) | 286 | public XmlRpcResponse XmlRpcResponseXmlRPCGetUserFriendList(XmlRpcRequest request) |
287 | { | 287 | { |
288 | XmlRpcResponse response = new XmlRpcResponse(); | 288 | // XmlRpcResponse response = new XmlRpcResponse(); |
289 | Hashtable requestData = (Hashtable)request.Params[0]; | 289 | Hashtable requestData = (Hashtable)request.Params[0]; |
290 | Hashtable responseData = new Hashtable(); | 290 | // Hashtable responseData = new Hashtable(); |
291 | 291 | ||
292 | List<FriendListItem> returndata = new List<FriendListItem>(); | 292 | List<FriendListItem> returndata = new List<FriendListItem>(); |
293 | 293 | ||
@@ -354,14 +354,14 @@ namespace OpenSim.Grid.UserServer | |||
354 | 354 | ||
355 | public XmlRpcResponse XmlRPCGetUserMethodName(XmlRpcRequest request) | 355 | public XmlRpcResponse XmlRPCGetUserMethodName(XmlRpcRequest request) |
356 | { | 356 | { |
357 | XmlRpcResponse response = new XmlRpcResponse(); | 357 | // XmlRpcResponse response = new XmlRpcResponse(); |
358 | Hashtable requestData = (Hashtable) request.Params[0]; | 358 | Hashtable requestData = (Hashtable) request.Params[0]; |
359 | UserProfileData userProfile; | 359 | UserProfileData userProfile; |
360 | if (requestData.Contains("avatar_name")) | 360 | if (requestData.Contains("avatar_name")) |
361 | { | 361 | { |
362 | string query = (string) requestData["avatar_name"]; | 362 | string query = (string) requestData["avatar_name"]; |
363 | 363 | ||
364 | Regex objAlphaNumericPattern = new Regex("[^a-zA-Z0-9]"); | 364 | // Regex objAlphaNumericPattern = new Regex("[^a-zA-Z0-9]"); |
365 | 365 | ||
366 | string[] querysplit; | 366 | string[] querysplit; |
367 | querysplit = query.Split(' '); | 367 | querysplit = query.Split(' '); |
@@ -389,7 +389,7 @@ namespace OpenSim.Grid.UserServer | |||
389 | 389 | ||
390 | public XmlRpcResponse XmlRPCGetUserMethodUUID(XmlRpcRequest request) | 390 | public XmlRpcResponse XmlRPCGetUserMethodUUID(XmlRpcRequest request) |
391 | { | 391 | { |
392 | XmlRpcResponse response = new XmlRpcResponse(); | 392 | // XmlRpcResponse response = new XmlRpcResponse(); |
393 | Hashtable requestData = (Hashtable) request.Params[0]; | 393 | Hashtable requestData = (Hashtable) request.Params[0]; |
394 | UserProfileData userProfile; | 394 | UserProfileData userProfile; |
395 | //CFK: this clogs the UserServer log and is not necessary at this time. | 395 | //CFK: this clogs the UserServer log and is not necessary at this time. |
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index d0d5378..9583b6d 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -153,7 +153,7 @@ namespace OpenSim | |||
153 | 153 | ||
154 | m_config = new OpenSimConfigSource(); | 154 | m_config = new OpenSimConfigSource(); |
155 | m_config.Source = new IniConfigSource(); | 155 | m_config.Source = new IniConfigSource(); |
156 | IConfigSource icong; | 156 | // IConfigSource icong; |
157 | 157 | ||
158 | //check for .INI file (either default or name passed in command line) | 158 | //check for .INI file (either default or name passed in command line) |
159 | if (File.Exists(Application.iniFilePath)) | 159 | if (File.Exists(Application.iniFilePath)) |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 49174bd..08b93f3 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -253,9 +253,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
253 | private UpdateVector handlerUpdatePrimGroupScale = null; //OnUpdateGroupScale; | 253 | private UpdateVector handlerUpdatePrimGroupScale = null; //OnUpdateGroupScale; |
254 | private UpdateVector handlerUpdateVector = null; //OnUpdatePrimGroupPosition; | 254 | private UpdateVector handlerUpdateVector = null; //OnUpdatePrimGroupPosition; |
255 | private UpdatePrimRotation handlerUpdatePrimRotation = null; //OnUpdatePrimGroupRotation; | 255 | private UpdatePrimRotation handlerUpdatePrimRotation = null; //OnUpdatePrimGroupRotation; |
256 | private UpdatePrimGroupRotation handlerUpdatePrimGroupRotation = null; //OnUpdatePrimGroupMouseRotation; | 256 | // private UpdatePrimGroupRotation handlerUpdatePrimGroupRotation = null; //OnUpdatePrimGroupMouseRotation; |
257 | private PacketStats handlerPacketStats = null; // OnPacketStats;# | 257 | private PacketStats handlerPacketStats = null; // OnPacketStats;# |
258 | private RequestAsset handlerRequestAsset = null; // OnRequestAsset; | 258 | // private RequestAsset handlerRequestAsset = null; // OnRequestAsset; |
259 | private UUIDNameRequest handlerTeleportHomeRequest = null; | 259 | private UUIDNameRequest handlerTeleportHomeRequest = null; |
260 | 260 | ||
261 | private ScriptAnswer handlerScriptAnswer = null; | 261 | private ScriptAnswer handlerScriptAnswer = null; |
@@ -3467,7 +3467,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3467 | } | 3467 | } |
3468 | else | 3468 | else |
3469 | { | 3469 | { |
3470 | LLUUID partId = part.UUID; | 3470 | // LLUUID partId = part.UUID; |
3471 | UpdatePrimRotation handlerUpdatePrimRotation = OnUpdatePrimGroupRotation; | 3471 | UpdatePrimRotation handlerUpdatePrimRotation = OnUpdatePrimGroupRotation; |
3472 | UpdatePrimGroupRotation handlerUpdatePrimGroupRotation = OnUpdatePrimGroupMouseRotation; | 3472 | UpdatePrimGroupRotation handlerUpdatePrimGroupRotation = OnUpdatePrimGroupMouseRotation; |
3473 | 3473 | ||
@@ -4135,7 +4135,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4135 | byte[] message = inchatpack.ChatData.Message; | 4135 | byte[] message = inchatpack.ChatData.Message; |
4136 | byte type = inchatpack.ChatData.Type; | 4136 | byte type = inchatpack.ChatData.Type; |
4137 | LLVector3 fromPos = new LLVector3(); // ClientAvatar.Pos; | 4137 | LLVector3 fromPos = new LLVector3(); // ClientAvatar.Pos; |
4138 | LLUUID fromAgentID = AgentId; | 4138 | // LLUUID fromAgentID = AgentId; |
4139 | 4139 | ||
4140 | int channel = inchatpack.ChatData.Channel; | 4140 | int channel = inchatpack.ChatData.Channel; |
4141 | 4141 | ||
@@ -4388,7 +4388,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4388 | DetachAttachmentIntoInvPacket detachtoInv = (DetachAttachmentIntoInvPacket)Pack; | 4388 | DetachAttachmentIntoInvPacket detachtoInv = (DetachAttachmentIntoInvPacket)Pack; |
4389 | 4389 | ||
4390 | LLUUID itemID = detachtoInv.ObjectData.ItemID; | 4390 | LLUUID itemID = detachtoInv.ObjectData.ItemID; |
4391 | LLUUID ATTACH_agentID = detachtoInv.ObjectData.AgentID; | 4391 | // LLUUID ATTACH_agentID = detachtoInv.ObjectData.AgentID; |
4392 | 4392 | ||
4393 | handlerDetachAttachmentIntoInv(itemID, this); | 4393 | handlerDetachAttachmentIntoInv(itemID, this); |
4394 | } | 4394 | } |
@@ -5938,7 +5938,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5938 | break; | 5938 | break; |
5939 | 5939 | ||
5940 | case PacketType.RequestRegionInfo: | 5940 | case PacketType.RequestRegionInfo: |
5941 | RequestRegionInfoPacket.AgentDataBlock mPacket = ((RequestRegionInfoPacket)Pack).AgentData; | 5941 | // RequestRegionInfoPacket.AgentDataBlock mPacket = ((RequestRegionInfoPacket)Pack).AgentData; |
5942 | 5942 | ||
5943 | handlerRegionInfoRequest = OnRegionInfoRequest; | 5943 | handlerRegionInfoRequest = OnRegionInfoRequest; |
5944 | if (handlerRegionInfoRequest != null) | 5944 | if (handlerRegionInfoRequest != null) |
@@ -5948,8 +5948,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5948 | break; | 5948 | break; |
5949 | case PacketType.EstateCovenantRequest: | 5949 | case PacketType.EstateCovenantRequest: |
5950 | 5950 | ||
5951 | EstateCovenantRequestPacket.AgentDataBlock epack = | 5951 | // EstateCovenantRequestPacket.AgentDataBlock epack = |
5952 | ((EstateCovenantRequestPacket)Pack).AgentData; | 5952 | // ((EstateCovenantRequestPacket)Pack).AgentData; |
5953 | 5953 | ||
5954 | handlerEstateCovenantRequest = OnEstateCovenantRequest; | 5954 | handlerEstateCovenantRequest = OnEstateCovenantRequest; |
5955 | if (handlerEstateCovenantRequest != null) | 5955 | if (handlerEstateCovenantRequest != null) |
@@ -6287,7 +6287,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6287 | public void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia) | 6287 | public void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia) |
6288 | { | 6288 | { |
6289 | LandStatReplyPacket lsrp = new LandStatReplyPacket(); | 6289 | LandStatReplyPacket lsrp = new LandStatReplyPacket(); |
6290 | LandStatReplyPacket.RequestDataBlock lsreqdpb = new LandStatReplyPacket.RequestDataBlock(); | 6290 | // LandStatReplyPacket.RequestDataBlock lsreqdpb = new LandStatReplyPacket.RequestDataBlock(); |
6291 | LandStatReplyPacket.ReportDataBlock[] lsrepdba = new LandStatReplyPacket.ReportDataBlock[lsrpia.Length]; | 6291 | LandStatReplyPacket.ReportDataBlock[] lsrepdba = new LandStatReplyPacket.ReportDataBlock[lsrpia.Length]; |
6292 | //LandStatReplyPacket.ReportDataBlock lsrepdb = new LandStatReplyPacket.ReportDataBlock(); | 6292 | //LandStatReplyPacket.ReportDataBlock lsrepdb = new LandStatReplyPacket.ReportDataBlock(); |
6293 | // lsrepdb. | 6293 | // lsrepdb. |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs index 3786489..51dcde7 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs | |||
@@ -57,8 +57,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
57 | private Queue<LLQueItem> TextureOutgoingPacketQueue; | 57 | private Queue<LLQueItem> TextureOutgoingPacketQueue; |
58 | private Queue<LLQueItem> AssetOutgoingPacketQueue; | 58 | private Queue<LLQueItem> AssetOutgoingPacketQueue; |
59 | 59 | ||
60 | private Dictionary<uint, uint> PendingAcks = new Dictionary<uint, uint>(); | 60 | // private Dictionary<uint, uint> PendingAcks = new Dictionary<uint, uint>(); |
61 | private Dictionary<uint, Packet> NeedAck = new Dictionary<uint, Packet>(); | 61 | // private Dictionary<uint, Packet> NeedAck = new Dictionary<uint, Packet>(); |
62 | 62 | ||
63 | // All throttle times and number of bytes are calculated by dividing by this value | 63 | // All throttle times and number of bytes are calculated by dividing by this value |
64 | // This value also determines how many times per throttletimems the timer will run | 64 | // This value also determines how many times per throttletimems the timer will run |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index eb4b8e7..d705ef2 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -418,9 +418,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
418 | m_socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); | 418 | m_socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); |
419 | m_socket.Bind(ServerIncoming); | 419 | m_socket.Bind(ServerIncoming); |
420 | // Add flags to the UDP socket to prevent "Socket forcibly closed by host" | 420 | // Add flags to the UDP socket to prevent "Socket forcibly closed by host" |
421 | uint IOC_IN = 0x80000000; | 421 | // uint IOC_IN = 0x80000000; |
422 | uint IOC_VENDOR = 0x18000000; | 422 | // uint IOC_VENDOR = 0x18000000; |
423 | uint SIO_UDP_CONNRESET = IOC_IN | IOC_VENDOR | 12; | 423 | // uint SIO_UDP_CONNRESET = IOC_IN | IOC_VENDOR | 12; |
424 | // TODO: this apparently works in .NET but not in Mono, need to sort out the right flags here. | 424 | // TODO: this apparently works in .NET but not in Mono, need to sort out the right flags here. |
425 | // m_socket.IOControl((int)SIO_UDP_CONNRESET, new byte[] { Convert.ToByte(false) }, null); | 425 | // m_socket.IOControl((int)SIO_UDP_CONNRESET, new byte[] { Convert.ToByte(false) }, null); |
426 | 426 | ||
diff --git a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs index ae0b5ff..55ef047 100644 --- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs +++ b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs | |||
@@ -79,7 +79,7 @@ namespace OpenSim.Region.DataSnapshot | |||
79 | 79 | ||
80 | //Program objects | 80 | //Program objects |
81 | private SnapshotStore m_snapStore = null; | 81 | private SnapshotStore m_snapStore = null; |
82 | private DataRequestHandler m_requests = null; | 82 | // private DataRequestHandler m_requests = null; |
83 | 83 | ||
84 | #endregion | 84 | #endregion |
85 | 85 | ||
@@ -144,7 +144,7 @@ namespace OpenSim.Region.DataSnapshot | |||
144 | m_passedCheck.Start(); | 144 | m_passedCheck.Start(); |
145 | 145 | ||
146 | //Hand it the first scene, assuming that all scenes have the same BaseHTTPServer | 146 | //Hand it the first scene, assuming that all scenes have the same BaseHTTPServer |
147 | m_requests = new DataRequestHandler(scene, this); | 147 | // m_requests = new DataRequestHandler(scene, this); |
148 | 148 | ||
149 | m_hostname = scene.RegionInfo.ExternalHostName; | 149 | m_hostname = scene.RegionInfo.ExternalHostName; |
150 | m_snapStore = new SnapshotStore(m_snapsDir, m_gridinfo, m_listener_port, m_hostname); | 150 | m_snapStore = new SnapshotStore(m_snapsDir, m_gridinfo, m_listener_port, m_hostname); |
@@ -325,17 +325,18 @@ namespace OpenSim.Region.DataSnapshot | |||
325 | m_log.Warn("[DATASNAPSHOT] Ignoring unknown exception " + e.ToString()); | 325 | m_log.Warn("[DATASNAPSHOT] Ignoring unknown exception " + e.ToString()); |
326 | } | 326 | } |
327 | byte[] response = new byte[1024]; | 327 | byte[] response = new byte[1024]; |
328 | int n = 0; | 328 | // int n = 0; |
329 | try | 329 | try |
330 | { | 330 | { |
331 | n = reply.Read(response, 0, 1024); | 331 | // n = reply.Read(response, 0, 1024); |
332 | reply.Read(response, 0, 1024); | ||
332 | } | 333 | } |
333 | catch (Exception e) | 334 | catch (Exception e) |
334 | { | 335 | { |
335 | m_log.Warn("[DATASNAPSHOT] Unable to decode reply from data service. Ignoring. " + e.StackTrace); | 336 | m_log.WarnFormat("[DATASNAPSHOT] Unable to decode reply from data service. Ignoring. {0}", e.StackTrace); |
336 | } | 337 | } |
337 | // This is not quite working, so... | 338 | // This is not quite working, so... |
338 | string responseStr = Encoding.UTF8.GetString(response); | 339 | // string responseStr = Encoding.UTF8.GetString(response); |
339 | m_log.Info("[DATASNAPSHOT] data service notified: " + url); | 340 | m_log.Info("[DATASNAPSHOT] data service notified: " + url); |
340 | } | 341 | } |
341 | 342 | ||
diff --git a/OpenSim/Region/DataSnapshot/EstateSnapshot.cs b/OpenSim/Region/DataSnapshot/EstateSnapshot.cs index 9a25c1d..99a4a0d 100644 --- a/OpenSim/Region/DataSnapshot/EstateSnapshot.cs +++ b/OpenSim/Region/DataSnapshot/EstateSnapshot.cs | |||
@@ -42,7 +42,7 @@ namespace OpenSim.Region.DataSnapshot.Providers | |||
42 | * I don't think anything changes the fields beyond RegionModule PostInit, however. | 42 | * I don't think anything changes the fields beyond RegionModule PostInit, however. |
43 | */ | 43 | */ |
44 | private Scene m_scene = null; | 44 | private Scene m_scene = null; |
45 | private DataSnapshotManager m_parent = null; | 45 | // private DataSnapshotManager m_parent = null; |
46 | private bool m_stale = true; | 46 | private bool m_stale = true; |
47 | 47 | ||
48 | #region IDataSnapshotProvider Members | 48 | #region IDataSnapshotProvider Members |
@@ -84,7 +84,7 @@ namespace OpenSim.Region.DataSnapshot.Providers | |||
84 | public void Initialize(Scene scene, DataSnapshotManager parent) | 84 | public void Initialize(Scene scene, DataSnapshotManager parent) |
85 | { | 85 | { |
86 | m_scene = scene; | 86 | m_scene = scene; |
87 | m_parent = parent; | 87 | // m_parent = parent; |
88 | } | 88 | } |
89 | 89 | ||
90 | public Scene GetParentScene | 90 | public Scene GetParentScene |
diff --git a/OpenSim/Region/DataSnapshot/LandSnapshot.cs b/OpenSim/Region/DataSnapshot/LandSnapshot.cs index 02e80ba..efc4a84 100644 --- a/OpenSim/Region/DataSnapshot/LandSnapshot.cs +++ b/OpenSim/Region/DataSnapshot/LandSnapshot.cs | |||
@@ -43,7 +43,7 @@ namespace OpenSim.Region.DataSnapshot.Providers | |||
43 | public class LandSnapshot : IDataSnapshotProvider | 43 | public class LandSnapshot : IDataSnapshotProvider |
44 | { | 44 | { |
45 | private Scene m_scene = null; | 45 | private Scene m_scene = null; |
46 | private DataSnapshotManager m_parent = null; | 46 | // private DataSnapshotManager m_parent = null; |
47 | //private Dictionary<int, Land> m_landIndexed = new Dictionary<int, Land>(); | 47 | //private Dictionary<int, Land> m_landIndexed = new Dictionary<int, Land>(); |
48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
49 | private bool m_stale = true; | 49 | private bool m_stale = true; |
@@ -106,7 +106,7 @@ namespace OpenSim.Region.DataSnapshot.Providers | |||
106 | public void Initialize(Scene scene, DataSnapshotManager parent) | 106 | public void Initialize(Scene scene, DataSnapshotManager parent) |
107 | { | 107 | { |
108 | m_scene = scene; | 108 | m_scene = scene; |
109 | m_parent = parent; | 109 | // m_parent = parent; |
110 | 110 | ||
111 | //Brought back from the dead for staleness checks. | 111 | //Brought back from the dead for staleness checks. |
112 | m_scene.EventManager.OnNewClient += OnNewClient; | 112 | m_scene.EventManager.OnNewClient += OnNewClient; |
diff --git a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs index e5b2ad4..d2a5051 100644 --- a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs +++ b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs | |||
@@ -40,14 +40,14 @@ namespace OpenSim.Region.DataSnapshot.Providers | |||
40 | public class ObjectSnapshot : IDataSnapshotProvider | 40 | public class ObjectSnapshot : IDataSnapshotProvider |
41 | { | 41 | { |
42 | private Scene m_scene = null; | 42 | private Scene m_scene = null; |
43 | private DataSnapshotManager m_parent = null; | 43 | // private DataSnapshotManager m_parent = null; |
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 | private bool m_stale = true; | 45 | private bool m_stale = true; |
46 | 46 | ||
47 | public void Initialize(Scene scene, DataSnapshotManager parent) | 47 | public void Initialize(Scene scene, DataSnapshotManager parent) |
48 | { | 48 | { |
49 | m_scene = scene; | 49 | m_scene = scene; |
50 | m_parent = parent; | 50 | // m_parent = parent; |
51 | 51 | ||
52 | //To check for staleness, we must catch all incoming client packets. | 52 | //To check for staleness, we must catch all incoming client packets. |
53 | m_scene.EventManager.OnNewClient += OnNewClient; | 53 | m_scene.EventManager.OnNewClient += OnNewClient; |
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs index 0766c95..f4586b0 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs | |||
@@ -72,7 +72,9 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
72 | ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Notecard] = ".ncd"; | 72 | ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Notecard] = ".ncd"; |
73 | ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Object] = ".oob"; | 73 | ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Object] = ".oob"; |
74 | ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.RootFolder] = ".rfd"; // Not sure if we'll ever see this | 74 | ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.RootFolder] = ".rfd"; // Not sure if we'll ever see this |
75 | #pragma warning disable 0612 | ||
75 | ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Script] = ".spt"; // Not sure if we'll ever see this | 76 | ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Script] = ".spt"; // Not sure if we'll ever see this |
77 | #pragma warning restore 0612 | ||
76 | ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Simstate] = ".sst"; // Not sure if we'll ever see this | 78 | ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Simstate] = ".sst"; // Not sure if we'll ever see this |
77 | ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.SnapshotFolder] = ".sfd"; // Not sure if we'll ever see this | 79 | ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.SnapshotFolder] = ".sfd"; // Not sure if we'll ever see this |
78 | ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Sound] = ".ogg"; | 80 | ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Sound] = ".ogg"; |
@@ -95,7 +97,9 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
95 | EXTENSION_TO_ASSET_TYPE[".ncd"] = (sbyte)AssetType.Notecard; | 97 | EXTENSION_TO_ASSET_TYPE[".ncd"] = (sbyte)AssetType.Notecard; |
96 | EXTENSION_TO_ASSET_TYPE[".oob"] = (sbyte)AssetType.Object; | 98 | EXTENSION_TO_ASSET_TYPE[".oob"] = (sbyte)AssetType.Object; |
97 | EXTENSION_TO_ASSET_TYPE[".rfd"] = (sbyte)AssetType.RootFolder; | 99 | EXTENSION_TO_ASSET_TYPE[".rfd"] = (sbyte)AssetType.RootFolder; |
100 | #pragma warning disable 0612 | ||
98 | EXTENSION_TO_ASSET_TYPE[".spt"] = (sbyte)AssetType.Script; | 101 | EXTENSION_TO_ASSET_TYPE[".spt"] = (sbyte)AssetType.Script; |
102 | #pragma warning restore 0612 | ||
99 | EXTENSION_TO_ASSET_TYPE[".sst"] = (sbyte)AssetType.Simstate; | 103 | EXTENSION_TO_ASSET_TYPE[".sst"] = (sbyte)AssetType.Simstate; |
100 | EXTENSION_TO_ASSET_TYPE[".sfd"] = (sbyte)AssetType.SnapshotFolder; | 104 | EXTENSION_TO_ASSET_TYPE[".sfd"] = (sbyte)AssetType.SnapshotFolder; |
101 | EXTENSION_TO_ASSET_TYPE[".ogg"] = (sbyte)AssetType.Sound; | 105 | EXTENSION_TO_ASSET_TYPE[".ogg"] = (sbyte)AssetType.Sound; |
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs index ae3d333..69f712c 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs | |||
@@ -42,7 +42,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
42 | /// </summary> | 42 | /// </summary> |
43 | public class ArchiverModule : IRegionModule, IRegionArchiver | 43 | public class ArchiverModule : IRegionModule, IRegionArchiver |
44 | { | 44 | { |
45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 45 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
46 | 46 | ||
47 | /// <summary> | 47 | /// <summary> |
48 | /// Scene to which this module belongs | 48 | /// Scene to which this module belongs |
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCModule.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCModule.cs index 32a3cc4..86472f6 100644 --- a/OpenSim/Region/Environment/Modules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCModule.cs | |||
@@ -34,17 +34,17 @@ namespace OpenSim.Region.Environment.Modules.World.NPC | |||
34 | { | 34 | { |
35 | public class NPCModule : IRegionModule | 35 | public class NPCModule : IRegionModule |
36 | { | 36 | { |
37 | private const bool m_enabled = false; | 37 | // private const bool m_enabled = false; |
38 | 38 | ||
39 | public void Initialise(Scene scene, IConfigSource source) | 39 | public void Initialise(Scene scene, IConfigSource source) |
40 | { | 40 | { |
41 | if (m_enabled) | 41 | // if (m_enabled) |
42 | { | 42 | // { |
43 | NPCAvatar testAvatar = new NPCAvatar("Jack", "NPC", new LLVector3(128, 128, 40), scene); | 43 | // NPCAvatar testAvatar = new NPCAvatar("Jack", "NPC", new LLVector3(128, 128, 40), scene); |
44 | NPCAvatar testAvatar2 = new NPCAvatar("Jill", "NPC", new LLVector3(136, 128, 40), scene); | 44 | // NPCAvatar testAvatar2 = new NPCAvatar("Jill", "NPC", new LLVector3(136, 128, 40), scene); |
45 | scene.AddNewClient(testAvatar, false); | 45 | // scene.AddNewClient(testAvatar, false); |
46 | scene.AddNewClient(testAvatar2, false); | 46 | // scene.AddNewClient(testAvatar2, false); |
47 | } | 47 | // } |
48 | } | 48 | } |
49 | 49 | ||
50 | public void PostInitialise() | 50 | public void PostInitialise() |
diff --git a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs index bb4a568..f73c193 100644 --- a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs | |||
@@ -57,16 +57,16 @@ namespace OpenSim.Region.Environment.Modules | |||
57 | private double m_day_length = 0; | 57 | private double m_day_length = 0; |
58 | private int m_year_length = 0; | 58 | private int m_year_length = 0; |
59 | private double m_day_night = 0; | 59 | private double m_day_night = 0; |
60 | private double m_longitude = 0; | 60 | // private double m_longitude = 0; |
61 | private double m_latitude = 0; | 61 | // private double m_latitude = 0; |
62 | // Configurable defaults Defaults close to SL | 62 | // Configurable defaults Defaults close to SL |
63 | private string d_mode = "SL"; | 63 | private string d_mode = "SL"; |
64 | private int d_frame_mod = 100; // Every 10 seconds (actually less) | 64 | private int d_frame_mod = 100; // Every 10 seconds (actually less) |
65 | private double d_day_length = 4; // A VW day is 4 RW hours long | 65 | private double d_day_length = 4; // A VW day is 4 RW hours long |
66 | private int d_year_length = 60; // There are 60 VW days in a VW year | 66 | private int d_year_length = 60; // There are 60 VW days in a VW year |
67 | private double d_day_night = 0.45; // axis offset: ratio of light-to-dark, approx 1:3 | 67 | private double d_day_night = 0.45; // axis offset: ratio of light-to-dark, approx 1:3 |
68 | private double d_longitude = -73.53; | 68 | // private double d_longitude = -73.53; |
69 | private double d_latitude = 41.29; | 69 | // private double d_latitude = 41.29; |
70 | 70 | ||
71 | // Frame counter | 71 | // Frame counter |
72 | private uint m_frame = 0; | 72 | private uint m_frame = 0; |
@@ -80,7 +80,7 @@ namespace OpenSim.Region.Environment.Modules | |||
80 | private uint SecondsPerYear; // Length of a virtual year in RW seconds | 80 | private uint SecondsPerYear; // Length of a virtual year in RW seconds |
81 | private double SunSpeed; // Rate of passage in radians/second | 81 | private double SunSpeed; // Rate of passage in radians/second |
82 | private double SeasonSpeed; // Rate of change for seasonal effects | 82 | private double SeasonSpeed; // Rate of change for seasonal effects |
83 | private double HoursToRadians; // Rate of change for seasonal effects | 83 | // private double HoursToRadians; // Rate of change for seasonal effects |
84 | private long TicksOffset = 0; // seconds offset from UTC | 84 | private long TicksOffset = 0; // seconds offset from UTC |
85 | // Calculated every update | 85 | // Calculated every update |
86 | private float OrbitalPosition; // Orbital placement at a point in time | 86 | private float OrbitalPosition; // Orbital placement at a point in time |
@@ -88,7 +88,7 @@ namespace OpenSim.Region.Environment.Modules | |||
88 | private double TotalDistanceTravelled; // Distance since beginning of time (in radians) | 88 | private double TotalDistanceTravelled; // Distance since beginning of time (in radians) |
89 | private double SeasonalOffset; // Seaonal variation of tilt | 89 | private double SeasonalOffset; // Seaonal variation of tilt |
90 | private float Magnitude; // Normal tilt | 90 | private float Magnitude; // Normal tilt |
91 | private double VWTimeRatio; // VW time as a ratio of real time | 91 | // private double VWTimeRatio; // VW time as a ratio of real time |
92 | 92 | ||
93 | // Working values | 93 | // Working values |
94 | private LLVector3 Position = new LLVector3(0,0,0); | 94 | private LLVector3 Position = new LLVector3(0,0,0); |
@@ -173,9 +173,9 @@ namespace OpenSim.Region.Environment.Modules | |||
173 | // Mode: determines how the sun is handled | 173 | // Mode: determines how the sun is handled |
174 | m_mode = config.Configs["Sun"].GetString("mode", d_mode); | 174 | m_mode = config.Configs["Sun"].GetString("mode", d_mode); |
175 | // Mode: determines how the sun is handled | 175 | // Mode: determines how the sun is handled |
176 | m_latitude = config.Configs["Sun"].GetDouble("latitude", d_latitude); | 176 | // m_latitude = config.Configs["Sun"].GetDouble("latitude", d_latitude); |
177 | // Mode: determines how the sun is handled | 177 | // Mode: determines how the sun is handled |
178 | m_longitude = config.Configs["Sun"].GetDouble("longitude", d_longitude); | 178 | // m_longitude = config.Configs["Sun"].GetDouble("longitude", d_longitude); |
179 | // Day length in decimal hours | 179 | // Day length in decimal hours |
180 | m_year_length = config.Configs["Sun"].GetInt("year_length", d_year_length); | 180 | m_year_length = config.Configs["Sun"].GetInt("year_length", d_year_length); |
181 | // Day length in decimal hours | 181 | // Day length in decimal hours |
@@ -193,8 +193,8 @@ namespace OpenSim.Region.Environment.Modules | |||
193 | m_day_length = d_day_length; | 193 | m_day_length = d_day_length; |
194 | m_day_night = d_day_night; | 194 | m_day_night = d_day_night; |
195 | m_frame_mod = d_frame_mod; | 195 | m_frame_mod = d_frame_mod; |
196 | m_latitude = d_latitude; | 196 | // m_latitude = d_latitude; |
197 | m_longitude = d_longitude; | 197 | // m_longitude = d_longitude; |
198 | } | 198 | } |
199 | 199 | ||
200 | switch (m_mode) | 200 | switch (m_mode) |
@@ -209,7 +209,7 @@ namespace OpenSim.Region.Environment.Modules | |||
209 | 209 | ||
210 | // Ration of real-to-virtual time | 210 | // Ration of real-to-virtual time |
211 | 211 | ||
212 | VWTimeRatio = 24/m_day_length; | 212 | // VWTimeRatio = 24/m_day_length; |
213 | 213 | ||
214 | // Speed of rotation needed to complete a cycle in the | 214 | // Speed of rotation needed to complete a cycle in the |
215 | // designated period (day and season) | 215 | // designated period (day and season) |
@@ -220,7 +220,7 @@ namespace OpenSim.Region.Environment.Modules | |||
220 | // Horizon translation | 220 | // Horizon translation |
221 | 221 | ||
222 | HorizonShift = m_day_night; // Z axis translation | 222 | HorizonShift = m_day_night; // Z axis translation |
223 | HoursToRadians = (SunCycle/24)*VWTimeRatio; | 223 | // HoursToRadians = (SunCycle/24)*VWTimeRatio; |
224 | 224 | ||
225 | // Insert our event handling hooks | 225 | // Insert our event handling hooks |
226 | 226 | ||
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 3879b57..b7117df 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -72,7 +72,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
72 | 72 | ||
73 | public InnerScene m_innerScene; | 73 | public InnerScene m_innerScene; |
74 | 74 | ||
75 | private Random Rand = new Random(); | 75 | // private Random Rand = new Random(); |
76 | private uint _primCount = 720000; | 76 | private uint _primCount = 720000; |
77 | private readonly Mutex _primAllocateMutex = new Mutex(false); | 77 | private readonly Mutex _primAllocateMutex = new Mutex(false); |
78 | 78 | ||
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 74f9d6c..4a24dad 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -87,7 +87,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
87 | /// </summary> | 87 | /// </summary> |
88 | public partial class SceneObjectGroup : EntityBase | 88 | public partial class SceneObjectGroup : EntityBase |
89 | { | 89 | { |
90 | private PrimCountTaintedDelegate handlerPrimCountTainted = null; | 90 | // private PrimCountTaintedDelegate handlerPrimCountTainted = null; |
91 | 91 | ||
92 | /// <summary> | 92 | /// <summary> |
93 | /// Signal whether the non-inventory attributes of any prims in the group have changed | 93 | /// Signal whether the non-inventory attributes of any prims in the group have changed |
@@ -107,7 +107,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
107 | 107 | ||
108 | protected ulong m_regionHandle; | 108 | protected ulong m_regionHandle; |
109 | protected SceneObjectPart m_rootPart; | 109 | protected SceneObjectPart m_rootPart; |
110 | private Dictionary<LLUUID, scriptEvents> m_scriptEvents = new Dictionary<LLUUID, scriptEvents>(); | 110 | // private Dictionary<LLUUID, scriptEvents> m_scriptEvents = new Dictionary<LLUUID, scriptEvents>(); |
111 | 111 | ||
112 | private Dictionary<uint, scriptPosTarget> m_targets = new Dictionary<uint, scriptPosTarget>(); | 112 | private Dictionary<uint, scriptPosTarget> m_targets = new Dictionary<uint, scriptPosTarget>(); |
113 | 113 | ||
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index b610477..7b04c82 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -169,7 +169,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
169 | private Color m_color = Color.Black; | 169 | private Color m_color = Color.Black; |
170 | private string m_description = String.Empty; | 170 | private string m_description = String.Empty; |
171 | private List<uint> m_lastColliders = new List<uint>(); | 171 | private List<uint> m_lastColliders = new List<uint>(); |
172 | private PhysicsVector m_lastRotationalVelocity = PhysicsVector.Zero; | 172 | // private PhysicsVector m_lastRotationalVelocity = PhysicsVector.Zero; |
173 | private int m_linkNum = 0; | 173 | private int m_linkNum = 0; |
174 | [XmlIgnore] | 174 | [XmlIgnore] |
175 | private int m_scriptAccessPin = 0; | 175 | private int m_scriptAccessPin = 0; |
diff --git a/OpenSim/Region/Examples/SimpleModule/RegionModule.cs b/OpenSim/Region/Examples/SimpleModule/RegionModule.cs index 327bd75..46b7efd 100644 --- a/OpenSim/Region/Examples/SimpleModule/RegionModule.cs +++ b/OpenSim/Region/Examples/SimpleModule/RegionModule.cs | |||
@@ -48,9 +48,9 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
48 | 48 | ||
49 | public void PostInitialise() | 49 | public void PostInitialise() |
50 | { | 50 | { |
51 | RegionInfo regionInfo = m_scene.RegionInfo; | 51 | // RegionInfo regionInfo = m_scene.RegionInfo; |
52 | 52 | ||
53 | LLVector3 pos = new LLVector3(110, 129, 27); | 53 | // LLVector3 pos = new LLVector3(110, 129, 27); |
54 | 54 | ||
55 | //AddCpuCounter(regionInfo, pos); | 55 | //AddCpuCounter(regionInfo, pos); |
56 | // AddComplexObjects(regionInfo, pos); | 56 | // AddComplexObjects(regionInfo, pos); |
@@ -58,27 +58,27 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
58 | // AddFileSystemObjects(); | 58 | // AddFileSystemObjects(); |
59 | } | 59 | } |
60 | 60 | ||
61 | private void AddFileSystemObjects() | 61 | // private void AddFileSystemObjects() |
62 | { | 62 | // { |
63 | DirectoryInfo dirInfo = new DirectoryInfo("."); | 63 | // DirectoryInfo dirInfo = new DirectoryInfo("."); |
64 | 64 | ||
65 | float x = 0; | 65 | // float x = 0; |
66 | float z = 0; | 66 | // float z = 0; |
67 | 67 | ||
68 | foreach (FileInfo fileInfo in dirInfo.GetFiles()) | 68 | // foreach (FileInfo fileInfo in dirInfo.GetFiles()) |
69 | { | 69 | // { |
70 | LLVector3 filePos = new LLVector3(100 + x, 129, 27 + z); | 70 | // LLVector3 filePos = new LLVector3(100 + x, 129, 27 + z); |
71 | x = x + 2; | 71 | // x = x + 2; |
72 | if (x > 50) | 72 | // if (x > 50) |
73 | { | 73 | // { |
74 | x = 0; | 74 | // x = 0; |
75 | z = z + 2; | 75 | // z = z + 2; |
76 | } | 76 | // } |
77 | 77 | ||
78 | FileSystemObject fileObject = new FileSystemObject(m_scene, fileInfo, filePos); | 78 | // FileSystemObject fileObject = new FileSystemObject(m_scene, fileInfo, filePos); |
79 | m_scene.AddNewSceneObject(fileObject, true); | 79 | // m_scene.AddNewSceneObject(fileObject, true); |
80 | } | 80 | // } |
81 | } | 81 | // } |
82 | 82 | ||
83 | private void AddAvatars() | 83 | private void AddAvatars() |
84 | { | 84 | { |
@@ -96,27 +96,27 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
96 | } | 96 | } |
97 | } | 97 | } |
98 | 98 | ||
99 | private void AddComplexObjects(RegionInfo regionInfo, LLVector3 pos) | 99 | // private void AddComplexObjects(RegionInfo regionInfo, LLVector3 pos) |
100 | { | 100 | // { |
101 | int objs = 3; | 101 | // int objs = 3; |
102 | 102 | ||
103 | for (int i = 0; i < (objs*objs*objs); i++) | 103 | // for (int i = 0; i < (objs*objs*objs); i++) |
104 | { | 104 | // { |
105 | LLVector3 posOffset = new LLVector3((i % objs) * 4, ((i % (objs*objs)) / (objs)) * 4, (i / (objs*objs)) * 4); | 105 | // LLVector3 posOffset = new LLVector3((i % objs) * 4, ((i % (objs*objs)) / (objs)) * 4, (i / (objs*objs)) * 4); |
106 | ComplexObject complexObject = | 106 | // ComplexObject complexObject = |
107 | new ComplexObject(m_scene, regionInfo.RegionHandle, LLUUID.Zero, m_scene.PrimIDAllocate(), | 107 | // new ComplexObject(m_scene, regionInfo.RegionHandle, LLUUID.Zero, m_scene.PrimIDAllocate(), |
108 | pos + posOffset); | 108 | // pos + posOffset); |
109 | m_scene.AddNewSceneObject(complexObject, true); | 109 | // m_scene.AddNewSceneObject(complexObject, true); |
110 | } | 110 | // } |
111 | } | 111 | // } |
112 | 112 | ||
113 | private void AddCpuCounter(RegionInfo regionInfo, LLVector3 pos) | 113 | // private void AddCpuCounter(RegionInfo regionInfo, LLVector3 pos) |
114 | { | 114 | // { |
115 | SceneObjectGroup sceneObject = | 115 | // SceneObjectGroup sceneObject = |
116 | new CpuCounterObject(m_scene, regionInfo.RegionHandle, LLUUID.Zero, m_scene.PrimIDAllocate(), | 116 | // new CpuCounterObject(m_scene, regionInfo.RegionHandle, LLUUID.Zero, m_scene.PrimIDAllocate(), |
117 | pos + new LLVector3(1f, 1f, 1f)); | 117 | // pos + new LLVector3(1f, 1f, 1f)); |
118 | m_scene.AddNewSceneObject(sceneObject, true); | 118 | // m_scene.AddNewSceneObject(sceneObject, true); |
119 | } | 119 | // } |
120 | 120 | ||
121 | public void Close() | 121 | public void Close() |
122 | { | 122 | { |
diff --git a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs index 7ce90f5..9c70a04 100644 --- a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -132,7 +132,7 @@ namespace OpenSim.Region.Modules.AvatarFactory | |||
132 | } | 132 | } |
133 | else | 133 | else |
134 | { | 134 | { |
135 | LLUUID assetId; | 135 | // LLUUID assetId; |
136 | 136 | ||
137 | InventoryItemBase baseItem = profile.RootFolder.FindItem(appearance.Wearables[i].ItemID); | 137 | InventoryItemBase baseItem = profile.RootFolder.FindItem(appearance.Wearables[i].ItemID); |
138 | 138 | ||
diff --git a/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs b/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs index 8f314b1..4826ff2 100644 --- a/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs +++ b/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs | |||
@@ -133,21 +133,21 @@ namespace OpenSim.Region.Modules.SvnSerialiser | |||
133 | m_svnClient.Checkout2(m_svnurl, m_svndir, revision, revision, true, false); | 133 | m_svnClient.Checkout2(m_svnurl, m_svndir, revision, revision, true, false); |
134 | } | 134 | } |
135 | 135 | ||
136 | private void CheckoutSvnPartial(string subdir) | 136 | // private void CheckoutSvnPartial(string subdir) |
137 | { | 137 | // { |
138 | if (!Directory.Exists(m_svndir + Slash.DirectorySeparatorChar + subdir)) | 138 | // if (!Directory.Exists(m_svndir + Slash.DirectorySeparatorChar + subdir)) |
139 | Directory.CreateDirectory(m_svndir + Slash.DirectorySeparatorChar + subdir); | 139 | // Directory.CreateDirectory(m_svndir + Slash.DirectorySeparatorChar + subdir); |
140 | 140 | ||
141 | m_svnClient.Checkout2(m_svnurl + "/" + subdir, m_svndir, Svn.Revision.Head, Svn.Revision.Head, true, false); | 141 | // m_svnClient.Checkout2(m_svnurl + "/" + subdir, m_svndir, Svn.Revision.Head, Svn.Revision.Head, true, false); |
142 | } | 142 | // } |
143 | 143 | ||
144 | private void CheckoutSvnPartial(string subdir, SvnRevision revision) | 144 | // private void CheckoutSvnPartial(string subdir, SvnRevision revision) |
145 | { | 145 | // { |
146 | if (!Directory.Exists(m_svndir + Slash.DirectorySeparatorChar + subdir)) | 146 | // if (!Directory.Exists(m_svndir + Slash.DirectorySeparatorChar + subdir)) |
147 | Directory.CreateDirectory(m_svndir + Slash.DirectorySeparatorChar + subdir); | 147 | // Directory.CreateDirectory(m_svndir + Slash.DirectorySeparatorChar + subdir); |
148 | 148 | ||
149 | m_svnClient.Checkout2(m_svnurl + "/" + subdir, m_svndir, revision, revision, true, false); | 149 | // m_svnClient.Checkout2(m_svnurl + "/" + subdir, m_svndir, revision, revision, true, false); |
150 | } | 150 | // } |
151 | 151 | ||
152 | #endregion | 152 | #endregion |
153 | 153 | ||
diff --git a/OpenSim/Region/Physics/Meshing/HelperTypes.cs b/OpenSim/Region/Physics/Meshing/HelperTypes.cs index aed6c45..5d9823c 100644 --- a/OpenSim/Region/Physics/Meshing/HelperTypes.cs +++ b/OpenSim/Region/Physics/Meshing/HelperTypes.cs | |||
@@ -192,7 +192,10 @@ public class Vertex : PhysicsVector, IComparable<Vertex> | |||
192 | { | 192 | { |
193 | return new Vertex(Y * v.Z - Z * v.Y, Z * v.X - X * v.Z, X * v.Y - Y * v.X); | 193 | return new Vertex(Y * v.Z - Z * v.Y, Z * v.X - X * v.Z, X * v.Y - Y * v.X); |
194 | } | 194 | } |
195 | 195 | ||
196 | // mono compiler moans about overloading operators hiding base | ||
197 | // operator but should not according to C# language spec | ||
198 | #pragma warning disable 0108 | ||
196 | public static Vertex operator *(Vertex v, Quaternion q) | 199 | public static Vertex operator *(Vertex v, Quaternion q) |
197 | { | 200 | { |
198 | Matrix4 tm = q.computeMatrix(); | 201 | Matrix4 tm = q.computeMatrix(); |
@@ -250,6 +253,7 @@ public class Vertex : PhysicsVector, IComparable<Vertex> | |||
250 | v1.Z *= mul; | 253 | v1.Z *= mul; |
251 | return v1; | 254 | return v1; |
252 | } | 255 | } |
256 | #pragma warning restore 0108 | ||
253 | 257 | ||
254 | 258 | ||
255 | public float dot(Vertex v) | 259 | public float dot(Vertex v) |
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 28a512b..6324f1a 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -3122,7 +3122,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3122 | 3122 | ||
3123 | } | 3123 | } |
3124 | 3124 | ||
3125 | double angle = 2 * Math.Acos(rot.s); | 3125 | // double angle = 2 * Math.Acos(rot.s); |
3126 | double s = Math.Sqrt(1 - rot.s * rot.s); | 3126 | double s = Math.Sqrt(1 - rot.s * rot.s); |
3127 | if (s < 0.001) | 3127 | if (s < 0.001) |
3128 | { | 3128 | { |
@@ -3960,7 +3960,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3960 | { | 3960 | { |
3961 | int index = str.IndexOf(delimiters[i].ToString()); | 3961 | int index = str.IndexOf(delimiters[i].ToString()); |
3962 | bool found = index != -1; | 3962 | bool found = index != -1; |
3963 | if (found && String.Empty != delimiters[i]) | 3963 | if (found && String.Empty != (string)delimiters[i]) |
3964 | { | 3964 | { |
3965 | if ((cindex > index) || (cindex == -1)) | 3965 | if ((cindex > index) || (cindex == -1)) |
3966 | { | 3966 | { |
@@ -4049,7 +4049,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4049 | 4049 | ||
4050 | private String[] GetNotecardLines(string name) | 4050 | private String[] GetNotecardLines(string name) |
4051 | { | 4051 | { |
4052 | bool found = false; | 4052 | // bool found = false; |
4053 | int notecardIndex = 0; | 4053 | int notecardIndex = 0; |
4054 | String[] notecardLines = { "0" }; | 4054 | String[] notecardLines = { "0" }; |
4055 | notecardLines[0] = String.Empty; | 4055 | notecardLines[0] = String.Empty; |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs index fc005ab..ef87b2f 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs | |||
@@ -125,7 +125,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
125 | } | 125 | } |
126 | } | 126 | } |
127 | 127 | ||
128 | private ScriptEngine lastScriptEngine; // Keep track of what ScriptEngine instance we are at so we can give exception | 128 | // private ScriptEngine lastScriptEngine; // Keep track of what ScriptEngine instance we are at so we can give exception |
129 | /// <summary> | 129 | /// <summary> |
130 | /// A thread should run in this loop and check all running scripts | 130 | /// A thread should run in this loop and check all running scripts |
131 | /// </summary> | 131 | /// </summary> |
@@ -171,7 +171,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
171 | //{ | 171 | //{ |
172 | foreach (ScriptEngine m_ScriptEngine in new ArrayList(ScriptEngine.ScriptEngines)) | 172 | foreach (ScriptEngine m_ScriptEngine in new ArrayList(ScriptEngine.ScriptEngines)) |
173 | { | 173 | { |
174 | lastScriptEngine = m_ScriptEngine; | 174 | // lastScriptEngine = m_ScriptEngine; |
175 | // Re-reading config every x seconds | 175 | // Re-reading config every x seconds |
176 | if (MaintenanceLoopTicks_Other_Count >= MaintenanceLoopTicks_Other) | 176 | if (MaintenanceLoopTicks_Other_Count >= MaintenanceLoopTicks_Other) |
177 | { | 177 | { |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs index 366aaf1..eed0b86 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs | |||
@@ -59,7 +59,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
59 | 59 | ||
60 | private Thread scriptLoadUnloadThread; | 60 | private Thread scriptLoadUnloadThread; |
61 | private static Thread staticScriptLoadUnloadThread; | 61 | private static Thread staticScriptLoadUnloadThread; |
62 | private int scriptLoadUnloadThread_IdleSleepms; | 62 | // private int scriptLoadUnloadThread_IdleSleepms; |
63 | private Queue<LUStruct> LUQueue = new Queue<LUStruct>(); | 63 | private Queue<LUStruct> LUQueue = new Queue<LUStruct>(); |
64 | private static bool PrivateThread; | 64 | private static bool PrivateThread; |
65 | private int LoadUnloadMaxQueueSize; | 65 | private int LoadUnloadMaxQueueSize; |
@@ -100,7 +100,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
100 | 100 | ||
101 | public void ReadConfig() | 101 | public void ReadConfig() |
102 | { | 102 | { |
103 | scriptLoadUnloadThread_IdleSleepms = m_scriptEngine.ScriptConfigSource.GetInt("ScriptLoadUnloadLoopms", 30); | 103 | // scriptLoadUnloadThread_IdleSleepms = m_scriptEngine.ScriptConfigSource.GetInt("ScriptLoadUnloadLoopms", 30); |
104 | // TODO: Requires sharing of all ScriptManagers to single thread | 104 | // TODO: Requires sharing of all ScriptManagers to single thread |
105 | PrivateThread = true; // m_scriptEngine.ScriptConfigSource.GetBoolean("PrivateScriptLoadUnloadThread", false); | 105 | PrivateThread = true; // m_scriptEngine.ScriptConfigSource.GetBoolean("PrivateScriptLoadUnloadThread", false); |
106 | LoadUnloadMaxQueueSize = m_scriptEngine.ScriptConfigSource.GetInt("LoadUnloadMaxQueueSize", 100); | 106 | LoadUnloadMaxQueueSize = m_scriptEngine.ScriptConfigSource.GetInt("LoadUnloadMaxQueueSize", 100); |
@@ -245,7 +245,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
245 | 245 | ||
246 | #region Start/Stop/Reset script | 246 | #region Start/Stop/Reset script |
247 | 247 | ||
248 | private readonly Object startStopLock = new Object(); | 248 | // private readonly Object startStopLock = new Object(); |
249 | 249 | ||
250 | /// <summary> | 250 | /// <summary> |
251 | /// Fetches, loads and hooks up a script to an objects events | 251 | /// Fetches, loads and hooks up a script to an objects events |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs index 3f53456..0d3c8c6 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs | |||
@@ -65,7 +65,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
65 | private enumCompileType DefaultCompileLanguage; | 65 | private enumCompileType DefaultCompileLanguage; |
66 | private bool WriteScriptSourceToDebugFile; | 66 | private bool WriteScriptSourceToDebugFile; |
67 | private bool CompileWithDebugInformation; | 67 | private bool CompileWithDebugInformation; |
68 | private bool CleanUpOldScriptsOnStartup; | 68 | // private bool CleanUpOldScriptsOnStartup; |
69 | private Dictionary<string, bool> AllowedCompilers = new Dictionary<string, bool>(StringComparer.CurrentCultureIgnoreCase); | 69 | private Dictionary<string, bool> AllowedCompilers = new Dictionary<string, bool>(StringComparer.CurrentCultureIgnoreCase); |
70 | private Dictionary<string, enumCompileType> LanguageMapping = new Dictionary<string, enumCompileType>(StringComparer.CurrentCultureIgnoreCase); | 70 | private Dictionary<string, enumCompileType> LanguageMapping = new Dictionary<string, enumCompileType>(StringComparer.CurrentCultureIgnoreCase); |
71 | 71 | ||
@@ -95,7 +95,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
95 | // Get some config | 95 | // Get some config |
96 | WriteScriptSourceToDebugFile = m_scriptEngine.ScriptConfigSource.GetBoolean("WriteScriptSourceToDebugFile", true); | 96 | WriteScriptSourceToDebugFile = m_scriptEngine.ScriptConfigSource.GetBoolean("WriteScriptSourceToDebugFile", true); |
97 | CompileWithDebugInformation = m_scriptEngine.ScriptConfigSource.GetBoolean("CompileWithDebugInformation", true); | 97 | CompileWithDebugInformation = m_scriptEngine.ScriptConfigSource.GetBoolean("CompileWithDebugInformation", true); |
98 | CleanUpOldScriptsOnStartup = m_scriptEngine.ScriptConfigSource.GetBoolean("CleanUpOldScriptsOnStartup", true); | 98 | // CleanUpOldScriptsOnStartup = m_scriptEngine.ScriptConfigSource.GetBoolean("CleanUpOldScriptsOnStartup", true); |
99 | 99 | ||
100 | // Get file prefix from scriptengine name and make it file system safe: | 100 | // Get file prefix from scriptengine name and make it file system safe: |
101 | FilePrefix = m_scriptEngine.ScriptEngineName; | 101 | FilePrefix = m_scriptEngine.ScriptEngineName; |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/YP2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/YP2CSConverter.cs index 0bd3b0c..b615baa 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/YP2CSConverter.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/YP2CSConverter.cs | |||
@@ -69,11 +69,14 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
69 | YP.tell(myCS_SW); | 69 | YP.tell(myCS_SW); |
70 | 70 | ||
71 | //Console.WriteLine("Mycode\n ===================================\n" + myCode+"\n"); | 71 | //Console.WriteLine("Mycode\n ===================================\n" + myCode+"\n"); |
72 | // disable warning on l1, don't see how we can | ||
73 | // code this differently | ||
74 | #pragma warning disable 0168 | ||
72 | foreach (bool l1 in Parser.parseInput(TermList)) | 75 | foreach (bool l1 in Parser.parseInput(TermList)) |
73 | { | 76 | { |
74 | foreach (bool l2 in YPCompiler.makeFunctionPseudoCode(TermList, FunctionCode)) | 77 | foreach (bool l2 in YPCompiler.makeFunctionPseudoCode(TermList, FunctionCode)) |
75 | { | 78 | { |
76 | ListPair VFC = new ListPair(FunctionCode, new Variable()); | 79 | // ListPair VFC = new ListPair(FunctionCode, new Variable()); |
77 | //Console.WriteLine("-------------------------") | 80 | //Console.WriteLine("-------------------------") |
78 | //Console.WriteLine(FunctionCode.ToString()) | 81 | //Console.WriteLine(FunctionCode.ToString()) |
79 | //Console.WriteLine("-------------------------") | 82 | //Console.WriteLine("-------------------------") |
@@ -81,6 +84,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
81 | //YPCompiler.convertStringCodesCSharp(VFC); | 84 | //YPCompiler.convertStringCodesCSharp(VFC); |
82 | } | 85 | } |
83 | } | 86 | } |
87 | #pragma warning restore 0168 | ||
84 | YP.seen(); | 88 | YP.seen(); |
85 | myCS_SW.Close(); | 89 | myCS_SW.Close(); |
86 | YP.told(); | 90 | YP.told(); |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/BagofAnswers.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/BagofAnswers.cs index 250ad59..e6f10ca 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/BagofAnswers.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/BagofAnswers.cs | |||
@@ -113,6 +113,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog | |||
113 | } | 113 | } |
114 | } | 114 | } |
115 | 115 | ||
116 | // disable warning on l1, don't see how we can | ||
117 | // code this differently | ||
118 | #pragma warning disable 0168 | ||
119 | |||
116 | /// <summary> | 120 | /// <summary> |
117 | /// For each result, unify the _freeVariables and unify bagArrayVariable with the associated bag. | 121 | /// For each result, unify the _freeVariables and unify bagArrayVariable with the associated bag. |
118 | /// </summary> | 122 | /// </summary> |
@@ -204,6 +208,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog | |||
204 | bagOfAnswers.add(); | 208 | bagOfAnswers.add(); |
205 | return bagOfAnswers.resultSet(Bag); | 209 | return bagOfAnswers.resultSet(Bag); |
206 | } | 210 | } |
211 | #pragma warning restore 0168 | ||
207 | 212 | ||
208 | /// <summary> | 213 | /// <summary> |
209 | /// A TermArrayEqualityComparer implements IEqualityComparer to compare two object arrays using YP.termEqual. | 214 | /// A TermArrayEqualityComparer implements IEqualityComparer to compare two object arrays using YP.termEqual. |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/FindallAnswers.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/FindallAnswers.cs index cfc6788..4327715 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/FindallAnswers.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/FindallAnswers.cs | |||
@@ -71,6 +71,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog | |||
71 | return YP.unify(Bag, result); | 71 | return YP.unify(Bag, result); |
72 | } | 72 | } |
73 | 73 | ||
74 | // disable warning on l1, don't see how we can | ||
75 | // code this differently | ||
76 | #pragma warning disable 0168 | ||
77 | |||
74 | /// <summary> | 78 | /// <summary> |
75 | /// This is a simplified findall when the goal is a single call. | 79 | /// This is a simplified findall when the goal is a single call. |
76 | /// </summary> | 80 | /// </summary> |
@@ -99,5 +103,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog | |||
99 | findallAnswers.add(); | 103 | findallAnswers.add(); |
100 | return findallAnswers.resultArray(); | 104 | return findallAnswers.resultArray(); |
101 | } | 105 | } |
106 | #pragma warning restore 0168 | ||
102 | } | 107 | } |
103 | } | 108 | } |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/Functor1.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/Functor1.cs index 114e338..e023984 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/Functor1.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/Functor1.cs | |||
@@ -49,6 +49,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog | |||
49 | { | 49 | { |
50 | } | 50 | } |
51 | 51 | ||
52 | // disable warning on l1, don't see how we can | ||
53 | // code this differently | ||
54 | #pragma warning disable 0168 | ||
52 | public IEnumerable<bool> unify(object arg) | 55 | public IEnumerable<bool> unify(object arg) |
53 | { | 56 | { |
54 | arg = YP.getValue(arg); | 57 | arg = YP.getValue(arg); |
@@ -67,6 +70,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog | |||
67 | yield return false; | 70 | yield return false; |
68 | } | 71 | } |
69 | } | 72 | } |
73 | #pragma warning restore 0168 | ||
74 | |||
70 | 75 | ||
71 | public override string ToString() | 76 | public override string ToString() |
72 | { | 77 | { |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/Functor2.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/Functor2.cs index 132d417..432d328 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/Functor2.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/Functor2.cs | |||
@@ -51,6 +51,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog | |||
51 | { | 51 | { |
52 | } | 52 | } |
53 | 53 | ||
54 | // disable warning on l1, don't see how we can | ||
55 | // code this differently | ||
56 | #pragma warning disable 0168 | ||
54 | public IEnumerable<bool> unify(object arg) | 57 | public IEnumerable<bool> unify(object arg) |
55 | { | 58 | { |
56 | arg = YP.getValue(arg); | 59 | arg = YP.getValue(arg); |
@@ -72,6 +75,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog | |||
72 | yield return false; | 75 | yield return false; |
73 | } | 76 | } |
74 | } | 77 | } |
78 | #pragma warning restore 0168 | ||
79 | |||
75 | 80 | ||
76 | public override string ToString() | 81 | public override string ToString() |
77 | { | 82 | { |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/Functor3.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/Functor3.cs index 064ec19..b429608 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/Functor3.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/Functor3.cs | |||
@@ -53,6 +53,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog | |||
53 | { | 53 | { |
54 | } | 54 | } |
55 | 55 | ||
56 | // disable warning on l1, don't see how we can | ||
57 | // code this differently | ||
58 | #pragma warning disable 0168 | ||
56 | public IEnumerable<bool> unify(object arg) | 59 | public IEnumerable<bool> unify(object arg) |
57 | { | 60 | { |
58 | arg = YP.getValue(arg); | 61 | arg = YP.getValue(arg); |
@@ -77,6 +80,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog | |||
77 | yield return false; | 80 | yield return false; |
78 | } | 81 | } |
79 | } | 82 | } |
83 | #pragma warning restore 0168 | ||
80 | 84 | ||
81 | public override string ToString() | 85 | public override string ToString() |
82 | { | 86 | { |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/Parser.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/Parser.cs index b2fad45..3ceb0df 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/Parser.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/Parser.cs | |||
@@ -44,6 +44,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog | |||
44 | yield return false; | 44 | yield return false; |
45 | } | 45 | } |
46 | 46 | ||
47 | // disable warning on l1, don't see how we can | ||
48 | // code this differently | ||
49 | #pragma warning disable 0168, 0219 | ||
50 | |||
47 | // Debug: Hand-modify this central predicate to do tail recursion. | 51 | // Debug: Hand-modify this central predicate to do tail recursion. |
48 | public static IEnumerable<bool> read_tokens(object arg1, object arg2, object arg3) | 52 | public static IEnumerable<bool> read_tokens(object arg1, object arg2, object arg3) |
49 | { | 53 | { |
@@ -188,7 +192,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog | |||
188 | // Compiler output follows. | 192 | // Compiler output follows. |
189 | 193 | ||
190 | class YPInnerClass { } | 194 | class YPInnerClass { } |
191 | static Type getDeclaringClass() { return typeof(YPInnerClass).DeclaringType; } | 195 | // static Type getDeclaringClass() { return typeof(YPInnerClass).DeclaringType; } |
192 | 196 | ||
193 | public static IEnumerable<bool> parseInput(object TermList) | 197 | public static IEnumerable<bool> parseInput(object TermList) |
194 | { | 198 | { |
@@ -224,11 +228,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog | |||
224 | if (YP.termEqual(Term, Atom.a(@"end_of_file"))) | 228 | if (YP.termEqual(Term, Atom.a(@"end_of_file"))) |
225 | { | 229 | { |
226 | yield break; | 230 | yield break; |
227 | goto cutIf1; | 231 | // goto cutIf1; |
228 | } | 232 | } |
229 | yield return false; | 233 | yield return false; |
230 | cutIf1: | 234 | // cutIf1: |
231 | { } | 235 | // { } |
232 | } | 236 | } |
233 | } | 237 | } |
234 | } | 238 | } |
@@ -4452,6 +4456,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog | |||
4452 | { } | 4456 | { } |
4453 | } | 4457 | } |
4454 | } | 4458 | } |
4455 | 4459 | #pragma warning restore 0168, 0219 | |
4456 | } | 4460 | } |
4457 | } | 4461 | } |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/Variable.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/Variable.cs index 7829770..281fb42 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/Variable.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/Variable.cs | |||
@@ -92,8 +92,12 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog | |||
92 | } | 92 | } |
93 | else | 93 | else |
94 | { | 94 | { |
95 | // disable warning on l1, don't see how we can | ||
96 | // code this differently | ||
97 | #pragma warning disable 0168 | ||
95 | foreach (bool l1 in YP.unify(this, arg)) | 98 | foreach (bool l1 in YP.unify(this, arg)) |
96 | yield return false; | 99 | yield return false; |
100 | #pragma warning restore 0168 | ||
97 | } | 101 | } |
98 | } | 102 | } |
99 | 103 | ||
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/YP.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/YP.cs index 68cfd3e..31f007f 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/YP.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/YP.cs | |||
@@ -561,6 +561,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog | |||
561 | return _repeat; | 561 | return _repeat; |
562 | } | 562 | } |
563 | 563 | ||
564 | // disable warning on l1, don't see how we can | ||
565 | // code this differently | ||
566 | #pragma warning disable 0168 | ||
564 | public static IEnumerable<bool> univ(object Term, object List) | 567 | public static IEnumerable<bool> univ(object Term, object List) |
565 | { | 568 | { |
566 | Term = YP.getValue(Term); | 569 | Term = YP.getValue(Term); |
@@ -1414,7 +1417,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog | |||
1414 | /// <returns></returns> | 1417 | /// <returns></returns> |
1415 | public static void script_event(object script_event, object script_params) | 1418 | public static void script_event(object script_event, object script_params) |
1416 | { | 1419 | { |
1417 | string function = ((Atom)YP.getValue(script_event))._name; | 1420 | // string function = ((Atom)YP.getValue(script_event))._name; |
1418 | object[] array = ListPair.toArray(script_params); | 1421 | object[] array = ListPair.toArray(script_params); |
1419 | if (array == null) | 1422 | if (array == null) |
1420 | return; // YP.fail(); | 1423 | return; // YP.fail(); |
@@ -1640,5 +1643,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog | |||
1640 | throw new NotImplementedException(); | 1643 | throw new NotImplementedException(); |
1641 | } | 1644 | } |
1642 | } | 1645 | } |
1646 | #pragma warning restore 0168 | ||
1643 | } | 1647 | } |
1644 | } | 1648 | } |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/YPCompiler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/YPCompiler.cs index 572583b..8a22388 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/YPCompiler.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/YPCompiler.cs | |||
@@ -202,6 +202,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog | |||
202 | return YP.unify(Symbol, Atom.a(Base.ToString() + ++((CompilerState)State)._gensymCounter)); | 202 | return YP.unify(Symbol, Atom.a(Base.ToString() + ++((CompilerState)State)._gensymCounter)); |
203 | } | 203 | } |
204 | 204 | ||
205 | // disable warning on l1, don't see how we can | ||
206 | // code this differently | ||
207 | #pragma warning disable 0168 | ||
205 | public static bool isDetNoneOut(object State, object Term) | 208 | public static bool isDetNoneOut(object State, object Term) |
206 | { | 209 | { |
207 | State = YP.getValue(State); | 210 | State = YP.getValue(State); |
@@ -239,6 +242,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog | |||
239 | 242 | ||
240 | return false; | 243 | return false; |
241 | } | 244 | } |
245 | #pragma warning restore 0168 | ||
242 | 246 | ||
243 | /// <summary> | 247 | /// <summary> |
244 | /// Return false if any of args is out, otherwise true. | 248 | /// Return false if any of args is out, otherwise true. |
@@ -275,6 +279,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog | |||
275 | } | 279 | } |
276 | } | 280 | } |
277 | 281 | ||
282 | // disable warning on l1, don't see how we can | ||
283 | // code this differently | ||
284 | #pragma warning disable 0168, 0219 | ||
285 | |||
278 | /// <summary> | 286 | /// <summary> |
279 | /// Use makeFunctionPseudoCode, convertFunctionCSharp and compileAnonymousFunction | 287 | /// Use makeFunctionPseudoCode, convertFunctionCSharp and compileAnonymousFunction |
280 | /// to return an anonymous YP.IClause for the Head and Body of a rule clause. | 288 | /// to return an anonymous YP.IClause for the Head and Body of a rule clause. |
@@ -395,7 +403,7 @@ namespace Temporary { | |||
395 | public static void repeatWrite(object arg1, object N) | 403 | public static void repeatWrite(object arg1, object N) |
396 | { | 404 | { |
397 | { | 405 | { |
398 | object _Value = arg1; | 406 | // object _Value = arg1; |
399 | if (YP.termEqual(N, 0)) | 407 | if (YP.termEqual(N, 0)) |
400 | { | 408 | { |
401 | return; | 409 | return; |
@@ -470,7 +478,7 @@ namespace Temporary { | |||
470 | public static void processCompilerDirectives(object arg1, object arg2) | 478 | public static void processCompilerDirectives(object arg1, object arg2) |
471 | { | 479 | { |
472 | { | 480 | { |
473 | object _State = arg2; | 481 | // object _State = arg2; |
474 | foreach (bool l2 in YP.unify(arg1, Atom.NIL)) | 482 | foreach (bool l2 in YP.unify(arg1, Atom.NIL)) |
475 | { | 483 | { |
476 | return; | 484 | return; |
@@ -3939,12 +3947,12 @@ namespace Temporary { | |||
3939 | YP.nl(); | 3947 | YP.nl(); |
3940 | convertStatementListCSharp(RestStatements, Level); | 3948 | convertStatementListCSharp(RestStatements, Level); |
3941 | return; | 3949 | return; |
3942 | goto cutIf1; | 3950 | // goto cutIf1; |
3943 | } | 3951 | } |
3944 | convertStatementListCSharp(RestStatements, Level); | 3952 | convertStatementListCSharp(RestStatements, Level); |
3945 | return; | 3953 | return; |
3946 | cutIf1: | 3954 | // cutIf1: |
3947 | { } | 3955 | // { } |
3948 | } | 3956 | } |
3949 | } | 3957 | } |
3950 | { | 3958 | { |
@@ -4111,12 +4119,12 @@ namespace Temporary { | |||
4111 | YP.write(Atom.a(@", ")); | 4119 | YP.write(Atom.a(@", ")); |
4112 | convertArgListCSharp(Tail); | 4120 | convertArgListCSharp(Tail); |
4113 | return; | 4121 | return; |
4114 | goto cutIf1; | 4122 | // goto cutIf1; |
4115 | } | 4123 | } |
4116 | convertArgListCSharp(Tail); | 4124 | convertArgListCSharp(Tail); |
4117 | return; | 4125 | return; |
4118 | cutIf1: | 4126 | // cutIf1: |
4119 | { } | 4127 | // { } |
4120 | } | 4128 | } |
4121 | } | 4129 | } |
4122 | } | 4130 | } |
@@ -4266,13 +4274,13 @@ namespace Temporary { | |||
4266 | YP.put_code(Code); | 4274 | YP.put_code(Code); |
4267 | convertStringCodesCSharp(RestCodes); | 4275 | convertStringCodesCSharp(RestCodes); |
4268 | return; | 4276 | return; |
4269 | goto cutIf1; | 4277 | // goto cutIf1; |
4270 | } | 4278 | } |
4271 | YP.put_code(Code); | 4279 | YP.put_code(Code); |
4272 | convertStringCodesCSharp(RestCodes); | 4280 | convertStringCodesCSharp(RestCodes); |
4273 | return; | 4281 | return; |
4274 | cutIf1: | 4282 | // cutIf1: |
4275 | { } | 4283 | // { } |
4276 | } | 4284 | } |
4277 | } | 4285 | } |
4278 | } | 4286 | } |
@@ -4623,12 +4631,12 @@ namespace Temporary { | |||
4623 | YP.write(Atom.a(@", ")); | 4631 | YP.write(Atom.a(@", ")); |
4624 | convertArgListJavascript(Tail); | 4632 | convertArgListJavascript(Tail); |
4625 | return; | 4633 | return; |
4626 | goto cutIf1; | 4634 | // goto cutIf1; |
4627 | } | 4635 | } |
4628 | convertArgListJavascript(Tail); | 4636 | convertArgListJavascript(Tail); |
4629 | return; | 4637 | return; |
4630 | cutIf1: | 4638 | // cutIf1: |
4631 | { } | 4639 | // { } |
4632 | } | 4640 | } |
4633 | } | 4641 | } |
4634 | } | 4642 | } |
@@ -4777,7 +4785,7 @@ namespace Temporary { | |||
4777 | YP.put_code(Code); | 4785 | YP.put_code(Code); |
4778 | convertStringCodesJavascript(RestCodes); | 4786 | convertStringCodesJavascript(RestCodes); |
4779 | return; | 4787 | return; |
4780 | goto cutIf1; | 4788 | // goto cutIf1; |
4781 | } | 4789 | } |
4782 | if (YP.termEqual(Code, 92)) | 4790 | if (YP.termEqual(Code, 92)) |
4783 | { | 4791 | { |
@@ -4785,13 +4793,13 @@ namespace Temporary { | |||
4785 | YP.put_code(Code); | 4793 | YP.put_code(Code); |
4786 | convertStringCodesJavascript(RestCodes); | 4794 | convertStringCodesJavascript(RestCodes); |
4787 | return; | 4795 | return; |
4788 | goto cutIf1; | 4796 | // goto cutIf1; |
4789 | } | 4797 | } |
4790 | YP.put_code(Code); | 4798 | YP.put_code(Code); |
4791 | convertStringCodesJavascript(RestCodes); | 4799 | convertStringCodesJavascript(RestCodes); |
4792 | return; | 4800 | return; |
4793 | cutIf1: | 4801 | // cutIf1: |
4794 | { } | 4802 | // { } |
4795 | } | 4803 | } |
4796 | } | 4804 | } |
4797 | } | 4805 | } |
@@ -5420,12 +5428,12 @@ namespace Temporary { | |||
5420 | YP.write(Atom.a(@", ")); | 5428 | YP.write(Atom.a(@", ")); |
5421 | convertArgListPython(Tail); | 5429 | convertArgListPython(Tail); |
5422 | return; | 5430 | return; |
5423 | goto cutIf1; | 5431 | // goto cutIf1; |
5424 | } | 5432 | } |
5425 | convertArgListPython(Tail); | 5433 | convertArgListPython(Tail); |
5426 | return; | 5434 | return; |
5427 | cutIf1: | 5435 | // cutIf1: |
5428 | { } | 5436 | // { } |
5429 | } | 5437 | } |
5430 | } | 5438 | } |
5431 | } | 5439 | } |
@@ -5573,7 +5581,7 @@ namespace Temporary { | |||
5573 | YP.put_code(Code); | 5581 | YP.put_code(Code); |
5574 | convertStringCodesPython(RestCodes); | 5582 | convertStringCodesPython(RestCodes); |
5575 | return; | 5583 | return; |
5576 | goto cutIf1; | 5584 | // goto cutIf1; |
5577 | } | 5585 | } |
5578 | if (YP.termEqual(Code, 92)) | 5586 | if (YP.termEqual(Code, 92)) |
5579 | { | 5587 | { |
@@ -5581,13 +5589,13 @@ namespace Temporary { | |||
5581 | YP.put_code(Code); | 5589 | YP.put_code(Code); |
5582 | convertStringCodesPython(RestCodes); | 5590 | convertStringCodesPython(RestCodes); |
5583 | return; | 5591 | return; |
5584 | goto cutIf1; | 5592 | // goto cutIf1; |
5585 | } | 5593 | } |
5586 | YP.put_code(Code); | 5594 | YP.put_code(Code); |
5587 | convertStringCodesPython(RestCodes); | 5595 | convertStringCodesPython(RestCodes); |
5588 | return; | 5596 | return; |
5589 | cutIf1: | 5597 | // cutIf1: |
5590 | { } | 5598 | // { } |
5591 | } | 5599 | } |
5592 | } | 5600 | } |
5593 | } | 5601 | } |
@@ -5646,6 +5654,6 @@ namespace Temporary { | |||
5646 | } | 5654 | } |
5647 | } | 5655 | } |
5648 | } | 5656 | } |
5649 | 5657 | #pragma warning restore 0168, 0219 | |
5650 | } | 5658 | } |
5651 | } | 5659 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index fea3fc2..70a88fb 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2776,7 +2776,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2776 | 2776 | ||
2777 | m_host.AddScriptLPS(1); | 2777 | m_host.AddScriptLPS(1); |
2778 | 2778 | ||
2779 | uint partLocalID; | 2779 | // uint partLocalID; |
2780 | LLUUID partItemID; | 2780 | LLUUID partItemID; |
2781 | 2781 | ||
2782 | switch ((int)linknum) | 2782 | switch ((int)linknum) |
@@ -2790,7 +2790,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2790 | { | 2790 | { |
2791 | if (item.Type == 10) | 2791 | if (item.Type == 10) |
2792 | { | 2792 | { |
2793 | partLocalID = part.LocalId; | 2793 | // partLocalID = part.LocalId; |
2794 | partItemID = item.ItemID; | 2794 | partItemID = item.ItemID; |
2795 | 2795 | ||
2796 | object[] resobj = new object[] | 2796 | object[] resobj = new object[] |
@@ -2815,7 +2815,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2815 | { | 2815 | { |
2816 | if (item.Type == 10) | 2816 | if (item.Type == 10) |
2817 | { | 2817 | { |
2818 | partLocalID = partInst.LocalId; | 2818 | // partLocalID = partInst.LocalId; |
2819 | partItemID = item.ItemID; | 2819 | partItemID = item.ItemID; |
2820 | Object[] resobj = new object[] | 2820 | Object[] resobj = new object[] |
2821 | { | 2821 | { |
@@ -2843,7 +2843,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2843 | { | 2843 | { |
2844 | if (item.Type == 10) | 2844 | if (item.Type == 10) |
2845 | { | 2845 | { |
2846 | partLocalID = partInst.LocalId; | 2846 | // partLocalID = partInst.LocalId; |
2847 | partItemID = item.ItemID; | 2847 | partItemID = item.ItemID; |
2848 | Object[] resobj = new object[] | 2848 | Object[] resobj = new object[] |
2849 | { | 2849 | { |
@@ -2873,7 +2873,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2873 | { | 2873 | { |
2874 | if (item.Type == 10) | 2874 | if (item.Type == 10) |
2875 | { | 2875 | { |
2876 | partLocalID = partInst.LocalId; | 2876 | // partLocalID = partInst.LocalId; |
2877 | partItemID = item.ItemID; | 2877 | partItemID = item.ItemID; |
2878 | Object[] resobj = new object[] | 2878 | Object[] resobj = new object[] |
2879 | { | 2879 | { |
@@ -2924,7 +2924,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2924 | { | 2924 | { |
2925 | if (item.Type == 10) | 2925 | if (item.Type == 10) |
2926 | { | 2926 | { |
2927 | partLocalID = partInst.LocalId; | 2927 | // partLocalID = partInst.LocalId; |
2928 | partItemID = item.ItemID; | 2928 | partItemID = item.ItemID; |
2929 | Object[] resObjDef = new object[] | 2929 | Object[] resObjDef = new object[] |
2930 | { | 2930 | { |
@@ -3049,7 +3049,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3049 | 3049 | ||
3050 | } | 3050 | } |
3051 | 3051 | ||
3052 | double angle = 2 * Math.Acos(rot.s); | 3052 | // double angle = 2 * Math.Acos(rot.s); |
3053 | double s = Math.Sqrt(1 - rot.s * rot.s); | 3053 | double s = Math.Sqrt(1 - rot.s * rot.s); |
3054 | if (s < 0.001) | 3054 | if (s < 0.001) |
3055 | { | 3055 | { |
@@ -6592,7 +6592,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6592 | 6592 | ||
6593 | while (count < len) | 6593 | while (count < len) |
6594 | { | 6594 | { |
6595 | int l = input[idx].Length; | 6595 | // int l = input[idx].Length; |
6596 | string ln = input[idx]; | 6596 | string ln = input[idx]; |
6597 | 6597 | ||
6598 | int need = len-count-1; | 6598 | int need = len-count-1; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/BagofAnswers.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/BagofAnswers.cs index 70c1b5a..c52adb1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/BagofAnswers.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/BagofAnswers.cs | |||
@@ -127,19 +127,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
127 | // No unbound free variables, so we only filled one bag. If empty, bagof fails. | 127 | // No unbound free variables, so we only filled one bag. If empty, bagof fails. |
128 | if (_findallBagArray.Count > 0) | 128 | if (_findallBagArray.Count > 0) |
129 | { | 129 | { |
130 | // disable warning on l1, don't see how we can | ||
131 | // code this differently | ||
132 | #pragma warning disable 0168 | ||
130 | foreach (bool l1 in bagArrayVariable.unify(_findallBagArray)) | 133 | foreach (bool l1 in bagArrayVariable.unify(_findallBagArray)) |
131 | yield return false; | 134 | yield return false; |
135 | #pragma warning restore 0168 | ||
132 | } | 136 | } |
133 | } | 137 | } |
134 | else | 138 | else |
135 | { | 139 | { |
136 | foreach (KeyValuePair<object[], List<object>> valuesAndBag in _bagForFreeVariables) | 140 | foreach (KeyValuePair<object[], List<object>> valuesAndBag in _bagForFreeVariables) |
137 | { | 141 | { |
142 | // disable warning on l1 and l2, don't see how we can | ||
143 | // code this differently | ||
144 | #pragma warning disable 0168 | ||
138 | foreach (bool l1 in YP.unifyArrays(_freeVariables, valuesAndBag.Key)) | 145 | foreach (bool l1 in YP.unifyArrays(_freeVariables, valuesAndBag.Key)) |
139 | { | 146 | { |
140 | foreach (bool l2 in bagArrayVariable.unify(valuesAndBag.Value)) | 147 | foreach (bool l2 in bagArrayVariable.unify(valuesAndBag.Value)) |
141 | yield return false; | 148 | yield return false; |
142 | } | 149 | } |
150 | #pragma warning restore 0168 | ||
143 | // Debug: Should we free memory of the answers already returned? | 151 | // Debug: Should we free memory of the answers already returned? |
144 | } | 152 | } |
145 | } | 153 | } |
@@ -153,11 +161,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
153 | public IEnumerable<bool> result(object Bag) | 161 | public IEnumerable<bool> result(object Bag) |
154 | { | 162 | { |
155 | Variable bagArrayVariable = new Variable(); | 163 | Variable bagArrayVariable = new Variable(); |
164 | // disable warning on l1, don't see how we can | ||
165 | // code this differently | ||
166 | #pragma warning disable 0168 | ||
156 | foreach (bool l1 in resultArray(bagArrayVariable)) | 167 | foreach (bool l1 in resultArray(bagArrayVariable)) |
157 | { | 168 | { |
158 | foreach (bool l2 in YP.unify(Bag, ListPair.make((List<object>)bagArrayVariable.getValue()))) | 169 | foreach (bool l2 in YP.unify(Bag, ListPair.make((List<object>)bagArrayVariable.getValue()))) |
159 | yield return false; | 170 | yield return false; |
160 | } | 171 | } |
172 | #pragma warning restore 0168 | ||
161 | } | 173 | } |
162 | 174 | ||
163 | /// <summary> | 175 | /// <summary> |
@@ -169,6 +181,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
169 | public IEnumerable<bool> resultSet(object Bag) | 181 | public IEnumerable<bool> resultSet(object Bag) |
170 | { | 182 | { |
171 | Variable bagArrayVariable = new Variable(); | 183 | Variable bagArrayVariable = new Variable(); |
184 | // disable warning on l1, don't see how we can | ||
185 | // code this differently | ||
186 | #pragma warning disable 0168 | ||
172 | foreach (bool l1 in resultArray(bagArrayVariable)) | 187 | foreach (bool l1 in resultArray(bagArrayVariable)) |
173 | { | 188 | { |
174 | List<object> bagArray = (List<object>)bagArrayVariable.getValue(); | 189 | List<object> bagArray = (List<object>)bagArrayVariable.getValue(); |
@@ -176,14 +191,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
176 | foreach (bool l2 in YP.unify(Bag, ListPair.makeWithoutRepeatedTerms(bagArray))) | 191 | foreach (bool l2 in YP.unify(Bag, ListPair.makeWithoutRepeatedTerms(bagArray))) |
177 | yield return false; | 192 | yield return false; |
178 | } | 193 | } |
194 | #pragma warning restore 0168 | ||
179 | } | 195 | } |
180 | 196 | ||
181 | public static IEnumerable<bool> bagofArray | 197 | public static IEnumerable<bool> bagofArray |
182 | (object Template, object Goal, IEnumerable<bool> goalIterator, Variable bagArrayVariable) | 198 | (object Template, object Goal, IEnumerable<bool> goalIterator, Variable bagArrayVariable) |
183 | { | 199 | { |
184 | BagofAnswers bagOfAnswers = new BagofAnswers(Template, Goal); | 200 | BagofAnswers bagOfAnswers = new BagofAnswers(Template, Goal); |
201 | // disable warning on l1, don't see how we can | ||
202 | // code this differently | ||
203 | #pragma warning disable 0168 | ||
185 | foreach (bool l1 in goalIterator) | 204 | foreach (bool l1 in goalIterator) |
186 | bagOfAnswers.add(); | 205 | bagOfAnswers.add(); |
206 | #pragma warning restore 0168 | ||
187 | return bagOfAnswers.resultArray(bagArrayVariable); | 207 | return bagOfAnswers.resultArray(bagArrayVariable); |
188 | } | 208 | } |
189 | 209 | ||
@@ -191,8 +211,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
191 | (object Template, object Goal, IEnumerable<bool> goalIterator, object Bag) | 211 | (object Template, object Goal, IEnumerable<bool> goalIterator, object Bag) |
192 | { | 212 | { |
193 | BagofAnswers bagOfAnswers = new BagofAnswers(Template, Goal); | 213 | BagofAnswers bagOfAnswers = new BagofAnswers(Template, Goal); |
214 | // disable warning on l1, don't see how we can | ||
215 | // code this differently | ||
216 | #pragma warning disable 0168 | ||
194 | foreach (bool l1 in goalIterator) | 217 | foreach (bool l1 in goalIterator) |
195 | bagOfAnswers.add(); | 218 | bagOfAnswers.add(); |
219 | #pragma warning restore 0168 | ||
196 | return bagOfAnswers.result(Bag); | 220 | return bagOfAnswers.result(Bag); |
197 | } | 221 | } |
198 | 222 | ||
@@ -200,8 +224,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
200 | (object Template, object Goal, IEnumerable<bool> goalIterator, object Bag) | 224 | (object Template, object Goal, IEnumerable<bool> goalIterator, object Bag) |
201 | { | 225 | { |
202 | BagofAnswers bagOfAnswers = new BagofAnswers(Template, Goal); | 226 | BagofAnswers bagOfAnswers = new BagofAnswers(Template, Goal); |
227 | // disable warning on l1, don't see how we can | ||
228 | // code this differently | ||
229 | #pragma warning disable 0168 | ||
203 | foreach (bool l1 in goalIterator) | 230 | foreach (bool l1 in goalIterator) |
204 | bagOfAnswers.add(); | 231 | bagOfAnswers.add(); |
232 | #pragma warning restore 0168 | ||
205 | return bagOfAnswers.resultSet(Bag); | 233 | return bagOfAnswers.resultSet(Bag); |
206 | } | 234 | } |
207 | 235 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/FindallAnswers.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/FindallAnswers.cs index 28709e1..fbb173e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/FindallAnswers.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/FindallAnswers.cs | |||
@@ -81,8 +81,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
81 | public static IEnumerable<bool> findall(object Template, IEnumerable<bool> goal, object Bag) | 81 | public static IEnumerable<bool> findall(object Template, IEnumerable<bool> goal, object Bag) |
82 | { | 82 | { |
83 | FindallAnswers findallAnswers = new FindallAnswers(Template); | 83 | FindallAnswers findallAnswers = new FindallAnswers(Template); |
84 | // disable warning on l1, don't see how we can | ||
85 | // code this differently | ||
86 | #pragma warning disable 0168 | ||
84 | foreach (bool l1 in goal) | 87 | foreach (bool l1 in goal) |
85 | findallAnswers.add(); | 88 | findallAnswers.add(); |
89 | #pragma warning restore 0168 | ||
86 | return findallAnswers.result(Bag); | 90 | return findallAnswers.result(Bag); |
87 | } | 91 | } |
88 | 92 | ||
@@ -95,8 +99,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
95 | public static List<object> findallArray(object Template, IEnumerable<bool> goal) | 99 | public static List<object> findallArray(object Template, IEnumerable<bool> goal) |
96 | { | 100 | { |
97 | FindallAnswers findallAnswers = new FindallAnswers(Template); | 101 | FindallAnswers findallAnswers = new FindallAnswers(Template); |
102 | // disable warning on l1, don't see how we can | ||
103 | // code this differently | ||
104 | #pragma warning disable 0168 | ||
98 | foreach (bool l1 in goal) | 105 | foreach (bool l1 in goal) |
99 | findallAnswers.add(); | 106 | findallAnswers.add(); |
107 | #pragma warning restore 0168 | ||
100 | return findallAnswers.resultArray(); | 108 | return findallAnswers.resultArray(); |
101 | } | 109 | } |
102 | } | 110 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor1.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor1.cs index 3c0c1c4..69fbeee 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor1.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor1.cs | |||
@@ -57,14 +57,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
57 | Functor1 argFunctor = (Functor1)arg; | 57 | Functor1 argFunctor = (Functor1)arg; |
58 | if (_name.Equals(argFunctor._name)) | 58 | if (_name.Equals(argFunctor._name)) |
59 | { | 59 | { |
60 | // disable warning on l1, don't see how we can | ||
61 | // code this differently | ||
62 | #pragma warning disable 0168 | ||
60 | foreach (bool l1 in YP.unify(_arg1, argFunctor._arg1)) | 63 | foreach (bool l1 in YP.unify(_arg1, argFunctor._arg1)) |
61 | yield return false; | 64 | yield return false; |
65 | #pragma warning restore 0168 | ||
62 | } | 66 | } |
63 | } | 67 | } |
64 | else if (arg is Variable) | 68 | else if (arg is Variable) |
65 | { | 69 | { |
70 | // disable warning on l1, don't see how we can | ||
71 | // code this differently | ||
72 | #pragma warning disable 0168 | ||
66 | foreach (bool l1 in ((Variable)arg).unify(this)) | 73 | foreach (bool l1 in ((Variable)arg).unify(this)) |
67 | yield return false; | 74 | yield return false; |
75 | #pragma warning restore 0168 | ||
76 | |||
68 | } | 77 | } |
69 | } | 78 | } |
70 | 79 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor2.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor2.cs index 596b763..7e4f27d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor2.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor2.cs | |||
@@ -59,17 +59,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
59 | Functor2 argFunctor = (Functor2)arg; | 59 | Functor2 argFunctor = (Functor2)arg; |
60 | if (_name.Equals(argFunctor._name)) | 60 | if (_name.Equals(argFunctor._name)) |
61 | { | 61 | { |
62 | // disable warning on l1, don't see how we can | ||
63 | // code this differently | ||
64 | #pragma warning disable 0168 | ||
62 | foreach (bool l1 in YP.unify(_arg1, argFunctor._arg1)) | 65 | foreach (bool l1 in YP.unify(_arg1, argFunctor._arg1)) |
63 | { | 66 | { |
64 | foreach (bool l2 in YP.unify(_arg2, argFunctor._arg2)) | 67 | foreach (bool l2 in YP.unify(_arg2, argFunctor._arg2)) |
65 | yield return false; | 68 | yield return false; |
66 | } | 69 | } |
70 | #pragma warning restore 0168 | ||
67 | } | 71 | } |
68 | } | 72 | } |
69 | else if (arg is Variable) | 73 | else if (arg is Variable) |
70 | { | 74 | { |
75 | // disable warning on l1, don't see how we can | ||
76 | // code this differently | ||
77 | #pragma warning disable 0168 | ||
71 | foreach (bool l1 in ((Variable)arg).unify(this)) | 78 | foreach (bool l1 in ((Variable)arg).unify(this)) |
72 | yield return false; | 79 | yield return false; |
80 | #pragma warning restore 0168 | ||
73 | } | 81 | } |
74 | } | 82 | } |
75 | 83 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs index 041cceb..6ef8327 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs | |||
@@ -61,6 +61,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
61 | Functor3 argFunctor = (Functor3)arg; | 61 | Functor3 argFunctor = (Functor3)arg; |
62 | if (_name.Equals(argFunctor._name)) | 62 | if (_name.Equals(argFunctor._name)) |
63 | { | 63 | { |
64 | // disable warning on l1, l2, l3 don't see how we can | ||
65 | // code this differently | ||
66 | #pragma warning disable 0168 | ||
64 | foreach (bool l1 in YP.unify(_arg1, argFunctor._arg1)) | 67 | foreach (bool l1 in YP.unify(_arg1, argFunctor._arg1)) |
65 | { | 68 | { |
66 | foreach (bool l2 in YP.unify(_arg2, argFunctor._arg2)) | 69 | foreach (bool l2 in YP.unify(_arg2, argFunctor._arg2)) |
@@ -69,12 +72,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
69 | yield return false; | 72 | yield return false; |
70 | } | 73 | } |
71 | } | 74 | } |
75 | #pragma warning restore 0168 | ||
72 | } | 76 | } |
73 | } | 77 | } |
74 | else if (arg is Variable) | 78 | else if (arg is Variable) |
75 | { | 79 | { |
80 | // disable warning on l1, don't see how we can | ||
81 | // code this differently | ||
82 | #pragma warning disable 0168 | ||
76 | foreach (bool l1 in ((Variable)arg).unify(this)) | 83 | foreach (bool l1 in ((Variable)arg).unify(this)) |
77 | yield return false; | 84 | yield return false; |
85 | #pragma warning restore 0168 | ||
78 | } | 86 | } |
79 | } | 87 | } |
80 | 88 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Parser.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Parser.cs index 105b556..e9dd8f1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Parser.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Parser.cs | |||
@@ -44,6 +44,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
44 | yield return false; | 44 | yield return false; |
45 | } | 45 | } |
46 | 46 | ||
47 | // disable warning about unused variables: the following code | ||
48 | // is infested with it. | ||
49 | #pragma warning disable 0168, 0219 | ||
50 | |||
47 | // Debug: Hand-modify this central predicate to do tail recursion. | 51 | // Debug: Hand-modify this central predicate to do tail recursion. |
48 | public static IEnumerable<bool> read_tokens(object arg1, object arg2, object arg3) | 52 | public static IEnumerable<bool> read_tokens(object arg1, object arg2, object arg3) |
49 | { | 53 | { |
@@ -188,7 +192,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
188 | // Compiler output follows. | 192 | // Compiler output follows. |
189 | 193 | ||
190 | class YPInnerClass { } | 194 | class YPInnerClass { } |
191 | static Type getDeclaringClass() { return typeof(YPInnerClass).DeclaringType; } | 195 | // static Type getDeclaringClass() { return typeof(YPInnerClass).DeclaringType; } |
192 | 196 | ||
193 | public static IEnumerable<bool> parseInput(object TermList) | 197 | public static IEnumerable<bool> parseInput(object TermList) |
194 | { | 198 | { |
@@ -224,10 +228,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
224 | if (YP.termEqual(Term, Atom.a(@"end_of_file"))) | 228 | if (YP.termEqual(Term, Atom.a(@"end_of_file"))) |
225 | { | 229 | { |
226 | yield break; | 230 | yield break; |
227 | goto cutIf1; | 231 | // unreachable code: |
232 | // goto cutIf1; | ||
228 | } | 233 | } |
229 | yield return false; | 234 | yield return false; |
230 | cutIf1: | 235 | // cutIf1: |
231 | { } | 236 | { } |
232 | } | 237 | } |
233 | } | 238 | } |
@@ -4452,6 +4457,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
4452 | { } | 4457 | { } |
4453 | } | 4458 | } |
4454 | } | 4459 | } |
4455 | 4460 | #pragma warning restore 0168 | |
4456 | } | 4461 | } |
4457 | } | 4462 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Variable.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Variable.cs index 2b5b0f1..8e2aa7e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Variable.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Variable.cs | |||
@@ -92,8 +92,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
92 | } | 92 | } |
93 | else | 93 | else |
94 | { | 94 | { |
95 | // disable warning on l1, don't see how we can | ||
96 | // code this differently | ||
97 | #pragma warning disable 0168 | ||
95 | foreach (bool l1 in YP.unify(this, arg)) | 98 | foreach (bool l1 in YP.unify(this, arg)) |
96 | yield return false; | 99 | yield return false; |
100 | #pragma warning restore 0168 | ||
97 | } | 101 | } |
98 | } | 102 | } |
99 | 103 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs index 74704aa..f0e8147 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs | |||
@@ -572,6 +572,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
572 | 572 | ||
573 | Variable Name = new Variable(); | 573 | Variable Name = new Variable(); |
574 | Variable ArgList = new Variable(); | 574 | Variable ArgList = new Variable(); |
575 | // disable warning on l1, don't see how we can | ||
576 | // code this differently | ||
577 | #pragma warning disable 0168 | ||
575 | foreach (bool l1 in new ListPair(Name, ArgList).unify(List)) | 578 | foreach (bool l1 in new ListPair(Name, ArgList).unify(List)) |
576 | { | 579 | { |
577 | object[] args = ListPair.toArray(ArgList); | 580 | object[] args = ListPair.toArray(ArgList); |
@@ -585,6 +588,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
585 | 588 | ||
586 | return YP.unify(Term, Functor.make((Atom)YP.getValue(Name), args)); | 589 | return YP.unify(Term, Functor.make((Atom)YP.getValue(Name), args)); |
587 | } | 590 | } |
591 | #pragma warning restore 0168 | ||
588 | 592 | ||
589 | return YP.fail(); | 593 | return YP.fail(); |
590 | } | 594 | } |
@@ -597,11 +601,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
597 | 601 | ||
598 | if (!(Term is Variable)) | 602 | if (!(Term is Variable)) |
599 | { | 603 | { |
604 | // disable warning on l1, don't see how we can | ||
605 | // code this differently | ||
606 | #pragma warning disable 0168 | ||
600 | foreach (bool l1 in YP.unify(FunctorName, getFunctorName(Term))) | 607 | foreach (bool l1 in YP.unify(FunctorName, getFunctorName(Term))) |
601 | { | 608 | { |
602 | foreach (bool l2 in YP.unify(Arity, getFunctorArgs(Term).Length)) | 609 | foreach (bool l2 in YP.unify(Arity, getFunctorArgs(Term).Length)) |
603 | yield return false; | 610 | yield return false; |
604 | } | 611 | } |
612 | #pragma warning restore 0168 | ||
605 | } | 613 | } |
606 | else | 614 | else |
607 | throw new NotImplementedException("Debug: must finish functor/3"); | 615 | throw new NotImplementedException("Debug: must finish functor/3"); |
@@ -621,8 +629,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
621 | if (argNumberInt >= 1 && argNumberInt <= termArgs.Length) | 629 | if (argNumberInt >= 1 && argNumberInt <= termArgs.Length) |
622 | { | 630 | { |
623 | // The first ArgNumber is at 1, not 0. | 631 | // The first ArgNumber is at 1, not 0. |
632 | // disable warning on l1, don't see how we can | ||
633 | // code this differently | ||
634 | #pragma warning disable 0168 | ||
624 | foreach (bool l1 in YP.unify(Value, termArgs[argNumberInt - 1])) | 635 | foreach (bool l1 in YP.unify(Value, termArgs[argNumberInt - 1])) |
625 | yield return false; | 636 | yield return false; |
637 | #pragma warning restore 0168 | ||
626 | } | 638 | } |
627 | } | 639 | } |
628 | } | 640 | } |
@@ -814,8 +826,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
814 | object[] args = new object[] { Priority, Specifier, Operator }; | 826 | object[] args = new object[] { Priority, Specifier, Operator }; |
815 | foreach (object[] answer in _operatorTable) | 827 | foreach (object[] answer in _operatorTable) |
816 | { | 828 | { |
829 | // disable warning on l1, don't see how we can | ||
830 | // code this differently | ||
831 | #pragma warning disable 0168 | ||
817 | foreach (bool l1 in YP.unifyArrays(args, answer)) | 832 | foreach (bool l1 in YP.unifyArrays(args, answer)) |
818 | yield return false; | 833 | yield return false; |
834 | #pragma warning restore 0168 | ||
819 | } | 835 | } |
820 | } | 836 | } |
821 | 837 | ||
@@ -847,12 +863,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
847 | int afterInt = atomAtom._name.Length - (beforeInt + lengthInt); | 863 | int afterInt = atomAtom._name.Length - (beforeInt + lengthInt); |
848 | if (afterInt >= 0) | 864 | if (afterInt >= 0) |
849 | { | 865 | { |
866 | // disable warning on l1, don't see how we can | ||
867 | // code this differently | ||
868 | #pragma warning disable 0168 | ||
850 | foreach (bool l1 in YP.unify(After, afterInt)) | 869 | foreach (bool l1 in YP.unify(After, afterInt)) |
851 | { | 870 | { |
852 | foreach (bool l2 in YP.unify | 871 | foreach (bool l2 in YP.unify |
853 | (Sub_atom, Atom.a(atomAtom._name.Substring(beforeInt, lengthInt)))) | 872 | (Sub_atom, Atom.a(atomAtom._name.Substring(beforeInt, lengthInt)))) |
854 | yield return false; | 873 | yield return false; |
855 | } | 874 | } |
875 | #pragma warning restore 0168 | ||
856 | } | 876 | } |
857 | } | 877 | } |
858 | 878 | ||
@@ -1201,9 +1221,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
1201 | if (arity == 2 && (name == Atom.a(",") || name == Atom.a(";") || name == Atom.DOT)) | 1221 | if (arity == 2 && (name == Atom.a(",") || name == Atom.a(";") || name == Atom.DOT)) |
1202 | return false; | 1222 | return false; |
1203 | // Use the same mapping to static predicates in YP as the compiler. | 1223 | // Use the same mapping to static predicates in YP as the compiler. |
1224 | // disable warning on l1, don't see how we can | ||
1225 | // code this differently | ||
1226 | #pragma warning disable 0168 | ||
1204 | foreach (bool l1 in YPCompiler.functorCallYPFunctionName(name, arity, new Variable())) | 1227 | foreach (bool l1 in YPCompiler.functorCallYPFunctionName(name, arity, new Variable())) |
1205 | return false; | 1228 | return false; |
1206 | // Debug: Do we need to check if name._module is null? | 1229 | // Debug: Do we need to check if name._module is null? |
1230 | #pragma warning restore 0168 | ||
1207 | return true; | 1231 | return true; |
1208 | } | 1232 | } |
1209 | 1233 | ||
@@ -1342,9 +1366,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
1342 | 1366 | ||
1343 | foreach (NameArity key in _predicatesStore.Keys) | 1367 | foreach (NameArity key in _predicatesStore.Keys) |
1344 | { | 1368 | { |
1369 | // disable warning on l1, don't see how we can | ||
1370 | // code this differently | ||
1371 | #pragma warning disable 0168 | ||
1345 | foreach (bool l1 in YP.unify | 1372 | foreach (bool l1 in YP.unify |
1346 | (new Functor2(Atom.SLASH, key._name, key._arity), NameSlashArity)) | 1373 | (new Functor2(Atom.SLASH, key._name, key._arity), NameSlashArity)) |
1347 | yield return false; | 1374 | yield return false; |
1375 | #pragma warning restore 0168 | ||
1348 | } | 1376 | } |
1349 | } | 1377 | } |
1350 | 1378 | ||
@@ -1414,7 +1442,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
1414 | /// <returns></returns> | 1442 | /// <returns></returns> |
1415 | public static void script_event(object script_event, object script_params) | 1443 | public static void script_event(object script_event, object script_params) |
1416 | { | 1444 | { |
1417 | string function = ((Atom)YP.getValue(script_event))._name; | 1445 | // string function = ((Atom)YP.getValue(script_event))._name; |
1418 | object[] array = ListPair.toArray(script_params); | 1446 | object[] array = ListPair.toArray(script_params); |
1419 | if (array == null) | 1447 | if (array == null) |
1420 | return; // YP.fail(); | 1448 | return; // YP.fail(); |
@@ -1600,11 +1628,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
1600 | if (_exception != null) | 1628 | if (_exception != null) |
1601 | { | 1629 | { |
1602 | bool didUnify = false; | 1630 | bool didUnify = false; |
1631 | // disable warning on l1, don't see how we can | ||
1632 | // code this differently | ||
1633 | #pragma warning disable 0168 | ||
1603 | foreach (bool l1 in YP.unify(_exception._term, Catcher)) | 1634 | foreach (bool l1 in YP.unify(_exception._term, Catcher)) |
1604 | { | 1635 | { |
1605 | didUnify = true; | 1636 | didUnify = true; |
1606 | yield return false; | 1637 | yield return false; |
1607 | } | 1638 | } |
1639 | #pragma warning restore 0168 | ||
1640 | |||
1608 | if (!didUnify) | 1641 | if (!didUnify) |
1609 | throw _exception; | 1642 | throw _exception; |
1610 | } | 1643 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YPCompiler.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YPCompiler.cs index c2040c9..d6115ce 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YPCompiler.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YPCompiler.cs | |||
@@ -209,14 +209,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
209 | object[] functorArgs = YP.getFunctorArgs(Term); | 209 | object[] functorArgs = YP.getFunctorArgs(Term); |
210 | 210 | ||
211 | Variable pred = new Variable(); | 211 | Variable pred = new Variable(); |
212 | // disable warning on l1, don't see how we can | ||
213 | // code this differently | ||
214 | #pragma warning disable 0168 | ||
212 | foreach (bool l1 in ((CompilerState)State)._pred.match | 215 | foreach (bool l1 in ((CompilerState)State)._pred.match |
213 | (new object[] { functorName, functorArgs.Length, pred, Atom.a("det") })) | 216 | (new object[] { functorName, functorArgs.Length, pred, Atom.a("det") })) |
214 | { | 217 | { |
215 | if (CompilerState.isNoneOut(YP.getFunctorArgs(pred.getValue()))) | 218 | if (CompilerState.isNoneOut(YP.getFunctorArgs(pred.getValue()))) |
216 | { | 219 | { |
217 | return true; | 220 | return true; |
218 | } | 221 | } |
219 | } | 222 | } |
223 | #pragma warning restore 0168 | ||
220 | 224 | ||
221 | return false; | 225 | return false; |
222 | } | 226 | } |
@@ -228,14 +232,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
228 | object[] functorArgs = YP.getFunctorArgs(Term); | 232 | object[] functorArgs = YP.getFunctorArgs(Term); |
229 | 233 | ||
230 | Variable pred = new Variable(); | 234 | Variable pred = new Variable(); |
235 | // disable warning on l1, don't see how we can | ||
236 | // code this differently | ||
237 | #pragma warning disable 0168 | ||
231 | foreach (bool l1 in ((CompilerState)State)._pred.match | 238 | foreach (bool l1 in ((CompilerState)State)._pred.match |
232 | (new object[] { functorName, functorArgs.Length, pred, Atom.a("semidet") })) | 239 | (new object[] { functorName, functorArgs.Length, pred, Atom.a("semidet") })) |
233 | { | 240 | { |
234 | if (CompilerState.isNoneOut(YP.getFunctorArgs(pred.getValue()))) | 241 | if (CompilerState.isNoneOut(YP.getFunctorArgs(pred.getValue()))) |
235 | { | 242 | { |
236 | return true; | 243 | return true; |
237 | } | 244 | } |
238 | } | 245 | } |
246 | #pragma warning restore 0168 | ||
239 | 247 | ||
240 | return false; | 248 | return false; |
241 | } | 249 | } |
@@ -275,6 +283,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
275 | } | 283 | } |
276 | } | 284 | } |
277 | 285 | ||
286 | // disable warning unused variables, the following code is | ||
287 | // infested with it. | ||
288 | #pragma warning disable 0168, 0219 | ||
289 | |||
278 | /// <summary> | 290 | /// <summary> |
279 | /// Use makeFunctionPseudoCode, convertFunctionCSharp and compileAnonymousFunction | 291 | /// Use makeFunctionPseudoCode, convertFunctionCSharp and compileAnonymousFunction |
280 | /// to return an anonymous YP.IClause for the Head and Body of a rule clause. | 292 | /// to return an anonymous YP.IClause for the Head and Body of a rule clause. |
@@ -3939,12 +3951,12 @@ namespace Temporary { | |||
3939 | YP.nl(); | 3951 | YP.nl(); |
3940 | convertStatementListCSharp(RestStatements, Level); | 3952 | convertStatementListCSharp(RestStatements, Level); |
3941 | return; | 3953 | return; |
3942 | goto cutIf1; | 3954 | // goto cutIf1; |
3943 | } | 3955 | } |
3944 | convertStatementListCSharp(RestStatements, Level); | 3956 | convertStatementListCSharp(RestStatements, Level); |
3945 | return; | 3957 | return; |
3946 | cutIf1: | 3958 | // cutIf1: |
3947 | { } | 3959 | // { } |
3948 | } | 3960 | } |
3949 | } | 3961 | } |
3950 | { | 3962 | { |
@@ -4111,12 +4123,12 @@ namespace Temporary { | |||
4111 | YP.write(Atom.a(@", ")); | 4123 | YP.write(Atom.a(@", ")); |
4112 | convertArgListCSharp(Tail); | 4124 | convertArgListCSharp(Tail); |
4113 | return; | 4125 | return; |
4114 | goto cutIf1; | 4126 | // goto cutIf1; |
4115 | } | 4127 | } |
4116 | convertArgListCSharp(Tail); | 4128 | convertArgListCSharp(Tail); |
4117 | return; | 4129 | return; |
4118 | cutIf1: | 4130 | // cutIf1: |
4119 | { } | 4131 | // { } |
4120 | } | 4132 | } |
4121 | } | 4133 | } |
4122 | } | 4134 | } |
@@ -4266,13 +4278,13 @@ namespace Temporary { | |||
4266 | YP.put_code(Code); | 4278 | YP.put_code(Code); |
4267 | convertStringCodesCSharp(RestCodes); | 4279 | convertStringCodesCSharp(RestCodes); |
4268 | return; | 4280 | return; |
4269 | goto cutIf1; | 4281 | // goto cutIf1; |
4270 | } | 4282 | } |
4271 | YP.put_code(Code); | 4283 | YP.put_code(Code); |
4272 | convertStringCodesCSharp(RestCodes); | 4284 | convertStringCodesCSharp(RestCodes); |
4273 | return; | 4285 | return; |
4274 | cutIf1: | 4286 | // cutIf1: |
4275 | { } | 4287 | // { } |
4276 | } | 4288 | } |
4277 | } | 4289 | } |
4278 | } | 4290 | } |
@@ -4623,12 +4635,12 @@ namespace Temporary { | |||
4623 | YP.write(Atom.a(@", ")); | 4635 | YP.write(Atom.a(@", ")); |
4624 | convertArgListJavascript(Tail); | 4636 | convertArgListJavascript(Tail); |
4625 | return; | 4637 | return; |
4626 | goto cutIf1; | 4638 | // goto cutIf1; |
4627 | } | 4639 | } |
4628 | convertArgListJavascript(Tail); | 4640 | convertArgListJavascript(Tail); |
4629 | return; | 4641 | return; |
4630 | cutIf1: | 4642 | // cutIf1: |
4631 | { } | 4643 | // { } |
4632 | } | 4644 | } |
4633 | } | 4645 | } |
4634 | } | 4646 | } |
@@ -4777,7 +4789,7 @@ namespace Temporary { | |||
4777 | YP.put_code(Code); | 4789 | YP.put_code(Code); |
4778 | convertStringCodesJavascript(RestCodes); | 4790 | convertStringCodesJavascript(RestCodes); |
4779 | return; | 4791 | return; |
4780 | goto cutIf1; | 4792 | // goto cutIf1; |
4781 | } | 4793 | } |
4782 | if (YP.termEqual(Code, 92)) | 4794 | if (YP.termEqual(Code, 92)) |
4783 | { | 4795 | { |
@@ -4785,13 +4797,13 @@ namespace Temporary { | |||
4785 | YP.put_code(Code); | 4797 | YP.put_code(Code); |
4786 | convertStringCodesJavascript(RestCodes); | 4798 | convertStringCodesJavascript(RestCodes); |
4787 | return; | 4799 | return; |
4788 | goto cutIf1; | 4800 | // goto cutIf1; |
4789 | } | 4801 | } |
4790 | YP.put_code(Code); | 4802 | YP.put_code(Code); |
4791 | convertStringCodesJavascript(RestCodes); | 4803 | convertStringCodesJavascript(RestCodes); |
4792 | return; | 4804 | return; |
4793 | cutIf1: | 4805 | // cutIf1: |
4794 | { } | 4806 | // { } |
4795 | } | 4807 | } |
4796 | } | 4808 | } |
4797 | } | 4809 | } |
@@ -5420,12 +5432,12 @@ namespace Temporary { | |||
5420 | YP.write(Atom.a(@", ")); | 5432 | YP.write(Atom.a(@", ")); |
5421 | convertArgListPython(Tail); | 5433 | convertArgListPython(Tail); |
5422 | return; | 5434 | return; |
5423 | goto cutIf1; | 5435 | // goto cutIf1; |
5424 | } | 5436 | } |
5425 | convertArgListPython(Tail); | 5437 | convertArgListPython(Tail); |
5426 | return; | 5438 | return; |
5427 | cutIf1: | 5439 | // cutIf1: |
5428 | { } | 5440 | // { } |
5429 | } | 5441 | } |
5430 | } | 5442 | } |
5431 | } | 5443 | } |
@@ -5573,7 +5585,7 @@ namespace Temporary { | |||
5573 | YP.put_code(Code); | 5585 | YP.put_code(Code); |
5574 | convertStringCodesPython(RestCodes); | 5586 | convertStringCodesPython(RestCodes); |
5575 | return; | 5587 | return; |
5576 | goto cutIf1; | 5588 | // goto cutIf1; |
5577 | } | 5589 | } |
5578 | if (YP.termEqual(Code, 92)) | 5590 | if (YP.termEqual(Code, 92)) |
5579 | { | 5591 | { |
@@ -5581,13 +5593,13 @@ namespace Temporary { | |||
5581 | YP.put_code(Code); | 5593 | YP.put_code(Code); |
5582 | convertStringCodesPython(RestCodes); | 5594 | convertStringCodesPython(RestCodes); |
5583 | return; | 5595 | return; |
5584 | goto cutIf1; | 5596 | // goto cutIf1; |
5585 | } | 5597 | } |
5586 | YP.put_code(Code); | 5598 | YP.put_code(Code); |
5587 | convertStringCodesPython(RestCodes); | 5599 | convertStringCodesPython(RestCodes); |
5588 | return; | 5600 | return; |
5589 | cutIf1: | 5601 | // cutIf1: |
5590 | { } | 5602 | // { } |
5591 | } | 5603 | } |
5592 | } | 5604 | } |
5593 | } | 5605 | } |
@@ -5646,6 +5658,7 @@ namespace Temporary { | |||
5646 | } | 5658 | } |
5647 | } | 5659 | } |
5648 | } | 5660 | } |
5661 | #pragma warning restore 0168 | ||
5649 | 5662 | ||
5650 | } | 5663 | } |
5651 | } | 5664 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs index 841ed26..d54d2f5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | |||
@@ -40,8 +40,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
40 | { | 40 | { |
41 | public class Compiler | 41 | public class Compiler |
42 | { | 42 | { |
43 | private static readonly log4net.ILog m_log | 43 | // private static readonly log4net.ILog m_log |
44 | = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 44 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
45 | 45 | ||
46 | // * Uses "LSL2Converter" to convert LSL to C# if necessary. | 46 | // * Uses "LSL2Converter" to convert LSL to C# if necessary. |
47 | // * Compiles C#-code into an assembly | 47 | // * Compiles C#-code into an assembly |
@@ -79,7 +79,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
79 | private static CSharpCodeProvider YPcodeProvider = new CSharpCodeProvider(); // YP is translated into CSharp | 79 | private static CSharpCodeProvider YPcodeProvider = new CSharpCodeProvider(); // YP is translated into CSharp |
80 | private static YP2CSConverter YP_Converter = new YP2CSConverter(); | 80 | private static YP2CSConverter YP_Converter = new YP2CSConverter(); |
81 | 81 | ||
82 | private static int instanceID = new Random().Next(0, int.MaxValue); // Unique number to use on our compiled files | 82 | // private static int instanceID = new Random().Next(0, int.MaxValue); // Unique number to use on our compiled files |
83 | private static UInt64 scriptCompileCounter = 0; // And a counter | 83 | private static UInt64 scriptCompileCounter = 0; // And a counter |
84 | 84 | ||
85 | public IScriptEngine m_scriptEngine; | 85 | public IScriptEngine m_scriptEngine; |
@@ -273,7 +273,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
273 | { | 273 | { |
274 | Directory.CreateDirectory(ScriptEnginesPath); | 274 | Directory.CreateDirectory(ScriptEnginesPath); |
275 | } | 275 | } |
276 | catch (Exception ex) | 276 | catch (Exception) |
277 | { | 277 | { |
278 | } | 278 | } |
279 | } | 279 | } |
@@ -285,7 +285,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
285 | { | 285 | { |
286 | Directory.CreateDirectory(ScriptEnginesPath); | 286 | Directory.CreateDirectory(ScriptEnginesPath); |
287 | } | 287 | } |
288 | catch (Exception ex) | 288 | catch (Exception) |
289 | { | 289 | { |
290 | } | 290 | } |
291 | } | 291 | } |
@@ -486,7 +486,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
486 | // } | 486 | // } |
487 | 487 | ||
488 | string rootPath = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory); | 488 | string rootPath = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory); |
489 | string rootPathSE = Path.GetDirectoryName(GetType().Assembly.Location); | 489 | // string rootPathSE = Path.GetDirectoryName(GetType().Assembly.Location); |
490 | //Console.WriteLine("Assembly location: " + rootPath); | 490 | //Console.WriteLine("Assembly location: " + rootPath); |
491 | parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.dll")); | 491 | parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.dll")); |
492 | parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.Api.Runtime.dll")); | 492 | parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.Api.Runtime.dll")); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/YP2CSConverter.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/YP2CSConverter.cs index 54b4861..69f9fdc 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/YP2CSConverter.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/YP2CSConverter.cs | |||
@@ -69,11 +69,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
69 | YP.tell(myCS_SW); | 69 | YP.tell(myCS_SW); |
70 | 70 | ||
71 | //Console.WriteLine("Mycode\n ===================================\n" + myCode+"\n"); | 71 | //Console.WriteLine("Mycode\n ===================================\n" + myCode+"\n"); |
72 | // disable warning on l1, don't see how we can | ||
73 | // code this differently | ||
74 | #pragma warning disable 0168 | ||
72 | foreach (bool l1 in Parser.parseInput(TermList)) | 75 | foreach (bool l1 in Parser.parseInput(TermList)) |
73 | { | 76 | { |
74 | foreach (bool l2 in YPCompiler.makeFunctionPseudoCode(TermList, FunctionCode)) | 77 | foreach (bool l2 in YPCompiler.makeFunctionPseudoCode(TermList, FunctionCode)) |
75 | { | 78 | { |
76 | ListPair VFC = new ListPair(FunctionCode, new Variable()); | 79 | // ListPair VFC = new ListPair(FunctionCode, new Variable()); |
77 | //Console.WriteLine("-------------------------") | 80 | //Console.WriteLine("-------------------------") |
78 | //Console.WriteLine(FunctionCode.ToString()) | 81 | //Console.WriteLine(FunctionCode.ToString()) |
79 | //Console.WriteLine("-------------------------") | 82 | //Console.WriteLine("-------------------------") |
@@ -81,6 +84,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
81 | //YPCompiler.convertStringCodesCSharp(VFC); | 84 | //YPCompiler.convertStringCodesCSharp(VFC); |
82 | } | 85 | } |
83 | } | 86 | } |
87 | #pragma warning restore 0168 | ||
84 | YP.seen(); | 88 | YP.seen(); |
85 | myCS_SW.Close(); | 89 | myCS_SW.Close(); |
86 | YP.told(); | 90 | YP.told(); |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Executor.cs b/OpenSim/Region/ScriptEngine/XEngine/Executor.cs index e12f2bf..b848a02 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/Executor.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/Executor.cs | |||
@@ -73,7 +73,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
73 | eventFlags |= kvp.Value; | 73 | eventFlags |= kvp.Value; |
74 | } | 74 | } |
75 | } | 75 | } |
76 | catch(Exception e) | 76 | catch(Exception) |
77 | { | 77 | { |
78 | //Console.WriteLine("Exeption in GetMethod:\n"+e.ToString()); | 78 | //Console.WriteLine("Exeption in GetMethod:\n"+e.ToString()); |
79 | } | 79 | } |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 1dc0b1e..3c1acb4 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
58 | private Scene m_Scene; | 58 | private Scene m_Scene; |
59 | private IConfig m_ScriptConfig; | 59 | private IConfig m_ScriptConfig; |
60 | private Compiler m_Compiler; | 60 | private Compiler m_Compiler; |
61 | private EventManager m_EventManager; | 61 | // private EventManager m_EventManager; |
62 | private int m_EventLimit; | 62 | private int m_EventLimit; |
63 | private bool m_KillTimedOutScripts; | 63 | private bool m_KillTimedOutScripts; |
64 | public AsyncCommandManager m_AsyncCommands; | 64 | public AsyncCommandManager m_AsyncCommands; |
@@ -111,12 +111,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
111 | get { return m_ScriptEngines; } | 111 | get { return m_ScriptEngines; } |
112 | } | 112 | } |
113 | 113 | ||
114 | private struct RezScriptParms | 114 | // private struct RezScriptParms |
115 | { | 115 | // { |
116 | uint LocalID; | 116 | // uint LocalID; |
117 | LLUUID ItemID; | 117 | // LLUUID ItemID; |
118 | string Script; | 118 | // string Script; |
119 | } | 119 | // } |
120 | 120 | ||
121 | public IConfig Config | 121 | public IConfig Config |
122 | { | 122 | { |
@@ -190,7 +190,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
190 | m_ScriptEngines.Add(this); | 190 | m_ScriptEngines.Add(this); |
191 | } | 191 | } |
192 | 192 | ||
193 | m_EventManager = new EventManager(this); | 193 | // m_EventManager = new EventManager(this); |
194 | 194 | ||
195 | StartEngine(minThreads, maxThreads, idleTimeout, prio, | 195 | StartEngine(minThreads, maxThreads, idleTimeout, prio, |
196 | maxScriptQueue, stackSize); | 196 | maxScriptQueue, stackSize); |
@@ -527,7 +527,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
527 | if (File.Exists(m_Assemblies[assetID]+".mdb")) | 527 | if (File.Exists(m_Assemblies[assetID]+".mdb")) |
528 | File.Delete(m_Assemblies[assetID]+".mdb"); | 528 | File.Delete(m_Assemblies[assetID]+".mdb"); |
529 | } | 529 | } |
530 | catch (Exception e) | 530 | catch (Exception) |
531 | { | 531 | { |
532 | } | 532 | } |
533 | m_Assemblies.Remove(assetID); | 533 | m_Assemblies.Remove(assetID); |