diff options
author | Melanie | 2010-02-14 22:27:39 +0000 |
---|---|---|
committer | Melanie | 2010-02-14 22:27:39 +0000 |
commit | 2084e08ad7a24908a4465108f2b76ee639c91ae6 (patch) | |
tree | 1cc1aa8f1c08de402f27036762b9ac2d1eccabfe /OpenSim | |
parent | Resolve a merge issue (diff) | |
parent | * SQLite match code casing with regionsettings table field casing (what's wit... (diff) | |
download | opensim-SC-2084e08ad7a24908a4465108f2b76ee639c91ae6.zip opensim-SC-2084e08ad7a24908a4465108f2b76ee639c91ae6.tar.gz opensim-SC-2084e08ad7a24908a4465108f2b76ee639c91ae6.tar.bz2 opensim-SC-2084e08ad7a24908a4465108f2b76ee639c91ae6.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim')
32 files changed, 353 insertions, 398 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs b/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs index 9c90a7e..ed18207 100644 --- a/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs +++ b/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs | |||
@@ -29,6 +29,7 @@ using System; | |||
29 | using System.IO; | 29 | using System.IO; |
30 | using System.Xml.Serialization; | 30 | using System.Xml.Serialization; |
31 | using OpenMetaverse; | 31 | using OpenMetaverse; |
32 | using OpenSim.Framework; | ||
32 | using OpenSim.Framework.Servers; | 33 | using OpenSim.Framework.Servers; |
33 | using OpenSim.Framework.Servers.HttpServer; | 34 | using OpenSim.Framework.Servers.HttpServer; |
34 | using OpenSim.Region.Framework.Interfaces; | 35 | using OpenSim.Region.Framework.Interfaces; |
@@ -156,8 +157,8 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | |||
156 | Vector3 min, max; | 157 | Vector3 min, max; |
157 | try | 158 | try |
158 | { | 159 | { |
159 | min = new Vector3((float)Double.Parse(subregion[0]), (float)Double.Parse(subregion[1]), (float)Double.Parse(subregion[2])); | 160 | min = new Vector3((float)Double.Parse(subregion[0], Culture.NumberFormatInfo), (float)Double.Parse(subregion[1], Culture.NumberFormatInfo), (float)Double.Parse(subregion[2], Culture.NumberFormatInfo)); |
160 | max = new Vector3((float)Double.Parse(subregion[3]), (float)Double.Parse(subregion[4]), (float)Double.Parse(subregion[5])); | 161 | max = new Vector3((float)Double.Parse(subregion[3], Culture.NumberFormatInfo), (float)Double.Parse(subregion[4], Culture.NumberFormatInfo), (float)Double.Parse(subregion[5], Culture.NumberFormatInfo)); |
161 | } | 162 | } |
162 | catch (Exception) | 163 | catch (Exception) |
163 | { | 164 | { |
diff --git a/OpenSim/Client/Linden/LLProxyLoginModule.cs b/OpenSim/Client/Linden/LLProxyLoginModule.cs index 14ce682..7c36a9b 100644 --- a/OpenSim/Client/Linden/LLProxyLoginModule.cs +++ b/OpenSim/Client/Linden/LLProxyLoginModule.cs | |||
@@ -218,9 +218,9 @@ namespace OpenSim.Client.Linden | |||
218 | { | 218 | { |
219 | //m_log.Debug("[CLIENT]: Main agent detected"); | 219 | //m_log.Debug("[CLIENT]: Main agent detected"); |
220 | agentData.startpos = | 220 | agentData.startpos = |
221 | new Vector3((float)Convert.ToDecimal((string)requestData["startpos_x"]), | 221 | new Vector3((float)Convert.ToDecimal((string)requestData["startpos_x"], Culture.NumberFormatInfo), |
222 | (float)Convert.ToDecimal((string)requestData["startpos_y"]), | 222 | (float)Convert.ToDecimal((string)requestData["startpos_y"], Culture.NumberFormatInfo), |
223 | (float)Convert.ToDecimal((string)requestData["startpos_z"])); | 223 | (float)Convert.ToDecimal((string)requestData["startpos_z"], Culture.NumberFormatInfo)); |
224 | agentData.child = false; | 224 | agentData.child = false; |
225 | } | 225 | } |
226 | 226 | ||
diff --git a/OpenSim/Data/MySQL/MySQLUserData.cs b/OpenSim/Data/MySQL/MySQLUserData.cs index 2cf88b8..0a9d2e3 100644 --- a/OpenSim/Data/MySQL/MySQLUserData.cs +++ b/OpenSim/Data/MySQL/MySQLUserData.cs | |||
@@ -622,11 +622,6 @@ namespace OpenSim.Data.MySQL | |||
622 | return false; | 622 | return false; |
623 | } | 623 | } |
624 | 624 | ||
625 | /// <summary> | ||
626 | /// Appearance | ||
627 | /// TODO: stubs for now to get us to a compiling state gently | ||
628 | /// override | ||
629 | /// </summary> | ||
630 | public override AvatarAppearance GetUserAppearance(UUID user) | 625 | public override AvatarAppearance GetUserAppearance(UUID user) |
631 | { | 626 | { |
632 | try | 627 | try |
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs index 83fd775..81c0703 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs | |||
@@ -626,18 +626,42 @@ namespace OpenSim.Data.SQLite | |||
626 | { | 626 | { |
627 | lock (ds) | 627 | lock (ds) |
628 | { | 628 | { |
629 | using (SqliteCommand cmd = new SqliteCommand("delete from land where UUID=:UUID", m_conn)) | 629 | // Can't use blanket SQL statements when using SqlAdapters unless you re-read the data into the adapter |
630 | // after you're done. | ||
631 | // replaced below code with the SqliteAdapter version. | ||
632 | //using (SqliteCommand cmd = new SqliteCommand("delete from land where UUID=:UUID", m_conn)) | ||
633 | //{ | ||
634 | // cmd.Parameters.Add(new SqliteParameter(":UUID", globalID.ToString())); | ||
635 | // cmd.ExecuteNonQuery(); | ||
636 | //} | ||
637 | |||
638 | //using (SqliteCommand cmd = new SqliteCommand("delete from landaccesslist where LandUUID=:UUID", m_conn)) | ||
639 | //{ | ||
640 | // cmd.Parameters.Add(new SqliteParameter(":UUID", globalID.ToString())); | ||
641 | // cmd.ExecuteNonQuery(); | ||
642 | //} | ||
643 | |||
644 | DataTable land = ds.Tables["land"]; | ||
645 | DataTable landaccesslist = ds.Tables["landaccesslist"]; | ||
646 | DataRow landRow = land.Rows.Find(globalID.ToString()); | ||
647 | if (landRow != null) | ||
630 | { | 648 | { |
631 | cmd.Parameters.Add(new SqliteParameter(":UUID", globalID.ToString())); | 649 | land.Rows.Remove(landRow); |
632 | cmd.ExecuteNonQuery(); | ||
633 | } | 650 | } |
634 | 651 | List<DataRow> rowsToDelete = new List<DataRow>(); | |
635 | using (SqliteCommand cmd = new SqliteCommand("delete from landaccesslist where LandUUID=:UUID", m_conn)) | 652 | foreach (DataRow rowToCheck in landaccesslist.Rows) |
636 | { | 653 | { |
637 | cmd.Parameters.Add(new SqliteParameter(":UUID", globalID.ToString())); | 654 | if (rowToCheck["LandUUID"].ToString() == globalID.ToString()) |
638 | cmd.ExecuteNonQuery(); | 655 | rowsToDelete.Add(rowToCheck); |
656 | } | ||
657 | for (int iter = 0; iter < rowsToDelete.Count; iter++) | ||
658 | { | ||
659 | landaccesslist.Rows.Remove(rowsToDelete[iter]); | ||
639 | } | 660 | } |
661 | |||
662 | |||
640 | } | 663 | } |
664 | Commit(); | ||
641 | } | 665 | } |
642 | 666 | ||
643 | /// <summary> | 667 | /// <summary> |
@@ -664,12 +688,27 @@ namespace OpenSim.Data.SQLite | |||
664 | } | 688 | } |
665 | 689 | ||
666 | // I know this caused someone issues before, but OpenSim is unusable if we leave this stuff around | 690 | // I know this caused someone issues before, but OpenSim is unusable if we leave this stuff around |
667 | using (SqliteCommand cmd = new SqliteCommand("delete from landaccesslist where LandUUID=:LandUUID", m_conn)) | 691 | //using (SqliteCommand cmd = new SqliteCommand("delete from landaccesslist where LandUUID=:LandUUID", m_conn)) |
692 | //{ | ||
693 | // cmd.Parameters.Add(new SqliteParameter(":LandUUID", parcel.LandData.GlobalID.ToString())); | ||
694 | // cmd.ExecuteNonQuery(); | ||
695 | |||
696 | // } | ||
697 | |||
698 | // This is the slower.. but more appropriate thing to do | ||
699 | |||
700 | // We can't modify the table with direct queries before calling Commit() and re-filling them. | ||
701 | List<DataRow> rowsToDelete = new List<DataRow>(); | ||
702 | foreach (DataRow rowToCheck in landaccesslist.Rows) | ||
668 | { | 703 | { |
669 | cmd.Parameters.Add(new SqliteParameter(":LandUUID", parcel.LandData.GlobalID.ToString())); | 704 | if (rowToCheck["LandUUID"].ToString() == parcel.LandData.GlobalID.ToString()) |
670 | cmd.ExecuteNonQuery(); | 705 | rowsToDelete.Add(rowToCheck); |
671 | } | 706 | } |
672 | 707 | for (int iter = 0; iter < rowsToDelete.Count; iter++) | |
708 | { | ||
709 | landaccesslist.Rows.Remove(rowsToDelete[iter]); | ||
710 | } | ||
711 | rowsToDelete.Clear(); | ||
673 | foreach (ParcelManager.ParcelAccessEntry entry in parcel.LandData.ParcelAccessList) | 712 | foreach (ParcelManager.ParcelAccessEntry entry in parcel.LandData.ParcelAccessList) |
674 | { | 713 | { |
675 | DataRow newAccessRow = landaccesslist.NewRow(); | 714 | DataRow newAccessRow = landaccesslist.NewRow(); |
@@ -1720,7 +1759,7 @@ namespace OpenSim.Data.SQLite | |||
1720 | row["terrain_raise_limit"] = settings.TerrainRaiseLimit; | 1759 | row["terrain_raise_limit"] = settings.TerrainRaiseLimit; |
1721 | row["terrain_lower_limit"] = settings.TerrainLowerLimit; | 1760 | row["terrain_lower_limit"] = settings.TerrainLowerLimit; |
1722 | row["use_estate_sun"] = settings.UseEstateSun; | 1761 | row["use_estate_sun"] = settings.UseEstateSun; |
1723 | row["sandbox"] = settings.Sandbox; | 1762 | row["Sandbox"] = settings.Sandbox; // database uses upper case S for sandbox |
1724 | row["sunvectorx"] = settings.SunVector.X; | 1763 | row["sunvectorx"] = settings.SunVector.X; |
1725 | row["sunvectory"] = settings.SunVector.Y; | 1764 | row["sunvectory"] = settings.SunVector.Y; |
1726 | row["sunvectorz"] = settings.SunVector.Z; | 1765 | row["sunvectorz"] = settings.SunVector.Z; |
@@ -1822,6 +1861,7 @@ namespace OpenSim.Data.SQLite | |||
1822 | /// <param name="regionUUID"></param> | 1861 | /// <param name="regionUUID"></param> |
1823 | private void addPrim(SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID) | 1862 | private void addPrim(SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID) |
1824 | { | 1863 | { |
1864 | |||
1825 | DataTable prims = ds.Tables["prims"]; | 1865 | DataTable prims = ds.Tables["prims"]; |
1826 | DataTable shapes = ds.Tables["primshapes"]; | 1866 | DataTable shapes = ds.Tables["primshapes"]; |
1827 | 1867 | ||
@@ -1971,6 +2011,40 @@ namespace OpenSim.Data.SQLite | |||
1971 | } | 2011 | } |
1972 | 2012 | ||
1973 | /// <summary> | 2013 | /// <summary> |
2014 | /// create an update command | ||
2015 | /// </summary> | ||
2016 | /// <param name="table">table name</param> | ||
2017 | /// <param name="pk"></param> | ||
2018 | /// <param name="dt"></param> | ||
2019 | /// <returns>the created command</returns> | ||
2020 | private static SqliteCommand createUpdateCommand(string table, string pk1, string pk2, DataTable dt) | ||
2021 | { | ||
2022 | string sql = "update " + table + " set "; | ||
2023 | string subsql = String.Empty; | ||
2024 | foreach (DataColumn col in dt.Columns) | ||
2025 | { | ||
2026 | if (subsql.Length > 0) | ||
2027 | { | ||
2028 | // a map function would rock so much here | ||
2029 | subsql += ", "; | ||
2030 | } | ||
2031 | subsql += col.ColumnName + "= :" + col.ColumnName; | ||
2032 | } | ||
2033 | sql += subsql; | ||
2034 | sql += " where " + pk1 + " and " + pk2; | ||
2035 | SqliteCommand cmd = new SqliteCommand(sql); | ||
2036 | |||
2037 | // this provides the binding for all our parameters, so | ||
2038 | // much less code than it used to be | ||
2039 | |||
2040 | foreach (DataColumn col in dt.Columns) | ||
2041 | { | ||
2042 | cmd.Parameters.Add(createSqliteParameter(col.ColumnName, col.DataType)); | ||
2043 | } | ||
2044 | return cmd; | ||
2045 | } | ||
2046 | |||
2047 | /// <summary> | ||
1974 | /// | 2048 | /// |
1975 | /// </summary> | 2049 | /// </summary> |
1976 | /// <param name="dt">Data Table</param> | 2050 | /// <param name="dt">Data Table</param> |
@@ -2088,6 +2162,11 @@ namespace OpenSim.Data.SQLite | |||
2088 | 2162 | ||
2089 | da.UpdateCommand = createUpdateCommand("land", "UUID=:UUID", ds.Tables["land"]); | 2163 | da.UpdateCommand = createUpdateCommand("land", "UUID=:UUID", ds.Tables["land"]); |
2090 | da.UpdateCommand.Connection = conn; | 2164 | da.UpdateCommand.Connection = conn; |
2165 | |||
2166 | SqliteCommand delete = new SqliteCommand("delete from land where UUID=:UUID"); | ||
2167 | delete.Parameters.Add(createSqliteParameter("UUID", typeof(String))); | ||
2168 | da.DeleteCommand = delete; | ||
2169 | da.DeleteCommand.Connection = conn; | ||
2091 | } | 2170 | } |
2092 | 2171 | ||
2093 | /// <summary> | 2172 | /// <summary> |
@@ -2099,6 +2178,16 @@ namespace OpenSim.Data.SQLite | |||
2099 | { | 2178 | { |
2100 | da.InsertCommand = createInsertCommand("landaccesslist", ds.Tables["landaccesslist"]); | 2179 | da.InsertCommand = createInsertCommand("landaccesslist", ds.Tables["landaccesslist"]); |
2101 | da.InsertCommand.Connection = conn; | 2180 | da.InsertCommand.Connection = conn; |
2181 | |||
2182 | da.UpdateCommand = createUpdateCommand("landaccesslist", "LandUUID=:landUUID", "AccessUUID=:AccessUUID", ds.Tables["landaccesslist"]); | ||
2183 | da.UpdateCommand.Connection = conn; | ||
2184 | |||
2185 | SqliteCommand delete = new SqliteCommand("delete from landaccesslist where LandUUID= :LandUUID and AccessUUID= :AccessUUID"); | ||
2186 | delete.Parameters.Add(createSqliteParameter("LandUUID", typeof(String))); | ||
2187 | delete.Parameters.Add(createSqliteParameter("AccessUUID", typeof(String))); | ||
2188 | da.DeleteCommand = delete; | ||
2189 | da.DeleteCommand.Connection = conn; | ||
2190 | |||
2102 | } | 2191 | } |
2103 | 2192 | ||
2104 | private void setupRegionSettingsCommands(SqliteDataAdapter da, SqliteConnection conn) | 2193 | private void setupRegionSettingsCommands(SqliteDataAdapter da, SqliteConnection conn) |
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 56fcc15..a3ea499 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs | |||
@@ -69,9 +69,7 @@ namespace OpenSim.Framework | |||
69 | private static UUID HAIR_ASSET = new UUID("d342e6c0-b9d2-11dc-95ff-0800200c9a66"); | 69 | private static UUID HAIR_ASSET = new UUID("d342e6c0-b9d2-11dc-95ff-0800200c9a66"); |
70 | private static UUID HAIR_ITEM = new UUID("d342e6c1-b9d2-11dc-95ff-0800200c9a66"); | 70 | private static UUID HAIR_ITEM = new UUID("d342e6c1-b9d2-11dc-95ff-0800200c9a66"); |
71 | 71 | ||
72 | public readonly static int VISUALPARAM_COUNT = 218; | 72 | public readonly static int VISUALPARAM_COUNT = 218; |
73 | |||
74 | |||
75 | 73 | ||
76 | protected UUID m_owner; | 74 | protected UUID m_owner; |
77 | 75 | ||
@@ -346,11 +344,7 @@ namespace OpenSim.Framework | |||
346 | } | 344 | } |
347 | */ | 345 | */ |
348 | 346 | ||
349 | 347 | public AvatarAppearance() : this(UUID.Zero) {} | |
350 | public AvatarAppearance() | ||
351 | : this(UUID.Zero) | ||
352 | { | ||
353 | } | ||
354 | 348 | ||
355 | public AvatarAppearance(UUID owner) | 349 | public AvatarAppearance(UUID owner) |
356 | { | 350 | { |
@@ -367,10 +361,8 @@ namespace OpenSim.Framework | |||
367 | // This sets Visual Params with *less* weirder values then default. Instead of a ugly alien, it looks like a fat scientist | 361 | // This sets Visual Params with *less* weirder values then default. Instead of a ugly alien, it looks like a fat scientist |
368 | SetDefaultParams(m_visualparams); | 362 | SetDefaultParams(m_visualparams); |
369 | SetDefaultWearables(); | 363 | SetDefaultWearables(); |
370 | m_texture = GetDefaultTexture(); | 364 | m_texture = GetDefaultTexture(); |
371 | |||
372 | } | 365 | } |
373 | |||
374 | 366 | ||
375 | public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, byte[] visualParams) | 367 | public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, byte[] visualParams) |
376 | { | 368 | { |
@@ -1481,4 +1473,4 @@ namespace OpenSim.Framework | |||
1481 | SKIRT_SKIRT_BLUE = 217 | 1473 | SKIRT_SKIRT_BLUE = 217 |
1482 | } | 1474 | } |
1483 | } | 1475 | } |
1484 | } | 1476 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Services/LoginService.cs b/OpenSim/Framework/Communications/Services/LoginService.cs index 57ca704..71b38ed 100644 --- a/OpenSim/Framework/Communications/Services/LoginService.cs +++ b/OpenSim/Framework/Communications/Services/LoginService.cs | |||
@@ -1015,8 +1015,8 @@ namespace OpenSim.Framework.Communications.Services | |||
1015 | } | 1015 | } |
1016 | else | 1016 | else |
1017 | { | 1017 | { |
1018 | theUser.CurrentAgent.Position = new Vector3(float.Parse(uriMatch.Groups["x"].Value), | 1018 | theUser.CurrentAgent.Position = new Vector3(float.Parse(uriMatch.Groups["x"].Value, Culture.NumberFormatInfo), |
1019 | float.Parse(uriMatch.Groups["y"].Value), float.Parse(uriMatch.Groups["z"].Value)); | 1019 | float.Parse(uriMatch.Groups["y"].Value, Culture.NumberFormatInfo), float.Parse(uriMatch.Groups["z"].Value, Culture.NumberFormatInfo)); |
1020 | } | 1020 | } |
1021 | } | 1021 | } |
1022 | response.LookAt = "[r0,r1,r0]"; | 1022 | response.LookAt = "[r0,r1,r0]"; |
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index 4f0af06..02be141 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs | |||
@@ -785,7 +785,8 @@ namespace OpenSim.Framework.Communications | |||
785 | } | 785 | } |
786 | catch (Exception e) | 786 | catch (Exception e) |
787 | { | 787 | { |
788 | m_log.ErrorFormat("[USERSTORAGE]: Unable to find user appearance {0} via {1} ({2})", user.ToString(), plugin.Name, e.ToString()); | 788 | m_log.ErrorFormat( |
789 | "[USERSTORAGE]: Unable to find user appearance {0} via {1} ({2})", user, plugin.Name, e); | ||
789 | } | 790 | } |
790 | } | 791 | } |
791 | 792 | ||
diff --git a/OpenSim/Framework/Culture.cs b/OpenSim/Framework/Culture.cs index 2066794..3d78fac 100644 --- a/OpenSim/Framework/Culture.cs +++ b/OpenSim/Framework/Culture.cs | |||
@@ -33,7 +33,7 @@ namespace OpenSim.Framework | |||
33 | { | 33 | { |
34 | public class Culture | 34 | public class Culture |
35 | { | 35 | { |
36 | private static readonly CultureInfo m_cultureInfo = new CultureInfo("en-US", true); | 36 | private static readonly CultureInfo m_cultureInfo = new CultureInfo("en-US", false); |
37 | 37 | ||
38 | public static NumberFormatInfo NumberFormatInfo | 38 | public static NumberFormatInfo NumberFormatInfo |
39 | { | 39 | { |
diff --git a/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs b/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs index b5901e1..6ba4c5a 100644 --- a/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs +++ b/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs | |||
@@ -109,7 +109,7 @@ namespace OpenSim.Framework.Serialization.External | |||
109 | settings.AgentLimit = int.Parse(xtr.ReadElementContentAsString()); | 109 | settings.AgentLimit = int.Parse(xtr.ReadElementContentAsString()); |
110 | break; | 110 | break; |
111 | case "ObjectBonus": | 111 | case "ObjectBonus": |
112 | settings.ObjectBonus = double.Parse(xtr.ReadElementContentAsString()); | 112 | settings.ObjectBonus = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); |
113 | break; | 113 | break; |
114 | } | 114 | } |
115 | } | 115 | } |
@@ -134,28 +134,28 @@ namespace OpenSim.Framework.Serialization.External | |||
134 | settings.TerrainTexture4 = UUID.Parse(xtr.ReadElementContentAsString()); | 134 | settings.TerrainTexture4 = UUID.Parse(xtr.ReadElementContentAsString()); |
135 | break; | 135 | break; |
136 | case "ElevationLowSW": | 136 | case "ElevationLowSW": |
137 | settings.Elevation1SW = double.Parse(xtr.ReadElementContentAsString()); | 137 | settings.Elevation1SW = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); |
138 | break; | 138 | break; |
139 | case "ElevationLowNW": | 139 | case "ElevationLowNW": |
140 | settings.Elevation1NW = double.Parse(xtr.ReadElementContentAsString()); | 140 | settings.Elevation1NW = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); |
141 | break; | 141 | break; |
142 | case "ElevationLowSE": | 142 | case "ElevationLowSE": |
143 | settings.Elevation1SE = double.Parse(xtr.ReadElementContentAsString()); | 143 | settings.Elevation1SE = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); |
144 | break; | 144 | break; |
145 | case "ElevationLowNE": | 145 | case "ElevationLowNE": |
146 | settings.Elevation1NE = double.Parse(xtr.ReadElementContentAsString()); | 146 | settings.Elevation1NE = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); |
147 | break; | 147 | break; |
148 | case "ElevationHighSW": | 148 | case "ElevationHighSW": |
149 | settings.Elevation2SW = double.Parse(xtr.ReadElementContentAsString()); | 149 | settings.Elevation2SW = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); |
150 | break; | 150 | break; |
151 | case "ElevationHighNW": | 151 | case "ElevationHighNW": |
152 | settings.Elevation2NW = double.Parse(xtr.ReadElementContentAsString()); | 152 | settings.Elevation2NW = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); |
153 | break; | 153 | break; |
154 | case "ElevationHighSE": | 154 | case "ElevationHighSE": |
155 | settings.Elevation2SE = double.Parse(xtr.ReadElementContentAsString()); | 155 | settings.Elevation2SE = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); |
156 | break; | 156 | break; |
157 | case "ElevationHighNE": | 157 | case "ElevationHighNE": |
158 | settings.Elevation2NE = double.Parse(xtr.ReadElementContentAsString()); | 158 | settings.Elevation2NE = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); |
159 | break; | 159 | break; |
160 | } | 160 | } |
161 | } | 161 | } |
@@ -168,13 +168,13 @@ namespace OpenSim.Framework.Serialization.External | |||
168 | switch (xtr.Name) | 168 | switch (xtr.Name) |
169 | { | 169 | { |
170 | case "WaterHeight": | 170 | case "WaterHeight": |
171 | settings.WaterHeight = double.Parse(xtr.ReadElementContentAsString()); | 171 | settings.WaterHeight = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); |
172 | break; | 172 | break; |
173 | case "TerrainRaiseLimit": | 173 | case "TerrainRaiseLimit": |
174 | settings.TerrainRaiseLimit = double.Parse(xtr.ReadElementContentAsString()); | 174 | settings.TerrainRaiseLimit = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); |
175 | break; | 175 | break; |
176 | case "TerrainLowerLimit": | 176 | case "TerrainLowerLimit": |
177 | settings.TerrainLowerLimit = double.Parse(xtr.ReadElementContentAsString()); | 177 | settings.TerrainLowerLimit = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); |
178 | break; | 178 | break; |
179 | case "UseEstateSun": | 179 | case "UseEstateSun": |
180 | settings.UseEstateSun = bool.Parse(xtr.ReadElementContentAsString()); | 180 | settings.UseEstateSun = bool.Parse(xtr.ReadElementContentAsString()); |
diff --git a/OpenSim/Grid/UserServer.Modules/UserManager.cs b/OpenSim/Grid/UserServer.Modules/UserManager.cs index 36c6297..a2032dc 100644 --- a/OpenSim/Grid/UserServer.Modules/UserManager.cs +++ b/OpenSim/Grid/UserServer.Modules/UserManager.cs | |||
@@ -503,7 +503,7 @@ namespace OpenSim.Grid.UserServer.Modules | |||
503 | { | 503 | { |
504 | try | 504 | try |
505 | { | 505 | { |
506 | userProfile.HomeLocationX = (float)Convert.ToDecimal((string)requestData["home_pos_x"]); | 506 | userProfile.HomeLocationX = (float)Convert.ToDecimal((string)requestData["home_pos_x"], Culture.NumberFormatInfo); |
507 | } | 507 | } |
508 | catch (InvalidCastException) | 508 | catch (InvalidCastException) |
509 | { | 509 | { |
@@ -514,7 +514,7 @@ namespace OpenSim.Grid.UserServer.Modules | |||
514 | { | 514 | { |
515 | try | 515 | try |
516 | { | 516 | { |
517 | userProfile.HomeLocationY = (float)Convert.ToDecimal((string)requestData["home_pos_y"]); | 517 | userProfile.HomeLocationY = (float)Convert.ToDecimal((string)requestData["home_pos_y"], Culture.NumberFormatInfo); |
518 | } | 518 | } |
519 | catch (InvalidCastException) | 519 | catch (InvalidCastException) |
520 | { | 520 | { |
@@ -525,7 +525,7 @@ namespace OpenSim.Grid.UserServer.Modules | |||
525 | { | 525 | { |
526 | try | 526 | try |
527 | { | 527 | { |
528 | userProfile.HomeLocationZ = (float)Convert.ToDecimal((string)requestData["home_pos_z"]); | 528 | userProfile.HomeLocationZ = (float)Convert.ToDecimal((string)requestData["home_pos_z"], Culture.NumberFormatInfo); |
529 | } | 529 | } |
530 | catch (InvalidCastException) | 530 | catch (InvalidCastException) |
531 | { | 531 | { |
@@ -536,7 +536,7 @@ namespace OpenSim.Grid.UserServer.Modules | |||
536 | { | 536 | { |
537 | try | 537 | try |
538 | { | 538 | { |
539 | userProfile.HomeLookAtX = (float)Convert.ToDecimal((string)requestData["home_look_x"]); | 539 | userProfile.HomeLookAtX = (float)Convert.ToDecimal((string)requestData["home_look_x"], Culture.NumberFormatInfo); |
540 | } | 540 | } |
541 | catch (InvalidCastException) | 541 | catch (InvalidCastException) |
542 | { | 542 | { |
@@ -547,7 +547,7 @@ namespace OpenSim.Grid.UserServer.Modules | |||
547 | { | 547 | { |
548 | try | 548 | try |
549 | { | 549 | { |
550 | userProfile.HomeLookAtY = (float)Convert.ToDecimal((string)requestData["home_look_y"]); | 550 | userProfile.HomeLookAtY = (float)Convert.ToDecimal((string)requestData["home_look_y"], Culture.NumberFormatInfo); |
551 | } | 551 | } |
552 | catch (InvalidCastException) | 552 | catch (InvalidCastException) |
553 | { | 553 | { |
@@ -558,7 +558,7 @@ namespace OpenSim.Grid.UserServer.Modules | |||
558 | { | 558 | { |
559 | try | 559 | try |
560 | { | 560 | { |
561 | userProfile.HomeLookAtZ = (float)Convert.ToDecimal((string)requestData["home_look_z"]); | 561 | userProfile.HomeLookAtZ = (float)Convert.ToDecimal((string)requestData["home_look_z"], Culture.NumberFormatInfo); |
562 | } | 562 | } |
563 | catch (InvalidCastException) | 563 | catch (InvalidCastException) |
564 | { | 564 | { |
@@ -634,13 +634,13 @@ namespace OpenSim.Grid.UserServer.Modules | |||
634 | UUID RegionID = new UUID((string)requestData["region_uuid"]); | 634 | UUID RegionID = new UUID((string)requestData["region_uuid"]); |
635 | ulong regionhandle = (ulong)Convert.ToInt64((string)requestData["region_handle"]); | 635 | ulong regionhandle = (ulong)Convert.ToInt64((string)requestData["region_handle"]); |
636 | Vector3 position = new Vector3( | 636 | Vector3 position = new Vector3( |
637 | (float)Convert.ToDecimal((string)requestData["region_pos_x"]), | 637 | (float)Convert.ToDecimal((string)requestData["region_pos_x"], Culture.NumberFormatInfo), |
638 | (float)Convert.ToDecimal((string)requestData["region_pos_y"]), | 638 | (float)Convert.ToDecimal((string)requestData["region_pos_y"], Culture.NumberFormatInfo), |
639 | (float)Convert.ToDecimal((string)requestData["region_pos_z"])); | 639 | (float)Convert.ToDecimal((string)requestData["region_pos_z"], Culture.NumberFormatInfo)); |
640 | Vector3 lookat = new Vector3( | 640 | Vector3 lookat = new Vector3( |
641 | (float)Convert.ToDecimal((string)requestData["lookat_x"]), | 641 | (float)Convert.ToDecimal((string)requestData["lookat_x"], Culture.NumberFormatInfo), |
642 | (float)Convert.ToDecimal((string)requestData["lookat_y"]), | 642 | (float)Convert.ToDecimal((string)requestData["lookat_y"], Culture.NumberFormatInfo), |
643 | (float)Convert.ToDecimal((string)requestData["lookat_z"])); | 643 | (float)Convert.ToDecimal((string)requestData["lookat_z"], Culture.NumberFormatInfo)); |
644 | 644 | ||
645 | handlerLogOffUser = OnLogOffUser; | 645 | handlerLogOffUser = OnLogOffUser; |
646 | if (handlerLogOffUser != null) | 646 | if (handlerLogOffUser != null) |
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index eccd276..a86a831 100755 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -1183,14 +1183,14 @@ namespace OpenSim | |||
1183 | } | 1183 | } |
1184 | if (cmdparams.Length > 4) | 1184 | if (cmdparams.Length > 4) |
1185 | { | 1185 | { |
1186 | loadOffset.X = (float) Convert.ToDecimal(cmdparams[4]); | 1186 | loadOffset.X = (float)Convert.ToDecimal(cmdparams[4], Culture.NumberFormatInfo); |
1187 | if (cmdparams.Length > 5) | 1187 | if (cmdparams.Length > 5) |
1188 | { | 1188 | { |
1189 | loadOffset.Y = (float) Convert.ToDecimal(cmdparams[5]); | 1189 | loadOffset.Y = (float)Convert.ToDecimal(cmdparams[5], Culture.NumberFormatInfo); |
1190 | } | 1190 | } |
1191 | if (cmdparams.Length > 6) | 1191 | if (cmdparams.Length > 6) |
1192 | { | 1192 | { |
1193 | loadOffset.Z = (float) Convert.ToDecimal(cmdparams[6]); | 1193 | loadOffset.Z = (float)Convert.ToDecimal(cmdparams[6], Culture.NumberFormatInfo); |
1194 | } | 1194 | } |
1195 | MainConsole.Instance.Output(String.Format("loadOffsets <X,Y,Z> = <{0},{1},{2}>",loadOffset.X,loadOffset.Y,loadOffset.Z)); | 1195 | MainConsole.Instance.Output(String.Format("loadOffsets <X,Y,Z> = <{0},{1},{2}>",loadOffset.X,loadOffset.Y,loadOffset.Z)); |
1196 | } | 1196 | } |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 3d9eaa1..f98e741 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -3286,9 +3286,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3286 | awb.ItemID = wearables[i].ItemID; | 3286 | awb.ItemID = wearables[i].ItemID; |
3287 | aw.WearableData[i] = awb; | 3287 | aw.WearableData[i] = awb; |
3288 | 3288 | ||
3289 | // m_log.DebugFormat( | 3289 | // m_log.DebugFormat( |
3290 | // "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}", | 3290 | // "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}", |
3291 | // awb.ItemID, awb.AssetID, i, Name); | 3291 | // awb.ItemID, awb.AssetID, i, Name); |
3292 | } | 3292 | } |
3293 | 3293 | ||
3294 | OutPacket(aw, ThrottleOutPacketType.Task); | 3294 | OutPacket(aw, ThrottleOutPacketType.Task); |
@@ -8294,8 +8294,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8294 | { | 8294 | { |
8295 | OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter), convertParamStringToBool(messagePacket.ParamList[1].Parameter), | 8295 | OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter), convertParamStringToBool(messagePacket.ParamList[1].Parameter), |
8296 | convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter), | 8296 | convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter), |
8297 | Convert.ToInt16(Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[4].Parameter))), | 8297 | Convert.ToInt16(Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[4].Parameter), Culture.NumberFormatInfo)), |
8298 | (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter)), | 8298 | (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter), Culture.NumberFormatInfo), |
8299 | Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[6].Parameter)), | 8299 | Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[6].Parameter)), |
8300 | convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter)); | 8300 | convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter)); |
8301 | } | 8301 | } |
@@ -8343,8 +8343,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8343 | if (splitField.Length == 3) | 8343 | if (splitField.Length == 3) |
8344 | { | 8344 | { |
8345 | Int16 corner = Convert.ToInt16(splitField[0]); | 8345 | Int16 corner = Convert.ToInt16(splitField[0]); |
8346 | float lowValue = (float)Convert.ToDecimal(splitField[1]); | 8346 | float lowValue = (float)Convert.ToDecimal(splitField[1], Culture.NumberFormatInfo); |
8347 | float highValue = (float)Convert.ToDecimal(splitField[2]); | 8347 | float highValue = (float)Convert.ToDecimal(splitField[2], Culture.NumberFormatInfo); |
8348 | 8348 | ||
8349 | OnSetEstateTerrainTextureHeights(this, corner, lowValue, highValue); | 8349 | OnSetEstateTerrainTextureHeights(this, corner, lowValue, highValue); |
8350 | } | 8350 | } |
@@ -8367,19 +8367,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8367 | { | 8367 | { |
8368 | string tmp = Utils.BytesToString(messagePacket.ParamList[0].Parameter); | 8368 | string tmp = Utils.BytesToString(messagePacket.ParamList[0].Parameter); |
8369 | if (!tmp.Contains(".")) tmp += ".00"; | 8369 | if (!tmp.Contains(".")) tmp += ".00"; |
8370 | float WaterHeight = (float)Convert.ToDecimal(tmp); | 8370 | float WaterHeight = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo); |
8371 | tmp = Utils.BytesToString(messagePacket.ParamList[1].Parameter); | 8371 | tmp = Utils.BytesToString(messagePacket.ParamList[1].Parameter); |
8372 | if (!tmp.Contains(".")) tmp += ".00"; | 8372 | if (!tmp.Contains(".")) tmp += ".00"; |
8373 | float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp); | 8373 | float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo); |
8374 | tmp = Utils.BytesToString(messagePacket.ParamList[2].Parameter); | 8374 | tmp = Utils.BytesToString(messagePacket.ParamList[2].Parameter); |
8375 | if (!tmp.Contains(".")) tmp += ".00"; | 8375 | if (!tmp.Contains(".")) tmp += ".00"; |
8376 | float TerrainLowerLimit = (float)Convert.ToDecimal(tmp); | 8376 | float TerrainLowerLimit = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo); |
8377 | bool UseEstateSun = convertParamStringToBool(messagePacket.ParamList[3].Parameter); | 8377 | bool UseEstateSun = convertParamStringToBool(messagePacket.ParamList[3].Parameter); |
8378 | bool UseFixedSun = convertParamStringToBool(messagePacket.ParamList[4].Parameter); | 8378 | bool UseFixedSun = convertParamStringToBool(messagePacket.ParamList[4].Parameter); |
8379 | float SunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter)); | 8379 | float SunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter), Culture.NumberFormatInfo); |
8380 | bool UseGlobal = convertParamStringToBool(messagePacket.ParamList[6].Parameter); | 8380 | bool UseGlobal = convertParamStringToBool(messagePacket.ParamList[6].Parameter); |
8381 | bool EstateFixedSun = convertParamStringToBool(messagePacket.ParamList[7].Parameter); | 8381 | bool EstateFixedSun = convertParamStringToBool(messagePacket.ParamList[7].Parameter); |
8382 | float EstateSunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[8].Parameter)); | 8382 | float EstateSunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[8].Parameter), Culture.NumberFormatInfo); |
8383 | 8383 | ||
8384 | OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseEstateSun, UseFixedSun, SunHour, UseGlobal, EstateFixedSun, EstateSunHour); | 8384 | OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseEstateSun, UseFixedSun, SunHour, UseGlobal, EstateFixedSun, EstateSunHour); |
8385 | 8385 | ||
@@ -13911,8 +13911,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
13911 | { | 13911 | { |
13912 | OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter), convertParamStringToBool(messagePacket.ParamList[1].Parameter), | 13912 | OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter), convertParamStringToBool(messagePacket.ParamList[1].Parameter), |
13913 | convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter), | 13913 | convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter), |
13914 | Convert.ToInt16(Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[4].Parameter))), | 13914 | Convert.ToInt16(Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[4].Parameter), Culture.NumberFormatInfo)), |
13915 | (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter)), | 13915 | (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter), Culture.NumberFormatInfo), |
13916 | Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[6].Parameter)), | 13916 | Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[6].Parameter)), |
13917 | convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter)); | 13917 | convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter)); |
13918 | } | 13918 | } |
@@ -13960,8 +13960,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
13960 | if (splitField.Length == 3) | 13960 | if (splitField.Length == 3) |
13961 | { | 13961 | { |
13962 | Int16 corner = Convert.ToInt16(splitField[0]); | 13962 | Int16 corner = Convert.ToInt16(splitField[0]); |
13963 | float lowValue = (float)Convert.ToDecimal(splitField[1]); | 13963 | float lowValue = (float)Convert.ToDecimal(splitField[1], Culture.NumberFormatInfo); |
13964 | float highValue = (float)Convert.ToDecimal(splitField[2]); | 13964 | float highValue = (float)Convert.ToDecimal(splitField[2], Culture.NumberFormatInfo); |
13965 | 13965 | ||
13966 | OnSetEstateTerrainTextureHeights(this, corner, lowValue, highValue); | 13966 | OnSetEstateTerrainTextureHeights(this, corner, lowValue, highValue); |
13967 | } | 13967 | } |
@@ -13984,19 +13984,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
13984 | { | 13984 | { |
13985 | string tmp = Utils.BytesToString(messagePacket.ParamList[0].Parameter); | 13985 | string tmp = Utils.BytesToString(messagePacket.ParamList[0].Parameter); |
13986 | if (!tmp.Contains(".")) tmp += ".00"; | 13986 | if (!tmp.Contains(".")) tmp += ".00"; |
13987 | float WaterHeight = (float)Convert.ToDecimal(tmp); | 13987 | float WaterHeight = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo); |
13988 | tmp = Utils.BytesToString(messagePacket.ParamList[1].Parameter); | 13988 | tmp = Utils.BytesToString(messagePacket.ParamList[1].Parameter); |
13989 | if (!tmp.Contains(".")) tmp += ".00"; | 13989 | if (!tmp.Contains(".")) tmp += ".00"; |
13990 | float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp); | 13990 | float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo); |
13991 | tmp = Utils.BytesToString(messagePacket.ParamList[2].Parameter); | 13991 | tmp = Utils.BytesToString(messagePacket.ParamList[2].Parameter); |
13992 | if (!tmp.Contains(".")) tmp += ".00"; | 13992 | if (!tmp.Contains(".")) tmp += ".00"; |
13993 | float TerrainLowerLimit = (float)Convert.ToDecimal(tmp); | 13993 | float TerrainLowerLimit = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo); |
13994 | bool UseEstateSun = convertParamStringToBool(messagePacket.ParamList[3].Parameter); | 13994 | bool UseEstateSun = convertParamStringToBool(messagePacket.ParamList[3].Parameter); |
13995 | bool UseFixedSun = convertParamStringToBool(messagePacket.ParamList[4].Parameter); | 13995 | bool UseFixedSun = convertParamStringToBool(messagePacket.ParamList[4].Parameter); |
13996 | float SunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter)); | 13996 | float SunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter), Culture.NumberFormatInfo); |
13997 | bool UseGlobal = convertParamStringToBool(messagePacket.ParamList[6].Parameter); | 13997 | bool UseGlobal = convertParamStringToBool(messagePacket.ParamList[6].Parameter); |
13998 | bool EstateFixedSun = convertParamStringToBool(messagePacket.ParamList[7].Parameter); | 13998 | bool EstateFixedSun = convertParamStringToBool(messagePacket.ParamList[7].Parameter); |
13999 | float EstateSunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[8].Parameter)); | 13999 | float EstateSunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[8].Parameter), Culture.NumberFormatInfo); |
14000 | 14000 | ||
14001 | OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseEstateSun, UseFixedSun, SunHour, UseGlobal, EstateFixedSun, EstateSunHour); | 14001 | OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseEstateSun, UseFixedSun, SunHour, UseGlobal, EstateFixedSun, EstateSunHour); |
14002 | 14002 | ||
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserDataPlugin.cs b/OpenSim/Region/Communications/OGS1/OGS1UserDataPlugin.cs index 776d5d1..cb1766a 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserDataPlugin.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserDataPlugin.cs | |||
@@ -673,13 +673,13 @@ namespace OpenSim.Region.Communications.OGS1 | |||
673 | else | 673 | else |
674 | userData.HomeRegionID = UUID.Zero; | 674 | userData.HomeRegionID = UUID.Zero; |
675 | userData.HomeLocation = | 675 | userData.HomeLocation = |
676 | new Vector3((float)Convert.ToDecimal((string)data["home_coordinates_x"]), | 676 | new Vector3((float)Convert.ToDecimal((string)data["home_coordinates_x"], Culture.NumberFormatInfo), |
677 | (float)Convert.ToDecimal((string)data["home_coordinates_y"]), | 677 | (float)Convert.ToDecimal((string)data["home_coordinates_y"], Culture.NumberFormatInfo), |
678 | (float)Convert.ToDecimal((string)data["home_coordinates_z"])); | 678 | (float)Convert.ToDecimal((string)data["home_coordinates_z"], Culture.NumberFormatInfo)); |
679 | userData.HomeLookAt = | 679 | userData.HomeLookAt = |
680 | new Vector3((float)Convert.ToDecimal((string)data["home_look_x"]), | 680 | new Vector3((float)Convert.ToDecimal((string)data["home_look_x"], Culture.NumberFormatInfo), |
681 | (float)Convert.ToDecimal((string)data["home_look_y"]), | 681 | (float)Convert.ToDecimal((string)data["home_look_y"], Culture.NumberFormatInfo), |
682 | (float)Convert.ToDecimal((string)data["home_look_z"])); | 682 | (float)Convert.ToDecimal((string)data["home_look_z"], Culture.NumberFormatInfo)); |
683 | if (data.Contains("user_flags")) | 683 | if (data.Contains("user_flags")) |
684 | userData.UserFlags = Convert.ToInt32((string)data["user_flags"]); | 684 | userData.UserFlags = Convert.ToInt32((string)data["user_flags"]); |
685 | if (data.Contains("god_level")) | 685 | if (data.Contains("god_level")) |
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetTransactionsManager.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetTransactionsManager.cs deleted file mode 100644 index 9c646b6..0000000 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetTransactionsManager.cs +++ /dev/null | |||
@@ -1,226 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | //using System.Reflection; | ||
29 | //using log4net; | ||
30 | |||
31 | namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | ||
32 | { | ||
33 | /* | ||
34 | public class AgentAssetTransactionsManager | ||
35 | { | ||
36 | //private static readonly ILog m_log | ||
37 | // = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
38 | |||
39 | /// <summary> | ||
40 | /// Each agent has its own singleton collection of transactions | ||
41 | /// </summary> | ||
42 | private Dictionary<UUID, AgentAssetTransactions> AgentTransactions = | ||
43 | new Dictionary<UUID, AgentAssetTransactions>(); | ||
44 | |||
45 | /// <summary> | ||
46 | /// Should we dump uploaded assets to the filesystem? | ||
47 | /// </summary> | ||
48 | private bool m_dumpAssetsToFile; | ||
49 | |||
50 | public Scene MyScene; | ||
51 | |||
52 | public AgentAssetTransactionsManager(Scene scene, bool dumpAssetsToFile) | ||
53 | { | ||
54 | MyScene = scene; | ||
55 | m_dumpAssetsToFile = dumpAssetsToFile; | ||
56 | } | ||
57 | |||
58 | /// <summary> | ||
59 | /// Get the collection of asset transactions for the given user. If one does not already exist, it | ||
60 | /// is created. | ||
61 | /// </summary> | ||
62 | /// <param name="userID"></param> | ||
63 | /// <returns></returns> | ||
64 | private AgentAssetTransactions GetUserTransactions(UUID userID) | ||
65 | { | ||
66 | lock (AgentTransactions) | ||
67 | { | ||
68 | if (!AgentTransactions.ContainsKey(userID)) | ||
69 | { | ||
70 | AgentAssetTransactions transactions = null; | ||
71 | //= new AgentAssetTransactions(userID, this, m_dumpAssetsToFile); | ||
72 | AgentTransactions.Add(userID, transactions); | ||
73 | } | ||
74 | |||
75 | return AgentTransactions[userID]; | ||
76 | } | ||
77 | } | ||
78 | |||
79 | /// <summary> | ||
80 | /// Remove the given agent asset transactions. This should be called when a client is departing | ||
81 | /// from a scene (and hence won't be making any more transactions here). | ||
82 | /// </summary> | ||
83 | /// <param name="userID"></param> | ||
84 | public void RemoveAgentAssetTransactions(UUID userID) | ||
85 | { | ||
86 | // m_log.DebugFormat("Removing agent asset transactions structure for agent {0}", userID); | ||
87 | |||
88 | lock (AgentTransactions) | ||
89 | { | ||
90 | AgentTransactions.Remove(userID); | ||
91 | } | ||
92 | } | ||
93 | |||
94 | /// <summary> | ||
95 | /// Create an inventory item from data that has been received through a transaction. | ||
96 | /// | ||
97 | /// This is called when new clothing or body parts are created. It may also be called in other | ||
98 | /// situations. | ||
99 | /// </summary> | ||
100 | /// <param name="remoteClient"></param> | ||
101 | /// <param name="transactionID"></param> | ||
102 | /// <param name="folderID"></param> | ||
103 | /// <param name="callbackID"></param> | ||
104 | /// <param name="description"></param> | ||
105 | /// <param name="name"></param> | ||
106 | /// <param name="invType"></param> | ||
107 | /// <param name="type"></param> | ||
108 | /// <param name="wearableType"></param> | ||
109 | /// <param name="nextOwnerMask"></param> | ||
110 | public void HandleItemCreationFromTransaction(IClientAPI remoteClient, UUID transactionID, UUID folderID, | ||
111 | uint callbackID, string description, string name, sbyte invType, | ||
112 | sbyte type, byte wearableType, uint nextOwnerMask) | ||
113 | { | ||
114 | // m_log.DebugFormat( | ||
115 | // "[TRANSACTIONS MANAGER] Called HandleItemCreationFromTransaction with item {0}", name); | ||
116 | |||
117 | AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); | ||
118 | |||
119 | transactions.RequestCreateInventoryItem( | ||
120 | remoteClient, transactionID, folderID, callbackID, description, | ||
121 | name, invType, type, wearableType, nextOwnerMask); | ||
122 | } | ||
123 | |||
124 | /// <summary> | ||
125 | /// Update an inventory item with data that has been received through a transaction. | ||
126 | /// | ||
127 | /// This is called when clothing or body parts are updated (for instance, with new textures or | ||
128 | /// colours). It may also be called in other situations. | ||
129 | /// </summary> | ||
130 | /// <param name="remoteClient"></param> | ||
131 | /// <param name="transactionID"></param> | ||
132 | /// <param name="item"></param> | ||
133 | public void HandleItemUpdateFromTransaction(IClientAPI remoteClient, UUID transactionID, | ||
134 | InventoryItemBase item) | ||
135 | { | ||
136 | // m_log.DebugFormat( | ||
137 | // "[TRANSACTIONS MANAGER] Called HandleItemUpdateFromTransaction with item {0}", | ||
138 | // item.Name); | ||
139 | |||
140 | AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); | ||
141 | |||
142 | transactions.RequestUpdateInventoryItem(remoteClient, transactionID, item); | ||
143 | } | ||
144 | |||
145 | /// <summary> | ||
146 | /// Update a task inventory item with data that has been received through a transaction. | ||
147 | /// | ||
148 | /// This is currently called when, for instance, a notecard in a prim is saved. The data is sent | ||
149 | /// up through a single AssetUploadRequest. A subsequent UpdateTaskInventory then references the transaction | ||
150 | /// and comes through this method. | ||
151 | /// </summary> | ||
152 | /// <param name="remoteClient"></param> | ||
153 | /// <param name="transactionID"></param> | ||
154 | /// <param name="item"></param> | ||
155 | public void HandleTaskItemUpdateFromTransaction( | ||
156 | IClientAPI remoteClient, SceneObjectPart part, UUID transactionID, TaskInventoryItem item) | ||
157 | { | ||
158 | // m_log.DebugFormat( | ||
159 | // "[TRANSACTIONS MANAGER] Called HandleTaskItemUpdateFromTransaction with item {0}", | ||
160 | // item.Name); | ||
161 | |||
162 | AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); | ||
163 | |||
164 | transactions.RequestUpdateTaskInventoryItem(remoteClient, part, transactionID, item); | ||
165 | } | ||
166 | |||
167 | /// <summary> | ||
168 | /// Request that a client (agent) begin an asset transfer. | ||
169 | /// </summary> | ||
170 | /// <param name="remoteClient"></param> | ||
171 | /// <param name="assetID"></param> | ||
172 | /// <param name="transaction"></param> | ||
173 | /// <param name="type"></param> | ||
174 | /// <param name="data"></param></param> | ||
175 | /// <param name="tempFile"></param> | ||
176 | public void HandleUDPUploadRequest(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type, | ||
177 | byte[] data, bool storeLocal, bool tempFile) | ||
178 | { | ||
179 | //m_log.Debug("HandleUDPUploadRequest - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile); | ||
180 | if (((AssetType)type == AssetType.Texture || | ||
181 | (AssetType)type == AssetType.Sound || | ||
182 | (AssetType)type == AssetType.TextureTGA || | ||
183 | (AssetType)type == AssetType.Animation) && | ||
184 | tempFile == false) | ||
185 | { | ||
186 | Scene scene = (Scene)remoteClient.Scene; | ||
187 | IMoneyModule mm = scene.RequestModuleInterface<IMoneyModule>(); | ||
188 | |||
189 | if (mm != null) | ||
190 | { | ||
191 | if (!mm.UploadCovered(remoteClient)) | ||
192 | { | ||
193 | remoteClient.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false); | ||
194 | return; | ||
195 | } | ||
196 | } | ||
197 | } | ||
198 | |||
199 | //m_log.Debug("asset upload of " + assetID); | ||
200 | AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); | ||
201 | |||
202 | AssetXferUploader uploader = transactions.RequestXferUploader(transaction); | ||
203 | if (uploader != null) | ||
204 | { | ||
205 | uploader.Initialise(remoteClient, assetID, transaction, type, data, storeLocal, tempFile); | ||
206 | } | ||
207 | } | ||
208 | |||
209 | /// <summary> | ||
210 | /// Handle asset transfer data packets received in response to the asset upload request in | ||
211 | /// HandleUDPUploadRequest() | ||
212 | /// </summary> | ||
213 | /// <param name="remoteClient"></param> | ||
214 | /// <param name="xferID"></param> | ||
215 | /// <param name="packetID"></param> | ||
216 | /// <param name="data"></param> | ||
217 | public void HandleXfer(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data) | ||
218 | { | ||
219 | //m_log.Debug("xferID: " + xferID + " packetID: " + packetID + " data!"); | ||
220 | AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); | ||
221 | |||
222 | transactions.HandleXfer(xferID, packetID, data); | ||
223 | } | ||
224 | } | ||
225 | */ | ||
226 | } | ||
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs index 1077f4a..7e08ecf 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs | |||
@@ -27,6 +27,8 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Reflection; | ||
31 | using log4net; | ||
30 | using Nini.Config; | 32 | using Nini.Config; |
31 | using OpenMetaverse; | 33 | using OpenMetaverse; |
32 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
@@ -37,6 +39,8 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
37 | { | 39 | { |
38 | public class AssetTransactionModule : IRegionModule, IAgentAssetTransactions | 40 | public class AssetTransactionModule : IRegionModule, IAgentAssetTransactions |
39 | { | 41 | { |
42 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
43 | |||
40 | private readonly Dictionary<UUID, Scene> RegisteredScenes = new Dictionary<UUID, Scene>(); | 44 | private readonly Dictionary<UUID, Scene> RegisteredScenes = new Dictionary<UUID, Scene>(); |
41 | private bool m_dumpAssetsToFile = false; | 45 | private bool m_dumpAssetsToFile = false; |
42 | private Scene m_scene = null; | 46 | private Scene m_scene = null; |
@@ -226,7 +230,8 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
226 | public void HandleUDPUploadRequest(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type, | 230 | public void HandleUDPUploadRequest(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type, |
227 | byte[] data, bool storeLocal, bool tempFile) | 231 | byte[] data, bool storeLocal, bool tempFile) |
228 | { | 232 | { |
229 | //m_log.Debug("HandleUDPUploadRequest - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile); | 233 | // m_log.Debug("HandleUDPUploadRequest - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile); |
234 | |||
230 | if (((AssetType)type == AssetType.Texture || | 235 | if (((AssetType)type == AssetType.Texture || |
231 | (AssetType)type == AssetType.Sound || | 236 | (AssetType)type == AssetType.Sound || |
232 | (AssetType)type == AssetType.TextureTGA || | 237 | (AssetType)type == AssetType.TextureTGA || |
@@ -246,7 +251,6 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
246 | } | 251 | } |
247 | } | 252 | } |
248 | 253 | ||
249 | //m_log.Debug("asset upload of " + assetID); | ||
250 | AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); | 254 | AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); |
251 | 255 | ||
252 | AssetXferUploader uploader = transactions.RequestXferUploader(transaction); | 256 | AssetXferUploader uploader = transactions.RequestXferUploader(transaction); |
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs index f698ea1..fa92fe8 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs | |||
@@ -154,7 +154,8 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
154 | m_userTransactions.Manager.MyScene.AssetService.Store(m_asset); | 154 | m_userTransactions.Manager.MyScene.AssetService.Store(m_asset); |
155 | } | 155 | } |
156 | 156 | ||
157 | m_log.DebugFormat("[ASSET TRANSACTIONS]: Uploaded asset data for transaction {0}", TransactionID); | 157 | m_log.DebugFormat( |
158 | "[ASSET TRANSACTIONS]: Uploaded asset {0} for transaction {1}", m_asset.FullID, TransactionID); | ||
158 | 159 | ||
159 | if (m_dumpAssetToFile) | 160 | if (m_dumpAssetToFile) |
160 | { | 161 | { |
diff --git a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs index 1add0ab..1903eb9 100644 --- a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs | |||
@@ -91,6 +91,8 @@ namespace OpenSim.Region.CoreModules.Asset | |||
91 | /// </example> | 91 | /// </example> |
92 | public class CenomeMemoryAssetCache : IImprovedAssetCache, ISharedRegionModule | 92 | public class CenomeMemoryAssetCache : IImprovedAssetCache, ISharedRegionModule |
93 | { | 93 | { |
94 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
95 | |||
94 | /// <summary> | 96 | /// <summary> |
95 | /// Cache's default maximal asset count. | 97 | /// Cache's default maximal asset count. |
96 | /// </summary> | 98 | /// </summary> |
@@ -115,12 +117,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
115 | /// Asset's default expiration time in the cache. | 117 | /// Asset's default expiration time in the cache. |
116 | /// </summary> | 118 | /// </summary> |
117 | public static readonly TimeSpan DefaultExpirationTime = TimeSpan.FromMinutes(30.0); | 119 | public static readonly TimeSpan DefaultExpirationTime = TimeSpan.FromMinutes(30.0); |
118 | 120 | ||
119 | /// <summary> | ||
120 | /// Log manager instance. | ||
121 | /// </summary> | ||
122 | private static readonly ILog Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
123 | |||
124 | /// <summary> | 121 | /// <summary> |
125 | /// Cache object. | 122 | /// Cache object. |
126 | /// </summary> | 123 | /// </summary> |
@@ -170,7 +167,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
170 | { | 167 | { |
171 | if (maximalSize <= 0 || maximalCount <= 0) | 168 | if (maximalSize <= 0 || maximalCount <= 0) |
172 | { | 169 | { |
173 | //Log.Debug("[ASSET CACHE]: Cenome asset cache is not enabled."); | 170 | //m_log.Debug("[ASSET CACHE]: Cenome asset cache is not enabled."); |
174 | m_enabled = false; | 171 | m_enabled = false; |
175 | return; | 172 | return; |
176 | } | 173 | } |
@@ -186,7 +183,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
186 | CnmSynchronizedCache<string, AssetBase>.Synchronized(new CnmMemoryCache<string, AssetBase>( | 183 | CnmSynchronizedCache<string, AssetBase>.Synchronized(new CnmMemoryCache<string, AssetBase>( |
187 | maximalSize, maximalCount, expirationTime)); | 184 | maximalSize, maximalCount, expirationTime)); |
188 | m_enabled = true; | 185 | m_enabled = true; |
189 | Log.DebugFormat( | 186 | m_log.DebugFormat( |
190 | "[ASSET CACHE]: Cenome asset cache enabled (MaxSize = {0} bytes, MaxCount = {1}, ExpirationTime = {2})", | 187 | "[ASSET CACHE]: Cenome asset cache enabled (MaxSize = {0} bytes, MaxCount = {1}, ExpirationTime = {2})", |
191 | maximalSize, | 188 | maximalSize, |
192 | maximalCount, | 189 | maximalCount, |
@@ -205,6 +202,8 @@ namespace OpenSim.Region.CoreModules.Asset | |||
205 | { | 202 | { |
206 | if (asset != null) | 203 | if (asset != null) |
207 | { | 204 | { |
205 | // m_log.DebugFormat("[CENOME ASSET CACHE]: Caching asset {0}", asset.ID); | ||
206 | |||
208 | long size = asset.Data != null ? asset.Data.Length : 1; | 207 | long size = asset.Data != null ? asset.Data.Length : 1; |
209 | m_cache.Set(asset.ID, asset, size); | 208 | m_cache.Set(asset.ID, asset, size); |
210 | m_cachedCount++; | 209 | m_cachedCount++; |
@@ -255,7 +254,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
255 | 254 | ||
256 | if (m_getCount == m_debugEpoch) | 255 | if (m_getCount == m_debugEpoch) |
257 | { | 256 | { |
258 | Log.DebugFormat( | 257 | m_log.DebugFormat( |
259 | "[ASSET CACHE]: Cached = {0}, Get = {1}, Hits = {2}%, Size = {3} bytes, Avg. A. Size = {4} bytes", | 258 | "[ASSET CACHE]: Cached = {0}, Get = {1}, Hits = {2}%, Size = {3} bytes, Avg. A. Size = {4} bytes", |
260 | m_cachedCount, | 259 | m_cachedCount, |
261 | m_getCount, | 260 | m_getCount, |
@@ -267,6 +266,9 @@ namespace OpenSim.Region.CoreModules.Asset | |||
267 | m_cachedCount = 0; | 266 | m_cachedCount = 0; |
268 | } | 267 | } |
269 | 268 | ||
269 | // if (null == assetBase) | ||
270 | // m_log.DebugFormat("[CENOME ASSET CACHE]: Asset {0} not in cache", id); | ||
271 | |||
270 | return assetBase; | 272 | return assetBase; |
271 | } | 273 | } |
272 | 274 | ||
@@ -325,12 +327,11 @@ namespace OpenSim.Region.CoreModules.Asset | |||
325 | return; | 327 | return; |
326 | 328 | ||
327 | string name = moduleConfig.GetString("AssetCaching"); | 329 | string name = moduleConfig.GetString("AssetCaching"); |
328 | //Log.DebugFormat("[XXX] name = {0} (this module's name: {1}", name, Name); | 330 | //m_log.DebugFormat("[XXX] name = {0} (this module's name: {1}", name, Name); |
329 | 331 | ||
330 | if (name != Name) | 332 | if (name != Name) |
331 | return; | 333 | return; |
332 | 334 | ||
333 | // This module is used | ||
334 | long maxSize = DefaultMaxSize; | 335 | long maxSize = DefaultMaxSize; |
335 | int maxCount = DefaultMaxCount; | 336 | int maxCount = DefaultMaxCount; |
336 | TimeSpan expirationTime = DefaultExpirationTime; | 337 | TimeSpan expirationTime = DefaultExpirationTime; |
diff --git a/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Command.cs b/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Command.cs index 9fe669a..4004135 100644 --- a/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Command.cs +++ b/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Command.cs | |||
@@ -147,7 +147,7 @@ namespace OpenSim.Region.CoreModules.Framework.InterfaceCommander | |||
147 | m_args[i].ArgumentValue = Int32.Parse(arg.ToString()); | 147 | m_args[i].ArgumentValue = Int32.Parse(arg.ToString()); |
148 | break; | 148 | break; |
149 | case "Double": | 149 | case "Double": |
150 | m_args[i].ArgumentValue = Double.Parse(arg.ToString()); | 150 | m_args[i].ArgumentValue = Double.Parse(arg.ToString(), OpenSim.Framework.Culture.NumberFormatInfo); |
151 | break; | 151 | break; |
152 | case "Boolean": | 152 | case "Boolean": |
153 | m_args[i].ArgumentValue = Boolean.Parse(arg.ToString()); | 153 | m_args[i].ArgumentValue = Boolean.Parse(arg.ToString()); |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs index fd3aaf4..2f21e6d 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs | |||
@@ -38,12 +38,9 @@ using OpenSim.Services.Interfaces; | |||
38 | 38 | ||
39 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | 39 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset |
40 | { | 40 | { |
41 | public class LocalAssetServicesConnector : | 41 | public class LocalAssetServicesConnector : ISharedRegionModule, IAssetService |
42 | ISharedRegionModule, IAssetService | ||
43 | { | 42 | { |
44 | private static readonly ILog m_log = | 43 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | LogManager.GetLogger( | ||
46 | MethodBase.GetCurrentMethod().DeclaringType); | ||
47 | 44 | ||
48 | private IImprovedAssetCache m_Cache = null; | 45 | private IImprovedAssetCache m_Cache = null; |
49 | 46 | ||
@@ -72,7 +69,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
72 | IConfig assetConfig = source.Configs["AssetService"]; | 69 | IConfig assetConfig = source.Configs["AssetService"]; |
73 | if (assetConfig == null) | 70 | if (assetConfig == null) |
74 | { | 71 | { |
75 | m_log.Error("[ASSET CONNECTOR]: AssetService missing from OpenSim.ini"); | 72 | m_log.Error("[LOCAL ASSET SERVICES CONNECTOR]: AssetService missing from OpenSim.ini"); |
76 | return; | 73 | return; |
77 | } | 74 | } |
78 | 75 | ||
@@ -81,22 +78,20 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
81 | 78 | ||
82 | if (serviceDll == String.Empty) | 79 | if (serviceDll == String.Empty) |
83 | { | 80 | { |
84 | m_log.Error("[ASSET CONNECTOR]: No LocalServiceModule named in section AssetService"); | 81 | m_log.Error("[LOCAL ASSET SERVICES CONNECTOR]: No LocalServiceModule named in section AssetService"); |
85 | return; | 82 | return; |
86 | } | 83 | } |
87 | 84 | ||
88 | Object[] args = new Object[] { source }; | 85 | Object[] args = new Object[] { source }; |
89 | m_AssetService = | 86 | m_AssetService = ServerUtils.LoadPlugin<IAssetService>(serviceDll, args); |
90 | ServerUtils.LoadPlugin<IAssetService>(serviceDll, | ||
91 | args); | ||
92 | 87 | ||
93 | if (m_AssetService == null) | 88 | if (m_AssetService == null) |
94 | { | 89 | { |
95 | m_log.Error("[ASSET CONNECTOR]: Can't load asset service"); | 90 | m_log.Error("[LOCAL ASSET SERVICES CONNECTOR]: Can't load asset service"); |
96 | return; | 91 | return; |
97 | } | 92 | } |
98 | m_Enabled = true; | 93 | m_Enabled = true; |
99 | m_log.Info("[ASSET CONNECTOR]: Local asset connector enabled"); | 94 | m_log.Info("[LOCAL ASSET SERVICES CONNECTOR]: Local asset connector enabled"); |
100 | } | 95 | } |
101 | } | 96 | } |
102 | } | 97 | } |
@@ -134,11 +129,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
134 | m_Cache = null; | 129 | m_Cache = null; |
135 | } | 130 | } |
136 | 131 | ||
137 | m_log.InfoFormat("[ASSET CONNECTOR]: Enabled local assets for region {0}", scene.RegionInfo.RegionName); | 132 | m_log.InfoFormat("[LOCAL ASSET SERVICES CONNECTOR]: Enabled local assets for region {0}", scene.RegionInfo.RegionName); |
138 | 133 | ||
139 | if (m_Cache != null) | 134 | if (m_Cache != null) |
140 | { | 135 | { |
141 | m_log.InfoFormat("[ASSET CONNECTOR]: Enabled asset caching for region {0}", scene.RegionInfo.RegionName); | 136 | m_log.InfoFormat("[LOCAL ASSET SERVICES CONNECTOR]: Enabled asset caching for region {0}", scene.RegionInfo.RegionName); |
142 | } | 137 | } |
143 | else | 138 | else |
144 | { | 139 | { |
@@ -151,6 +146,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
151 | 146 | ||
152 | public AssetBase Get(string id) | 147 | public AssetBase Get(string id) |
153 | { | 148 | { |
149 | // m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Synchronously requesting asset {0}", id); | ||
150 | |||
154 | AssetBase asset = null; | 151 | AssetBase asset = null; |
155 | if (m_Cache != null) | 152 | if (m_Cache != null) |
156 | asset = m_Cache.Get(id); | 153 | asset = m_Cache.Get(id); |
@@ -160,7 +157,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
160 | asset = m_AssetService.Get(id); | 157 | asset = m_AssetService.Get(id); |
161 | if ((m_Cache != null) && (asset != null)) | 158 | if ((m_Cache != null) && (asset != null)) |
162 | m_Cache.Cache(asset); | 159 | m_Cache.Cache(asset); |
160 | |||
161 | // if (null == asset) | ||
162 | // m_log.WarnFormat("[LOCAL ASSET SERVICES CONNECTOR]: Could not synchronously find asset with id {0}", id); | ||
163 | } | 163 | } |
164 | |||
164 | return asset; | 165 | return asset; |
165 | } | 166 | } |
166 | 167 | ||
@@ -204,15 +205,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
204 | 205 | ||
205 | public bool Get(string id, Object sender, AssetRetrieved handler) | 206 | public bool Get(string id, Object sender, AssetRetrieved handler) |
206 | { | 207 | { |
207 | AssetBase asset = null; | 208 | // m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Asynchronously requesting asset {0}", id); |
208 | 209 | ||
209 | if (m_Cache != null) | 210 | if (m_Cache != null) |
210 | m_Cache.Get(id); | ||
211 | |||
212 | if (asset != null) | ||
213 | { | 211 | { |
214 | Util.FireAndForget(delegate { handler(id, sender, asset); }); | 212 | AssetBase asset = m_Cache.Get(id); |
215 | return true; | 213 | |
214 | if (asset != null) | ||
215 | { | ||
216 | Util.FireAndForget(delegate { handler(id, sender, asset); }); | ||
217 | return true; | ||
218 | } | ||
216 | } | 219 | } |
217 | 220 | ||
218 | return m_AssetService.Get(id, sender, delegate (string assetID, Object s, AssetBase a) | 221 | return m_AssetService.Get(id, sender, delegate (string assetID, Object s, AssetBase a) |
@@ -220,6 +223,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
220 | if ((a != null) && (m_Cache != null)) | 223 | if ((a != null) && (m_Cache != null)) |
221 | m_Cache.Cache(a); | 224 | m_Cache.Cache(a); |
222 | 225 | ||
226 | // if (null == a) | ||
227 | // m_log.WarnFormat("[LOCAL ASSET SERVICES CONNECTOR]: Could not asynchronously find asset with id {0}", id); | ||
228 | |||
223 | Util.FireAndForget(delegate { handler(assetID, s, a); }); | 229 | Util.FireAndForget(delegate { handler(assetID, s, a); }); |
224 | }); | 230 | }); |
225 | } | 231 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs index 66d11dd..3883dc6 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs | |||
@@ -73,7 +73,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
73 | IConfig inventoryConfig = source.Configs["InventoryService"]; | 73 | IConfig inventoryConfig = source.Configs["InventoryService"]; |
74 | if (inventoryConfig == null) | 74 | if (inventoryConfig == null) |
75 | { | 75 | { |
76 | m_log.Error("[INVENTORY CONNECTOR]: InventoryService missing from OpenSim.ini"); | 76 | m_log.Error("[LOCAL INVENTORY SERVICES CONNECTOR]: InventoryService missing from OpenSim.ini"); |
77 | return; | 77 | return; |
78 | } | 78 | } |
79 | 79 | ||
@@ -81,18 +81,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
81 | 81 | ||
82 | if (serviceDll == String.Empty) | 82 | if (serviceDll == String.Empty) |
83 | { | 83 | { |
84 | m_log.Error("[INVENTORY CONNECTOR]: No LocalServiceModule named in section InventoryService"); | 84 | m_log.Error("[LOCAL INVENTORY SERVICES CONNECTOR]: No LocalServiceModule named in section InventoryService"); |
85 | return; | 85 | return; |
86 | } | 86 | } |
87 | 87 | ||
88 | Object[] args = new Object[] { source }; | 88 | Object[] args = new Object[] { source }; |
89 | m_log.DebugFormat("[INVENTORY CONNECTOR]: Service dll = {0}", serviceDll); | 89 | m_log.DebugFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Service dll = {0}", serviceDll); |
90 | 90 | ||
91 | m_InventoryService = ServerUtils.LoadPlugin<IInventoryService>(serviceDll, args); | 91 | m_InventoryService = ServerUtils.LoadPlugin<IInventoryService>(serviceDll, args); |
92 | 92 | ||
93 | if (m_InventoryService == null) | 93 | if (m_InventoryService == null) |
94 | { | 94 | { |
95 | m_log.Error("[INVENTORY CONNECTOR]: Can't load inventory service"); | 95 | m_log.Error("[LOCAL INVENTORY SERVICES CONNECTOR]: Can't load inventory service"); |
96 | //return; | 96 | //return; |
97 | throw new Exception("Unable to proceed. Please make sure your ini files in config-include are updated according to .example's"); | 97 | throw new Exception("Unable to proceed. Please make sure your ini files in config-include are updated according to .example's"); |
98 | } | 98 | } |
@@ -111,7 +111,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
111 | Init(source); | 111 | Init(source); |
112 | 112 | ||
113 | m_Enabled = true; | 113 | m_Enabled = true; |
114 | m_log.Info("[INVENTORY CONNECTOR]: Local inventory connector enabled"); | 114 | m_log.Info("[LOCAL INVENTORY SERVICES CONNECTOR]: Local inventory connector enabled"); |
115 | } | 115 | } |
116 | } | 116 | } |
117 | } | 117 | } |
@@ -138,7 +138,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
138 | } | 138 | } |
139 | 139 | ||
140 | // m_log.DebugFormat( | 140 | // m_log.DebugFormat( |
141 | // "[INVENTORY CONNECTOR]: Registering IInventoryService to scene {0}", scene.RegionInfo.RegionName); | 141 | // "[LOCAL INVENTORY SERVICES CONNECTOR]: Registering IInventoryService to scene {0}", scene.RegionInfo.RegionName); |
142 | 142 | ||
143 | scene.RegisterModuleInterface<IInventoryService>(this); | 143 | scene.RegisterModuleInterface<IInventoryService>(this); |
144 | m_cache.AddRegion(scene); | 144 | m_cache.AddRegion(scene); |
@@ -158,7 +158,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
158 | return; | 158 | return; |
159 | 159 | ||
160 | m_log.InfoFormat( | 160 | m_log.InfoFormat( |
161 | "[INVENTORY CONNECTOR]: Enabled local invnetory for region {0}", scene.RegionInfo.RegionName); | 161 | "[LOCAL INVENTORY SERVICES CONNECTOR]: Enabled local inventory for region {0}", scene.RegionInfo.RegionName); |
162 | } | 162 | } |
163 | 163 | ||
164 | #region IInventoryService | 164 | #region IInventoryService |
@@ -213,7 +213,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
213 | return folders; | 213 | return folders; |
214 | } | 214 | } |
215 | } | 215 | } |
216 | m_log.WarnFormat("[INVENTORY CONNECTOR]: System folders for {0} not found", userID); | 216 | m_log.WarnFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: System folders for {0} not found", userID); |
217 | return new Dictionary<AssetType, InventoryFolderBase>(); | 217 | return new Dictionary<AssetType, InventoryFolderBase>(); |
218 | } | 218 | } |
219 | 219 | ||
@@ -312,7 +312,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
312 | 312 | ||
313 | public override InventoryItemBase GetItem(InventoryItemBase item) | 313 | public override InventoryItemBase GetItem(InventoryItemBase item) |
314 | { | 314 | { |
315 | return m_InventoryService.GetItem(item); | 315 | // m_log.DebugFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Requesting inventory item {0}", item.ID); |
316 | |||
317 | item = m_InventoryService.GetItem(item); | ||
318 | |||
319 | if (null == item) | ||
320 | m_log.ErrorFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Could not find item with id {0}"); | ||
321 | |||
322 | return item; | ||
316 | } | 323 | } |
317 | 324 | ||
318 | public override InventoryFolderBase GetFolder(InventoryFolderBase folder) | 325 | public override InventoryFolderBase GetFolder(InventoryFolderBase folder) |
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 695cced..03da269 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -974,8 +974,8 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
974 | if (y == -1 || m_scene.RegionInfo.RegionLocY == y) | 974 | if (y == -1 || m_scene.RegionInfo.RegionLocY == y) |
975 | { | 975 | { |
976 | int corner = int.Parse(num); | 976 | int corner = int.Parse(num); |
977 | float lowValue = float.Parse(min); | 977 | float lowValue = float.Parse(min, Culture.NumberFormatInfo); |
978 | float highValue = float.Parse(max); | 978 | float highValue = float.Parse(max, Culture.NumberFormatInfo); |
979 | 979 | ||
980 | m_log.Debug("[ESTATEMODULE] Setting terrain heights " + m_scene.RegionInfo.RegionName + | 980 | m_log.Debug("[ESTATEMODULE] Setting terrain heights " + m_scene.RegionInfo.RegionName + |
981 | string.Format(" (C{0}, {1}-{2}", corner, lowValue, highValue)); | 981 | string.Format(" (C{0}, {1}-{2}", corner, lowValue, highValue)); |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 12f0489..4d357fd 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3147,7 +3147,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3147 | m_log.DebugFormat("[APPEARANCE]: Appearance not found in {0}, returning default", RegionInfo.RegionName); | 3147 | m_log.DebugFormat("[APPEARANCE]: Appearance not found in {0}, returning default", RegionInfo.RegionName); |
3148 | appearance = new AvatarAppearance(client.AgentId); | 3148 | appearance = new AvatarAppearance(client.AgentId); |
3149 | } | 3149 | } |
3150 | |||
3151 | } | 3150 | } |
3152 | 3151 | ||
3153 | /// <summary> | 3152 | /// <summary> |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 1b7ca8b..6a2ab02 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2701,6 +2701,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2701 | /// </summary> | 2701 | /// </summary> |
2702 | public void SendWearables() | 2702 | public void SendWearables() |
2703 | { | 2703 | { |
2704 | m_log.DebugFormat("[SCENE]: Received request for wearables of {0}", Name); | ||
2705 | |||
2704 | ControllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); | 2706 | ControllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); |
2705 | } | 2707 | } |
2706 | 2708 | ||
diff --git a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs index e3fbb6e..c8e6e4b 100644 --- a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs +++ b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs | |||
@@ -104,9 +104,9 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | |||
104 | this.m_name = field[1].Trim(); | 104 | this.m_name = field[1].Trim(); |
105 | this.m_frozen = (copsedef[0] == 'F'); | 105 | this.m_frozen = (copsedef[0] == 'F'); |
106 | this.m_tree_quantity = int.Parse(field[2]); | 106 | this.m_tree_quantity = int.Parse(field[2]); |
107 | this.m_treeline_high = float.Parse(field[3]); | 107 | this.m_treeline_high = float.Parse(field[3], Culture.NumberFormatInfo); |
108 | this.m_treeline_low = float.Parse(field[4]); | 108 | this.m_treeline_low = float.Parse(field[4], Culture.NumberFormatInfo); |
109 | this.m_range = double.Parse(field[5]); | 109 | this.m_range = double.Parse(field[5], Culture.NumberFormatInfo); |
110 | this.m_tree_type = (Tree) Enum.Parse(typeof(Tree),field[6]); | 110 | this.m_tree_type = (Tree) Enum.Parse(typeof(Tree),field[6]); |
111 | this.m_seed_point = Vector3.Parse(field[7]); | 111 | this.m_seed_point = Vector3.Parse(field[7]); |
112 | this.m_initial_scale = Vector3.Parse(field[8]); | 112 | this.m_initial_scale = Vector3.Parse(field[8]); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs index bf3d335..bcdc7bf 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs | |||
@@ -389,7 +389,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
389 | break; | 389 | break; |
390 | case "MinEventDelay": | 390 | case "MinEventDelay": |
391 | double minEventDelay = 0.0; | 391 | double minEventDelay = 0.0; |
392 | double.TryParse(part.InnerText, out minEventDelay); | 392 | double.TryParse(part.InnerText, NumberStyles.Float, Culture.NumberFormatInfo, out minEventDelay); |
393 | instance.MinEventDelay = minEventDelay; | 393 | instance.MinEventDelay = minEventDelay; |
394 | break; | 394 | break; |
395 | } | 395 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index faf9c40..e87b1f4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | |||
@@ -72,9 +72,9 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
72 | return; | 72 | return; |
73 | } | 73 | } |
74 | bool res; | 74 | bool res; |
75 | res = Double.TryParse(tmps[0], out x); | 75 | res = Double.TryParse(tmps[0], NumberStyles.Float, Culture.NumberFormatInfo, out x); |
76 | res = res & Double.TryParse(tmps[1], out y); | 76 | res = res & Double.TryParse(tmps[1], NumberStyles.Float, Culture.NumberFormatInfo, out y); |
77 | res = res & Double.TryParse(tmps[2], out z); | 77 | res = res & Double.TryParse(tmps[2], NumberStyles.Float, Culture.NumberFormatInfo, out z); |
78 | } | 78 | } |
79 | 79 | ||
80 | #endregion | 80 | #endregion |
@@ -309,10 +309,10 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
309 | return; | 309 | return; |
310 | } | 310 | } |
311 | bool res; | 311 | bool res; |
312 | res = Double.TryParse(tmps[0], NumberStyles.Float, Culture.FormatProvider, out x); | 312 | res = Double.TryParse(tmps[0], NumberStyles.Float, Culture.NumberFormatInfo, out x); |
313 | res = res & Double.TryParse(tmps[1], NumberStyles.Float, Culture.FormatProvider, out y); | 313 | res = res & Double.TryParse(tmps[1], NumberStyles.Float, Culture.NumberFormatInfo, out y); |
314 | res = res & Double.TryParse(tmps[2], NumberStyles.Float, Culture.FormatProvider, out z); | 314 | res = res & Double.TryParse(tmps[2], NumberStyles.Float, Culture.NumberFormatInfo, out z); |
315 | res = res & Double.TryParse(tmps[3], NumberStyles.Float, Culture.FormatProvider, out s); | 315 | res = res & Double.TryParse(tmps[3], NumberStyles.Float, Culture.NumberFormatInfo, out s); |
316 | if (x == 0 && y == 0 && z == 0 && s == 0) | 316 | if (x == 0 && y == 0 && z == 0 && s == 0) |
317 | s = 1; | 317 | s = 1; |
318 | } | 318 | } |
@@ -1015,7 +1015,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
1015 | double entry; | 1015 | double entry; |
1016 | for (int i = 0; i < Data.Length; i++) | 1016 | for (int i = 0; i < Data.Length; i++) |
1017 | { | 1017 | { |
1018 | if (double.TryParse(Data[i].ToString(), out entry)) | 1018 | if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry)) |
1019 | { | 1019 | { |
1020 | if (entry < minimum) minimum = entry; | 1020 | if (entry < minimum) minimum = entry; |
1021 | } | 1021 | } |
@@ -1029,7 +1029,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
1029 | double entry; | 1029 | double entry; |
1030 | for (int i = 0; i < Data.Length; i++) | 1030 | for (int i = 0; i < Data.Length; i++) |
1031 | { | 1031 | { |
1032 | if (double.TryParse(Data[i].ToString(), out entry)) | 1032 | if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry)) |
1033 | { | 1033 | { |
1034 | if (entry > maximum) maximum = entry; | 1034 | if (entry > maximum) maximum = entry; |
1035 | } | 1035 | } |
@@ -1048,7 +1048,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
1048 | double entry; | 1048 | double entry; |
1049 | for (int i = 0; i < Data.Length; i++) | 1049 | for (int i = 0; i < Data.Length; i++) |
1050 | { | 1050 | { |
1051 | if (double.TryParse(Data[i].ToString(), out entry)) | 1051 | if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry)) |
1052 | { | 1052 | { |
1053 | count++; | 1053 | count++; |
1054 | } | 1054 | } |
@@ -1062,7 +1062,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
1062 | double entry; | 1062 | double entry; |
1063 | for (int i = 0; i < src.Data.Length - 1; i++) | 1063 | for (int i = 0; i < src.Data.Length - 1; i++) |
1064 | { | 1064 | { |
1065 | if (double.TryParse(src.Data[i].ToString(), out entry)) | 1065 | if (double.TryParse(src.Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry)) |
1066 | { | 1066 | { |
1067 | ret.Add(entry); | 1067 | ret.Add(entry); |
1068 | } | 1068 | } |
@@ -1076,7 +1076,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
1076 | double entry; | 1076 | double entry; |
1077 | for (int i = 0; i < Data.Length; i++) | 1077 | for (int i = 0; i < Data.Length; i++) |
1078 | { | 1078 | { |
1079 | if (double.TryParse(Data[i].ToString(), out entry)) | 1079 | if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry)) |
1080 | { | 1080 | { |
1081 | sum = sum + entry; | 1081 | sum = sum + entry; |
1082 | } | 1082 | } |
@@ -1090,7 +1090,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
1090 | double entry; | 1090 | double entry; |
1091 | for (int i = 0; i < Data.Length; i++) | 1091 | for (int i = 0; i < Data.Length; i++) |
1092 | { | 1092 | { |
1093 | if (double.TryParse(Data[i].ToString(), out entry)) | 1093 | if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry)) |
1094 | { | 1094 | { |
1095 | sum = sum + Math.Pow(entry, 2); | 1095 | sum = sum + Math.Pow(entry, 2); |
1096 | } | 1096 | } |
@@ -1213,11 +1213,11 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
1213 | { | 1213 | { |
1214 | double a; | 1214 | double a; |
1215 | double b; | 1215 | double b; |
1216 | if (!double.TryParse(x.ToString(), out a)) | 1216 | if (!double.TryParse(x.ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out a)) |
1217 | { | 1217 | { |
1218 | a = 0.0; | 1218 | a = 0.0; |
1219 | } | 1219 | } |
1220 | if (!double.TryParse(y.ToString(), out b)) | 1220 | if (!double.TryParse(y.ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out b)) |
1221 | { | 1221 | { |
1222 | b = 0.0; | 1222 | b = 0.0; |
1223 | } | 1223 | } |
@@ -1857,7 +1857,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
1857 | else | 1857 | else |
1858 | if (v.EndsWith(".")) | 1858 | if (v.EndsWith(".")) |
1859 | v = v + "0"; | 1859 | v = v + "0"; |
1860 | this.value = double.Parse(v, System.Globalization.NumberStyles.Float, Culture.FormatProvider); | 1860 | this.value = double.Parse(v, System.Globalization.NumberStyles.Float, Culture.NumberFormatInfo); |
1861 | } | 1861 | } |
1862 | 1862 | ||
1863 | #endregion | 1863 | #endregion |
diff --git a/OpenSim/Server/Handlers/Grid/HypergridServerConnector.cs b/OpenSim/Server/Handlers/Grid/HypergridServerConnector.cs index 115ac29..7cc0dfa 100644 --- a/OpenSim/Server/Handlers/Grid/HypergridServerConnector.cs +++ b/OpenSim/Server/Handlers/Grid/HypergridServerConnector.cs | |||
@@ -132,9 +132,9 @@ namespace OpenSim.Server.Handlers.Grid | |||
132 | userData.SurName = (string)requestData["lastname"]; | 132 | userData.SurName = (string)requestData["lastname"]; |
133 | userData.ID = new UUID((string)requestData["agent_id"]); | 133 | userData.ID = new UUID((string)requestData["agent_id"]); |
134 | UUID sessionID = new UUID((string)requestData["session_id"]); | 134 | UUID sessionID = new UUID((string)requestData["session_id"]); |
135 | userData.HomeLocation = new Vector3((float)Convert.ToDecimal((string)requestData["startpos_x"]), | 135 | userData.HomeLocation = new Vector3((float)Convert.ToDecimal((string)requestData["startpos_x"], Culture.NumberFormatInfo), |
136 | (float)Convert.ToDecimal((string)requestData["startpos_y"]), | 136 | (float)Convert.ToDecimal((string)requestData["startpos_y"], Culture.NumberFormatInfo), |
137 | (float)Convert.ToDecimal((string)requestData["startpos_z"])); | 137 | (float)Convert.ToDecimal((string)requestData["startpos_z"], Culture.NumberFormatInfo)); |
138 | 138 | ||
139 | userData.UserServerURI = (string)requestData["userserver_id"]; | 139 | userData.UserServerURI = (string)requestData["userserver_id"]; |
140 | userData.UserAssetURI = (string)requestData["assetserver_id"]; | 140 | userData.UserAssetURI = (string)requestData["assetserver_id"]; |
diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs index df33db2..a91b632 100644 --- a/OpenSim/Services/AssetService/AssetService.cs +++ b/OpenSim/Services/AssetService/AssetService.cs | |||
@@ -76,17 +76,19 @@ namespace OpenSim.Services.AssetService | |||
76 | }); | 76 | }); |
77 | } | 77 | } |
78 | 78 | ||
79 | m_log.Info("[ASSET CONNECTOR]: Local asset service enabled"); | 79 | m_log.Info("[ASSET SERVICE]: Local asset service enabled"); |
80 | } | 80 | } |
81 | } | 81 | } |
82 | 82 | ||
83 | public AssetBase Get(string id) | 83 | public AssetBase Get(string id) |
84 | { | 84 | { |
85 | //m_log.DebugFormat("[ASSET SERVICE]: Get asset {0}", id); | ||
86 | UUID assetID; | 85 | UUID assetID; |
87 | 86 | ||
88 | if (!UUID.TryParse(id, out assetID)) | 87 | if (!UUID.TryParse(id, out assetID)) |
88 | { | ||
89 | m_log.WarnFormat("[ASSET SERVICE]: Could not parse requested sset id {0}", id); | ||
89 | return null; | 90 | return null; |
91 | } | ||
90 | 92 | ||
91 | return m_Database.GetAsset(assetID); | 93 | return m_Database.GetAsset(assetID); |
92 | } | 94 | } |
diff --git a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs index 8e311d7..6d442b7 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs | |||
@@ -93,7 +93,7 @@ namespace OpenSim.Services.Connectors | |||
93 | } | 93 | } |
94 | 94 | ||
95 | public AssetBase Get(string id) | 95 | public AssetBase Get(string id) |
96 | { | 96 | { |
97 | string uri = m_ServerURI + "/assets/" + id; | 97 | string uri = m_ServerURI + "/assets/" + id; |
98 | 98 | ||
99 | AssetBase asset = null; | 99 | AssetBase asset = null; |
diff --git a/OpenSim/Tools/Configger/ConfigurationLoader.cs b/OpenSim/Tools/Configger/ConfigurationLoader.cs index 49af417..1619a22 100644 --- a/OpenSim/Tools/Configger/ConfigurationLoader.cs +++ b/OpenSim/Tools/Configger/ConfigurationLoader.cs | |||
@@ -1,3 +1,30 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
1 | using System; | 28 | using System; |
2 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
3 | using System.IO; | 30 | using System.IO; |
@@ -7,7 +34,7 @@ using System.Xml; | |||
7 | using log4net; | 34 | using log4net; |
8 | using Nini.Config; | 35 | using Nini.Config; |
9 | 36 | ||
10 | namespace Careminster | 37 | namespace OpenSim.Tools.Configger |
11 | { | 38 | { |
12 | /// <summary> | 39 | /// <summary> |
13 | /// Loads the Configuration files into nIni | 40 | /// Loads the Configuration files into nIni |
diff --git a/OpenSim/Tools/Configger/Main.cs b/OpenSim/Tools/Configger/Main.cs index 192cfce..61a12e3 100644 --- a/OpenSim/Tools/Configger/Main.cs +++ b/OpenSim/Tools/Configger/Main.cs | |||
@@ -1,7 +1,34 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
1 | using Nini.Config; | 28 | using Nini.Config; |
2 | using System; | 29 | using System; |
3 | 30 | ||
4 | namespace Careminster | 31 | namespace OpenSim.Tools.Configger |
5 | { | 32 | { |
6 | public class Configger | 33 | public class Configger |
7 | { | 34 | { |
diff --git a/OpenSim/Tools/Configger/Util.cs b/OpenSim/Tools/Configger/Util.cs index 6f8aa76..fe7744d 100644 --- a/OpenSim/Tools/Configger/Util.cs +++ b/OpenSim/Tools/Configger/Util.cs | |||
@@ -1,3 +1,30 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
1 | using System; | 28 | using System; |
2 | using System.Collections; | 29 | using System.Collections; |
3 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
@@ -13,7 +40,7 @@ using System.Threading; | |||
13 | using log4net; | 40 | using log4net; |
14 | using Nini.Config; | 41 | using Nini.Config; |
15 | 42 | ||
16 | namespace Careminster | 43 | namespace OpenSim.Tools.Configger |
17 | { | 44 | { |
18 | public static class Util | 45 | public static class Util |
19 | { | 46 | { |