Merge branch 'master' into careminster
						commit
						2084e08ad7
					
				|  | @ -120,6 +120,7 @@ what it is today. | ||||||
| * tglion | * tglion | ||||||
| * tlaukkan/Tommil (Tommi S. E. Laukkanen, Bubble Cloud) | * tlaukkan/Tommil (Tommi S. E. Laukkanen, Bubble Cloud) | ||||||
| * tyre | * tyre | ||||||
|  | * VikingErik | ||||||
| * Vytek | * Vytek | ||||||
| * webmage (IBM) | * webmage (IBM) | ||||||
| * Xantor | * Xantor | ||||||
|  |  | ||||||
|  | @ -29,6 +29,7 @@ using System; | ||||||
| using System.IO; | using System.IO; | ||||||
| using System.Xml.Serialization; | using System.Xml.Serialization; | ||||||
| using OpenMetaverse; | using OpenMetaverse; | ||||||
|  | using OpenSim.Framework; | ||||||
| using OpenSim.Framework.Servers; | using OpenSim.Framework.Servers; | ||||||
| using OpenSim.Framework.Servers.HttpServer; | using OpenSim.Framework.Servers.HttpServer; | ||||||
| using OpenSim.Region.Framework.Interfaces; | using OpenSim.Region.Framework.Interfaces; | ||||||
|  | @ -156,8 +157,8 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | ||||||
|                         Vector3 min, max; |                         Vector3 min, max; | ||||||
|                         try |                         try | ||||||
|                         { |                         { | ||||||
|                             min = new Vector3((float)Double.Parse(subregion[0]), (float)Double.Parse(subregion[1]), (float)Double.Parse(subregion[2])); |                             min = new Vector3((float)Double.Parse(subregion[0], Culture.NumberFormatInfo), (float)Double.Parse(subregion[1], Culture.NumberFormatInfo), (float)Double.Parse(subregion[2], Culture.NumberFormatInfo)); | ||||||
|                             max = new Vector3((float)Double.Parse(subregion[3]), (float)Double.Parse(subregion[4]), (float)Double.Parse(subregion[5])); |                             max = new Vector3((float)Double.Parse(subregion[3], Culture.NumberFormatInfo), (float)Double.Parse(subregion[4], Culture.NumberFormatInfo), (float)Double.Parse(subregion[5], Culture.NumberFormatInfo)); | ||||||
|                         } |                         } | ||||||
|                         catch (Exception) |                         catch (Exception) | ||||||
|                         { |                         { | ||||||
|  |  | ||||||
|  | @ -218,9 +218,9 @@ namespace OpenSim.Client.Linden | ||||||
|                 { |                 { | ||||||
|                     //m_log.Debug("[CLIENT]: Main agent detected"); |                     //m_log.Debug("[CLIENT]: Main agent detected"); | ||||||
|                     agentData.startpos = |                     agentData.startpos = | ||||||
|                         new Vector3((float)Convert.ToDecimal((string)requestData["startpos_x"]), |                         new Vector3((float)Convert.ToDecimal((string)requestData["startpos_x"], Culture.NumberFormatInfo), | ||||||
|                                       (float)Convert.ToDecimal((string)requestData["startpos_y"]), |                                       (float)Convert.ToDecimal((string)requestData["startpos_y"], Culture.NumberFormatInfo), | ||||||
|                                       (float)Convert.ToDecimal((string)requestData["startpos_z"])); |                                       (float)Convert.ToDecimal((string)requestData["startpos_z"], Culture.NumberFormatInfo)); | ||||||
|                     agentData.child = false; |                     agentData.child = false; | ||||||
|                 } |                 } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -622,11 +622,6 @@ namespace OpenSim.Data.MySQL | ||||||
|             return false; |             return false; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         /// <summary> |  | ||||||
|         /// Appearance |  | ||||||
|         /// TODO: stubs for now to get us to a compiling state gently |  | ||||||
|         /// override |  | ||||||
|         /// </summary> |  | ||||||
|         public override AvatarAppearance GetUserAppearance(UUID user) |         public override AvatarAppearance GetUserAppearance(UUID user) | ||||||
|         { |         { | ||||||
|             try |             try | ||||||
|  |  | ||||||
|  | @ -626,18 +626,42 @@ namespace OpenSim.Data.SQLite | ||||||
|         { |         { | ||||||
|             lock (ds) |             lock (ds) | ||||||
|             { |             { | ||||||
|                 using (SqliteCommand cmd = new SqliteCommand("delete from land where UUID=:UUID", m_conn)) |                 // Can't use blanket SQL statements when using SqlAdapters unless you re-read the data into the adapter | ||||||
|  |                 // after you're done. | ||||||
|  |                 // replaced below code with the SqliteAdapter version. | ||||||
|  |                 //using (SqliteCommand cmd = new SqliteCommand("delete from land where UUID=:UUID", m_conn)) | ||||||
|  |                 //{ | ||||||
|  |                 //    cmd.Parameters.Add(new SqliteParameter(":UUID", globalID.ToString())); | ||||||
|  |                 //    cmd.ExecuteNonQuery(); | ||||||
|  |                 //} | ||||||
|  | 
 | ||||||
|  |                 //using (SqliteCommand cmd = new SqliteCommand("delete from landaccesslist where LandUUID=:UUID", m_conn)) | ||||||
|  |                 //{ | ||||||
|  |                 //   cmd.Parameters.Add(new SqliteParameter(":UUID", globalID.ToString())); | ||||||
|  |                 //    cmd.ExecuteNonQuery(); | ||||||
|  |                 //} | ||||||
|  | 
 | ||||||
|  |                 DataTable land = ds.Tables["land"]; | ||||||
|  |                 DataTable landaccesslist = ds.Tables["landaccesslist"]; | ||||||
|  |                 DataRow landRow = land.Rows.Find(globalID.ToString()); | ||||||
|  |                 if (landRow != null) | ||||||
|                 { |                 { | ||||||
|                     cmd.Parameters.Add(new SqliteParameter(":UUID", globalID.ToString())); |                     land.Rows.Remove(landRow); | ||||||
|                     cmd.ExecuteNonQuery(); |                 } | ||||||
|  |                 List<DataRow> rowsToDelete = new List<DataRow>(); | ||||||
|  |                 foreach (DataRow rowToCheck in landaccesslist.Rows) | ||||||
|  |                 { | ||||||
|  |                     if (rowToCheck["LandUUID"].ToString() == globalID.ToString()) | ||||||
|  |                         rowsToDelete.Add(rowToCheck); | ||||||
|  |                 } | ||||||
|  |                 for (int iter = 0; iter < rowsToDelete.Count; iter++) | ||||||
|  |                 { | ||||||
|  |                     landaccesslist.Rows.Remove(rowsToDelete[iter]); | ||||||
|                 } |                 } | ||||||
| 
 | 
 | ||||||
|                 using (SqliteCommand cmd = new SqliteCommand("delete from landaccesslist where LandUUID=:UUID", m_conn)) |                 | ||||||
|                 { |  | ||||||
|                     cmd.Parameters.Add(new SqliteParameter(":UUID", globalID.ToString())); |  | ||||||
|                     cmd.ExecuteNonQuery(); |  | ||||||
|                 } |  | ||||||
|             } |             } | ||||||
|  |             Commit(); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         /// <summary> |         /// <summary> | ||||||
|  | @ -664,12 +688,27 @@ namespace OpenSim.Data.SQLite | ||||||
|                 } |                 } | ||||||
| 
 | 
 | ||||||
|                 // I know this caused someone issues before, but OpenSim is unusable if we leave this stuff around |                 // I know this caused someone issues before, but OpenSim is unusable if we leave this stuff around | ||||||
|                 using (SqliteCommand cmd = new SqliteCommand("delete from landaccesslist where LandUUID=:LandUUID", m_conn)) |                 //using (SqliteCommand cmd = new SqliteCommand("delete from landaccesslist where LandUUID=:LandUUID", m_conn)) | ||||||
|                 { |                 //{ | ||||||
|                     cmd.Parameters.Add(new SqliteParameter(":LandUUID", parcel.LandData.GlobalID.ToString())); |                 //    cmd.Parameters.Add(new SqliteParameter(":LandUUID", parcel.LandData.GlobalID.ToString())); | ||||||
|                     cmd.ExecuteNonQuery(); |                 //    cmd.ExecuteNonQuery(); | ||||||
|                 } |  | ||||||
| 
 | 
 | ||||||
|  | //                } | ||||||
|  | 
 | ||||||
|  |                 // This is the slower..  but more appropriate thing to do | ||||||
|  | 
 | ||||||
|  |                 // We can't modify the table with direct queries before calling Commit() and re-filling them. | ||||||
|  |                 List<DataRow> rowsToDelete = new List<DataRow>(); | ||||||
|  |                 foreach (DataRow rowToCheck in landaccesslist.Rows) | ||||||
|  |                 { | ||||||
|  |                     if (rowToCheck["LandUUID"].ToString() == parcel.LandData.GlobalID.ToString()) | ||||||
|  |                         rowsToDelete.Add(rowToCheck); | ||||||
|  |                 } | ||||||
|  |                 for (int iter = 0; iter < rowsToDelete.Count; iter++) | ||||||
|  |                 { | ||||||
|  |                     landaccesslist.Rows.Remove(rowsToDelete[iter]); | ||||||
|  |                 } | ||||||
|  |                 rowsToDelete.Clear(); | ||||||
|                 foreach (ParcelManager.ParcelAccessEntry entry in parcel.LandData.ParcelAccessList) |                 foreach (ParcelManager.ParcelAccessEntry entry in parcel.LandData.ParcelAccessList) | ||||||
|                 { |                 { | ||||||
|                     DataRow newAccessRow = landaccesslist.NewRow(); |                     DataRow newAccessRow = landaccesslist.NewRow(); | ||||||
|  | @ -1720,7 +1759,7 @@ namespace OpenSim.Data.SQLite | ||||||
|             row["terrain_raise_limit"] = settings.TerrainRaiseLimit; |             row["terrain_raise_limit"] = settings.TerrainRaiseLimit; | ||||||
|             row["terrain_lower_limit"] = settings.TerrainLowerLimit; |             row["terrain_lower_limit"] = settings.TerrainLowerLimit; | ||||||
|             row["use_estate_sun"] = settings.UseEstateSun; |             row["use_estate_sun"] = settings.UseEstateSun; | ||||||
|             row["sandbox"] = settings.Sandbox; |             row["Sandbox"] = settings.Sandbox; // database uses upper case S for sandbox | ||||||
|             row["sunvectorx"] = settings.SunVector.X; |             row["sunvectorx"] = settings.SunVector.X; | ||||||
|             row["sunvectory"] = settings.SunVector.Y; |             row["sunvectory"] = settings.SunVector.Y; | ||||||
|             row["sunvectorz"] = settings.SunVector.Z; |             row["sunvectorz"] = settings.SunVector.Z; | ||||||
|  | @ -1822,6 +1861,7 @@ namespace OpenSim.Data.SQLite | ||||||
|         /// <param name="regionUUID"></param> |         /// <param name="regionUUID"></param> | ||||||
|         private void addPrim(SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID) |         private void addPrim(SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID) | ||||||
|         { |         { | ||||||
|  | 
 | ||||||
|             DataTable prims = ds.Tables["prims"]; |             DataTable prims = ds.Tables["prims"]; | ||||||
|             DataTable shapes = ds.Tables["primshapes"]; |             DataTable shapes = ds.Tables["primshapes"]; | ||||||
| 
 | 
 | ||||||
|  | @ -1970,6 +2010,40 @@ namespace OpenSim.Data.SQLite | ||||||
|             return cmd; |             return cmd; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  |         /// <summary> | ||||||
|  |         /// create an update command | ||||||
|  |         /// </summary> | ||||||
|  |         /// <param name="table">table name</param> | ||||||
|  |         /// <param name="pk"></param> | ||||||
|  |         /// <param name="dt"></param> | ||||||
|  |         /// <returns>the created command</returns> | ||||||
|  |         private static SqliteCommand createUpdateCommand(string table, string pk1, string pk2, DataTable dt) | ||||||
|  |         { | ||||||
|  |             string sql = "update " + table + " set "; | ||||||
|  |             string subsql = String.Empty; | ||||||
|  |             foreach (DataColumn col in dt.Columns) | ||||||
|  |             { | ||||||
|  |                 if (subsql.Length > 0) | ||||||
|  |                 { | ||||||
|  |                     // a map function would rock so much here | ||||||
|  |                     subsql += ", "; | ||||||
|  |                 } | ||||||
|  |                 subsql += col.ColumnName + "= :" + col.ColumnName; | ||||||
|  |             } | ||||||
|  |             sql += subsql; | ||||||
|  |             sql += " where " + pk1 + " and " + pk2; | ||||||
|  |             SqliteCommand cmd = new SqliteCommand(sql); | ||||||
|  | 
 | ||||||
|  |             // this provides the binding for all our parameters, so | ||||||
|  |             // much less code than it used to be | ||||||
|  | 
 | ||||||
|  |             foreach (DataColumn col in dt.Columns) | ||||||
|  |             { | ||||||
|  |                 cmd.Parameters.Add(createSqliteParameter(col.ColumnName, col.DataType)); | ||||||
|  |             } | ||||||
|  |             return cmd; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|         /// <summary> |         /// <summary> | ||||||
|         /// |         /// | ||||||
|         /// </summary> |         /// </summary> | ||||||
|  | @ -2088,6 +2162,11 @@ namespace OpenSim.Data.SQLite | ||||||
| 
 | 
 | ||||||
|             da.UpdateCommand = createUpdateCommand("land", "UUID=:UUID", ds.Tables["land"]); |             da.UpdateCommand = createUpdateCommand("land", "UUID=:UUID", ds.Tables["land"]); | ||||||
|             da.UpdateCommand.Connection = conn; |             da.UpdateCommand.Connection = conn; | ||||||
|  | 
 | ||||||
|  |             SqliteCommand delete = new SqliteCommand("delete from land where UUID=:UUID"); | ||||||
|  |             delete.Parameters.Add(createSqliteParameter("UUID", typeof(String))); | ||||||
|  |             da.DeleteCommand = delete; | ||||||
|  |             da.DeleteCommand.Connection = conn; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         /// <summary> |         /// <summary> | ||||||
|  | @ -2099,6 +2178,16 @@ namespace OpenSim.Data.SQLite | ||||||
|         { |         { | ||||||
|             da.InsertCommand = createInsertCommand("landaccesslist", ds.Tables["landaccesslist"]); |             da.InsertCommand = createInsertCommand("landaccesslist", ds.Tables["landaccesslist"]); | ||||||
|             da.InsertCommand.Connection = conn; |             da.InsertCommand.Connection = conn; | ||||||
|  | 
 | ||||||
|  |             da.UpdateCommand = createUpdateCommand("landaccesslist", "LandUUID=:landUUID", "AccessUUID=:AccessUUID", ds.Tables["landaccesslist"]); | ||||||
|  |             da.UpdateCommand.Connection = conn; | ||||||
|  | 
 | ||||||
|  |             SqliteCommand delete = new SqliteCommand("delete from landaccesslist where LandUUID= :LandUUID and AccessUUID= :AccessUUID"); | ||||||
|  |             delete.Parameters.Add(createSqliteParameter("LandUUID", typeof(String))); | ||||||
|  |             delete.Parameters.Add(createSqliteParameter("AccessUUID", typeof(String))); | ||||||
|  |             da.DeleteCommand = delete; | ||||||
|  |             da.DeleteCommand.Connection = conn; | ||||||
|  |              | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         private void setupRegionSettingsCommands(SqliteDataAdapter da, SqliteConnection conn) |         private void setupRegionSettingsCommands(SqliteDataAdapter da, SqliteConnection conn) | ||||||
|  |  | ||||||
|  | @ -69,9 +69,7 @@ namespace OpenSim.Framework | ||||||
|         private static UUID HAIR_ASSET = new UUID("d342e6c0-b9d2-11dc-95ff-0800200c9a66"); |         private static UUID HAIR_ASSET = new UUID("d342e6c0-b9d2-11dc-95ff-0800200c9a66"); | ||||||
|         private static UUID HAIR_ITEM = new UUID("d342e6c1-b9d2-11dc-95ff-0800200c9a66"); |         private static UUID HAIR_ITEM = new UUID("d342e6c1-b9d2-11dc-95ff-0800200c9a66"); | ||||||
| 
 | 
 | ||||||
|         public readonly static int VISUALPARAM_COUNT = 218; |         public readonly static int VISUALPARAM_COUNT = 218;         | ||||||
| 
 |  | ||||||
|          |  | ||||||
| 
 | 
 | ||||||
|         protected UUID m_owner; |         protected UUID m_owner; | ||||||
| 
 | 
 | ||||||
|  | @ -346,11 +344,7 @@ namespace OpenSim.Framework | ||||||
|         } |         } | ||||||
|          */ |          */ | ||||||
| 
 | 
 | ||||||
| 
 |         public AvatarAppearance() : this(UUID.Zero) {} | ||||||
|         public AvatarAppearance() |  | ||||||
|             : this(UUID.Zero) |  | ||||||
|         { |  | ||||||
|         } |  | ||||||
| 
 | 
 | ||||||
|         public AvatarAppearance(UUID owner) |         public AvatarAppearance(UUID owner) | ||||||
|         { |         { | ||||||
|  | @ -367,10 +361,8 @@ namespace OpenSim.Framework | ||||||
|             // This sets Visual Params with *less* weirder values then default. Instead of a ugly alien, it looks like a fat scientist |             // This sets Visual Params with *less* weirder values then default. Instead of a ugly alien, it looks like a fat scientist | ||||||
|             SetDefaultParams(m_visualparams); |             SetDefaultParams(m_visualparams); | ||||||
|             SetDefaultWearables(); |             SetDefaultWearables(); | ||||||
|             m_texture = GetDefaultTexture(); |             m_texture = GetDefaultTexture();             | ||||||
|              |  | ||||||
|         } |         } | ||||||
| 
 |  | ||||||
|          |          | ||||||
|         public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, byte[] visualParams) |         public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, byte[] visualParams) | ||||||
|         { |         { | ||||||
|  | @ -1481,4 +1473,4 @@ namespace OpenSim.Framework | ||||||
|             SKIRT_SKIRT_BLUE = 217 |             SKIRT_SKIRT_BLUE = 217 | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | @ -1015,8 +1015,8 @@ namespace OpenSim.Framework.Communications.Services | ||||||
|                     } |                     } | ||||||
|                     else |                     else | ||||||
|                     { |                     { | ||||||
|                         theUser.CurrentAgent.Position = new Vector3(float.Parse(uriMatch.Groups["x"].Value), |                         theUser.CurrentAgent.Position = new Vector3(float.Parse(uriMatch.Groups["x"].Value, Culture.NumberFormatInfo), | ||||||
|                                                                     float.Parse(uriMatch.Groups["y"].Value), float.Parse(uriMatch.Groups["z"].Value)); |                                                                     float.Parse(uriMatch.Groups["y"].Value, Culture.NumberFormatInfo), float.Parse(uriMatch.Groups["z"].Value, Culture.NumberFormatInfo)); | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|                 response.LookAt = "[r0,r1,r0]"; |                 response.LookAt = "[r0,r1,r0]"; | ||||||
|  |  | ||||||
|  | @ -785,7 +785,8 @@ namespace OpenSim.Framework.Communications | ||||||
|                 } |                 } | ||||||
|                 catch (Exception e) |                 catch (Exception e) | ||||||
|                 { |                 { | ||||||
|                     m_log.ErrorFormat("[USERSTORAGE]: Unable to find user appearance {0} via {1} ({2})", user.ToString(), plugin.Name, e.ToString()); |                     m_log.ErrorFormat( | ||||||
|  |                         "[USERSTORAGE]: Unable to find user appearance {0} via {1} ({2})", user, plugin.Name, e); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|              |              | ||||||
|  |  | ||||||
|  | @ -33,7 +33,7 @@ namespace OpenSim.Framework | ||||||
| { | { | ||||||
|     public class Culture |     public class Culture | ||||||
|     { |     { | ||||||
|         private static readonly CultureInfo m_cultureInfo = new CultureInfo("en-US", true); |         private static readonly CultureInfo m_cultureInfo = new CultureInfo("en-US", false); | ||||||
| 
 | 
 | ||||||
|         public static NumberFormatInfo NumberFormatInfo |         public static NumberFormatInfo NumberFormatInfo | ||||||
|         { |         { | ||||||
|  |  | ||||||
|  | @ -109,7 +109,7 @@ namespace OpenSim.Framework.Serialization.External | ||||||
|                         settings.AgentLimit = int.Parse(xtr.ReadElementContentAsString()); |                         settings.AgentLimit = int.Parse(xtr.ReadElementContentAsString()); | ||||||
|                         break; |                         break; | ||||||
|                     case "ObjectBonus": |                     case "ObjectBonus": | ||||||
|                         settings.ObjectBonus = double.Parse(xtr.ReadElementContentAsString()); |                         settings.ObjectBonus = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); | ||||||
|                         break; |                         break; | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  | @ -134,28 +134,28 @@ namespace OpenSim.Framework.Serialization.External | ||||||
|                         settings.TerrainTexture4 = UUID.Parse(xtr.ReadElementContentAsString()); |                         settings.TerrainTexture4 = UUID.Parse(xtr.ReadElementContentAsString()); | ||||||
|                         break; |                         break; | ||||||
|                     case "ElevationLowSW": |                     case "ElevationLowSW": | ||||||
|                         settings.Elevation1SW = double.Parse(xtr.ReadElementContentAsString()); |                         settings.Elevation1SW = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); | ||||||
|                         break; |                         break; | ||||||
|                     case "ElevationLowNW": |                     case "ElevationLowNW": | ||||||
|                         settings.Elevation1NW = double.Parse(xtr.ReadElementContentAsString()); |                         settings.Elevation1NW = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); | ||||||
|                         break; |                         break; | ||||||
|                     case "ElevationLowSE": |                     case "ElevationLowSE": | ||||||
|                         settings.Elevation1SE = double.Parse(xtr.ReadElementContentAsString()); |                         settings.Elevation1SE = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); | ||||||
|                         break; |                         break; | ||||||
|                     case "ElevationLowNE": |                     case "ElevationLowNE": | ||||||
|                         settings.Elevation1NE = double.Parse(xtr.ReadElementContentAsString()); |                         settings.Elevation1NE = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); | ||||||
|                         break; |                         break; | ||||||
|                     case "ElevationHighSW": |                     case "ElevationHighSW": | ||||||
|                         settings.Elevation2SW = double.Parse(xtr.ReadElementContentAsString()); |                         settings.Elevation2SW = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); | ||||||
|                         break; |                         break; | ||||||
|                     case "ElevationHighNW": |                     case "ElevationHighNW": | ||||||
|                         settings.Elevation2NW = double.Parse(xtr.ReadElementContentAsString()); |                         settings.Elevation2NW = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); | ||||||
|                         break; |                         break; | ||||||
|                     case "ElevationHighSE": |                     case "ElevationHighSE": | ||||||
|                         settings.Elevation2SE = double.Parse(xtr.ReadElementContentAsString()); |                         settings.Elevation2SE = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); | ||||||
|                         break; |                         break; | ||||||
|                     case "ElevationHighNE": |                     case "ElevationHighNE": | ||||||
|                         settings.Elevation2NE = double.Parse(xtr.ReadElementContentAsString()); |                         settings.Elevation2NE = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); | ||||||
|                         break; |                         break; | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  | @ -168,13 +168,13 @@ namespace OpenSim.Framework.Serialization.External | ||||||
|                 switch (xtr.Name) |                 switch (xtr.Name) | ||||||
|                 { |                 { | ||||||
|                     case "WaterHeight": |                     case "WaterHeight": | ||||||
|                         settings.WaterHeight = double.Parse(xtr.ReadElementContentAsString()); |                         settings.WaterHeight = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); | ||||||
|                         break; |                         break; | ||||||
|                     case "TerrainRaiseLimit": |                     case "TerrainRaiseLimit": | ||||||
|                         settings.TerrainRaiseLimit = double.Parse(xtr.ReadElementContentAsString()); |                         settings.TerrainRaiseLimit = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); | ||||||
|                         break; |                         break; | ||||||
|                     case "TerrainLowerLimit": |                     case "TerrainLowerLimit": | ||||||
|                         settings.TerrainLowerLimit = double.Parse(xtr.ReadElementContentAsString()); |                         settings.TerrainLowerLimit = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); | ||||||
|                         break; |                         break; | ||||||
|                     case "UseEstateSun": |                     case "UseEstateSun": | ||||||
|                         settings.UseEstateSun = bool.Parse(xtr.ReadElementContentAsString()); |                         settings.UseEstateSun = bool.Parse(xtr.ReadElementContentAsString()); | ||||||
|  |  | ||||||
|  | @ -503,7 +503,7 @@ namespace OpenSim.Grid.UserServer.Modules | ||||||
|             { |             { | ||||||
|                 try |                 try | ||||||
|                 { |                 { | ||||||
|                     userProfile.HomeLocationX = (float)Convert.ToDecimal((string)requestData["home_pos_x"]); |                     userProfile.HomeLocationX = (float)Convert.ToDecimal((string)requestData["home_pos_x"], Culture.NumberFormatInfo); | ||||||
|                 } |                 } | ||||||
|                 catch (InvalidCastException) |                 catch (InvalidCastException) | ||||||
|                 { |                 { | ||||||
|  | @ -514,7 +514,7 @@ namespace OpenSim.Grid.UserServer.Modules | ||||||
|             { |             { | ||||||
|                 try |                 try | ||||||
|                 { |                 { | ||||||
|                     userProfile.HomeLocationY = (float)Convert.ToDecimal((string)requestData["home_pos_y"]); |                     userProfile.HomeLocationY = (float)Convert.ToDecimal((string)requestData["home_pos_y"], Culture.NumberFormatInfo); | ||||||
|                 } |                 } | ||||||
|                 catch (InvalidCastException) |                 catch (InvalidCastException) | ||||||
|                 { |                 { | ||||||
|  | @ -525,7 +525,7 @@ namespace OpenSim.Grid.UserServer.Modules | ||||||
|             { |             { | ||||||
|                 try |                 try | ||||||
|                 { |                 { | ||||||
|                     userProfile.HomeLocationZ = (float)Convert.ToDecimal((string)requestData["home_pos_z"]); |                     userProfile.HomeLocationZ = (float)Convert.ToDecimal((string)requestData["home_pos_z"], Culture.NumberFormatInfo); | ||||||
|                 } |                 } | ||||||
|                 catch (InvalidCastException) |                 catch (InvalidCastException) | ||||||
|                 { |                 { | ||||||
|  | @ -536,7 +536,7 @@ namespace OpenSim.Grid.UserServer.Modules | ||||||
|             { |             { | ||||||
|                 try |                 try | ||||||
|                 { |                 { | ||||||
|                     userProfile.HomeLookAtX = (float)Convert.ToDecimal((string)requestData["home_look_x"]); |                     userProfile.HomeLookAtX = (float)Convert.ToDecimal((string)requestData["home_look_x"], Culture.NumberFormatInfo); | ||||||
|                 } |                 } | ||||||
|                 catch (InvalidCastException) |                 catch (InvalidCastException) | ||||||
|                 { |                 { | ||||||
|  | @ -547,7 +547,7 @@ namespace OpenSim.Grid.UserServer.Modules | ||||||
|             { |             { | ||||||
|                 try |                 try | ||||||
|                 { |                 { | ||||||
|                     userProfile.HomeLookAtY = (float)Convert.ToDecimal((string)requestData["home_look_y"]); |                     userProfile.HomeLookAtY = (float)Convert.ToDecimal((string)requestData["home_look_y"], Culture.NumberFormatInfo); | ||||||
|                 } |                 } | ||||||
|                 catch (InvalidCastException) |                 catch (InvalidCastException) | ||||||
|                 { |                 { | ||||||
|  | @ -558,7 +558,7 @@ namespace OpenSim.Grid.UserServer.Modules | ||||||
|             { |             { | ||||||
|                 try |                 try | ||||||
|                 { |                 { | ||||||
|                     userProfile.HomeLookAtZ = (float)Convert.ToDecimal((string)requestData["home_look_z"]); |                     userProfile.HomeLookAtZ = (float)Convert.ToDecimal((string)requestData["home_look_z"], Culture.NumberFormatInfo); | ||||||
|                 } |                 } | ||||||
|                 catch (InvalidCastException) |                 catch (InvalidCastException) | ||||||
|                 { |                 { | ||||||
|  | @ -634,13 +634,13 @@ namespace OpenSim.Grid.UserServer.Modules | ||||||
|                     UUID RegionID = new UUID((string)requestData["region_uuid"]); |                     UUID RegionID = new UUID((string)requestData["region_uuid"]); | ||||||
|                     ulong regionhandle = (ulong)Convert.ToInt64((string)requestData["region_handle"]); |                     ulong regionhandle = (ulong)Convert.ToInt64((string)requestData["region_handle"]); | ||||||
|                     Vector3 position = new Vector3( |                     Vector3 position = new Vector3( | ||||||
|                         (float)Convert.ToDecimal((string)requestData["region_pos_x"]), |                         (float)Convert.ToDecimal((string)requestData["region_pos_x"], Culture.NumberFormatInfo), | ||||||
|                         (float)Convert.ToDecimal((string)requestData["region_pos_y"]), |                         (float)Convert.ToDecimal((string)requestData["region_pos_y"], Culture.NumberFormatInfo), | ||||||
|                         (float)Convert.ToDecimal((string)requestData["region_pos_z"])); |                         (float)Convert.ToDecimal((string)requestData["region_pos_z"], Culture.NumberFormatInfo)); | ||||||
|                     Vector3 lookat = new Vector3( |                     Vector3 lookat = new Vector3( | ||||||
|                         (float)Convert.ToDecimal((string)requestData["lookat_x"]), |                         (float)Convert.ToDecimal((string)requestData["lookat_x"], Culture.NumberFormatInfo), | ||||||
|                         (float)Convert.ToDecimal((string)requestData["lookat_y"]), |                         (float)Convert.ToDecimal((string)requestData["lookat_y"], Culture.NumberFormatInfo), | ||||||
|                         (float)Convert.ToDecimal((string)requestData["lookat_z"])); |                         (float)Convert.ToDecimal((string)requestData["lookat_z"], Culture.NumberFormatInfo)); | ||||||
| 
 | 
 | ||||||
|                     handlerLogOffUser = OnLogOffUser; |                     handlerLogOffUser = OnLogOffUser; | ||||||
|                     if (handlerLogOffUser != null) |                     if (handlerLogOffUser != null) | ||||||
|  |  | ||||||
|  | @ -1183,14 +1183,14 @@ namespace OpenSim | ||||||
|                     } |                     } | ||||||
|                     if (cmdparams.Length > 4) |                     if (cmdparams.Length > 4) | ||||||
|                     { |                     { | ||||||
|                         loadOffset.X = (float) Convert.ToDecimal(cmdparams[4]); |                         loadOffset.X = (float)Convert.ToDecimal(cmdparams[4], Culture.NumberFormatInfo); | ||||||
|                         if (cmdparams.Length > 5) |                         if (cmdparams.Length > 5) | ||||||
|                         { |                         { | ||||||
|                             loadOffset.Y = (float) Convert.ToDecimal(cmdparams[5]); |                             loadOffset.Y = (float)Convert.ToDecimal(cmdparams[5], Culture.NumberFormatInfo); | ||||||
|                         } |                         } | ||||||
|                         if (cmdparams.Length > 6) |                         if (cmdparams.Length > 6) | ||||||
|                         { |                         { | ||||||
|                             loadOffset.Z = (float) Convert.ToDecimal(cmdparams[6]); |                             loadOffset.Z = (float)Convert.ToDecimal(cmdparams[6], Culture.NumberFormatInfo); | ||||||
|                         } |                         } | ||||||
|                         MainConsole.Instance.Output(String.Format("loadOffsets <X,Y,Z> = <{0},{1},{2}>",loadOffset.X,loadOffset.Y,loadOffset.Z)); |                         MainConsole.Instance.Output(String.Format("loadOffsets <X,Y,Z> = <{0},{1},{2}>",loadOffset.X,loadOffset.Y,loadOffset.Z)); | ||||||
|                     } |                     } | ||||||
|  |  | ||||||
|  | @ -3286,9 +3286,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | ||||||
|                 awb.ItemID = wearables[i].ItemID; |                 awb.ItemID = wearables[i].ItemID; | ||||||
|                 aw.WearableData[i] = awb; |                 aw.WearableData[i] = awb; | ||||||
| 
 | 
 | ||||||
|                 //                m_log.DebugFormat( | //                                m_log.DebugFormat( | ||||||
|                 //                    "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}", | //                                    "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}", | ||||||
|                 //                    awb.ItemID, awb.AssetID, i, Name); | //                                    awb.ItemID, awb.AssetID, i, Name); | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             OutPacket(aw, ThrottleOutPacketType.Task); |             OutPacket(aw, ThrottleOutPacketType.Task); | ||||||
|  | @ -8294,8 +8294,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | ||||||
|                     { |                     { | ||||||
|                         OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter), convertParamStringToBool(messagePacket.ParamList[1].Parameter), |                         OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter), convertParamStringToBool(messagePacket.ParamList[1].Parameter), | ||||||
|                                                 convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter), |                                                 convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter), | ||||||
|                                                 Convert.ToInt16(Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[4].Parameter))), |                                                 Convert.ToInt16(Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[4].Parameter), Culture.NumberFormatInfo)), | ||||||
|                                                 (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter)), |                                                 (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter), Culture.NumberFormatInfo), | ||||||
|                                                 Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[6].Parameter)), |                                                 Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[6].Parameter)), | ||||||
|                                                 convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter)); |                                                 convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter)); | ||||||
|                     } |                     } | ||||||
|  | @ -8343,8 +8343,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | ||||||
|                             if (splitField.Length == 3) |                             if (splitField.Length == 3) | ||||||
|                             { |                             { | ||||||
|                                 Int16 corner = Convert.ToInt16(splitField[0]); |                                 Int16 corner = Convert.ToInt16(splitField[0]); | ||||||
|                                 float lowValue = (float)Convert.ToDecimal(splitField[1]); |                                 float lowValue = (float)Convert.ToDecimal(splitField[1], Culture.NumberFormatInfo); | ||||||
|                                 float highValue = (float)Convert.ToDecimal(splitField[2]); |                                 float highValue = (float)Convert.ToDecimal(splitField[2], Culture.NumberFormatInfo); | ||||||
| 
 | 
 | ||||||
|                                 OnSetEstateTerrainTextureHeights(this, corner, lowValue, highValue); |                                 OnSetEstateTerrainTextureHeights(this, corner, lowValue, highValue); | ||||||
|                             } |                             } | ||||||
|  | @ -8367,19 +8367,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | ||||||
|                             { |                             { | ||||||
|                                 string tmp = Utils.BytesToString(messagePacket.ParamList[0].Parameter); |                                 string tmp = Utils.BytesToString(messagePacket.ParamList[0].Parameter); | ||||||
|                                 if (!tmp.Contains(".")) tmp += ".00"; |                                 if (!tmp.Contains(".")) tmp += ".00"; | ||||||
|                                 float WaterHeight = (float)Convert.ToDecimal(tmp); |                                 float WaterHeight = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo); | ||||||
|                                 tmp = Utils.BytesToString(messagePacket.ParamList[1].Parameter); |                                 tmp = Utils.BytesToString(messagePacket.ParamList[1].Parameter); | ||||||
|                                 if (!tmp.Contains(".")) tmp += ".00"; |                                 if (!tmp.Contains(".")) tmp += ".00"; | ||||||
|                                 float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp); |                                 float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo); | ||||||
|                                 tmp = Utils.BytesToString(messagePacket.ParamList[2].Parameter); |                                 tmp = Utils.BytesToString(messagePacket.ParamList[2].Parameter); | ||||||
|                                 if (!tmp.Contains(".")) tmp += ".00"; |                                 if (!tmp.Contains(".")) tmp += ".00"; | ||||||
|                                 float TerrainLowerLimit = (float)Convert.ToDecimal(tmp); |                                 float TerrainLowerLimit = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo); | ||||||
|                                 bool UseEstateSun = convertParamStringToBool(messagePacket.ParamList[3].Parameter); |                                 bool UseEstateSun = convertParamStringToBool(messagePacket.ParamList[3].Parameter); | ||||||
|                                 bool UseFixedSun = convertParamStringToBool(messagePacket.ParamList[4].Parameter); |                                 bool UseFixedSun = convertParamStringToBool(messagePacket.ParamList[4].Parameter); | ||||||
|                                 float SunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter)); |                                 float SunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter), Culture.NumberFormatInfo); | ||||||
|                                 bool UseGlobal = convertParamStringToBool(messagePacket.ParamList[6].Parameter); |                                 bool UseGlobal = convertParamStringToBool(messagePacket.ParamList[6].Parameter); | ||||||
|                                 bool EstateFixedSun = convertParamStringToBool(messagePacket.ParamList[7].Parameter); |                                 bool EstateFixedSun = convertParamStringToBool(messagePacket.ParamList[7].Parameter); | ||||||
|                                 float EstateSunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[8].Parameter)); |                                 float EstateSunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[8].Parameter), Culture.NumberFormatInfo); | ||||||
| 
 | 
 | ||||||
|                                 OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseEstateSun, UseFixedSun, SunHour, UseGlobal, EstateFixedSun, EstateSunHour); |                                 OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseEstateSun, UseFixedSun, SunHour, UseGlobal, EstateFixedSun, EstateSunHour); | ||||||
| 
 | 
 | ||||||
|  | @ -13911,8 +13911,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | ||||||
|                             { |                             { | ||||||
|                                 OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter), convertParamStringToBool(messagePacket.ParamList[1].Parameter), |                                 OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter), convertParamStringToBool(messagePacket.ParamList[1].Parameter), | ||||||
|                                                         convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter), |                                                         convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter), | ||||||
|                                                         Convert.ToInt16(Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[4].Parameter))), |                                                         Convert.ToInt16(Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[4].Parameter), Culture.NumberFormatInfo)), | ||||||
|                                                         (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter)), |                                                         (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter), Culture.NumberFormatInfo), | ||||||
|                                                         Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[6].Parameter)), |                                                         Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[6].Parameter)), | ||||||
|                                                         convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter)); |                                                         convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter)); | ||||||
|                             } |                             } | ||||||
|  | @ -13960,8 +13960,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | ||||||
|                                     if (splitField.Length == 3) |                                     if (splitField.Length == 3) | ||||||
|                                     { |                                     { | ||||||
|                                         Int16 corner = Convert.ToInt16(splitField[0]); |                                         Int16 corner = Convert.ToInt16(splitField[0]); | ||||||
|                                         float lowValue = (float)Convert.ToDecimal(splitField[1]); |                                         float lowValue = (float)Convert.ToDecimal(splitField[1], Culture.NumberFormatInfo); | ||||||
|                                         float highValue = (float)Convert.ToDecimal(splitField[2]); |                                         float highValue = (float)Convert.ToDecimal(splitField[2], Culture.NumberFormatInfo); | ||||||
| 
 | 
 | ||||||
|                                         OnSetEstateTerrainTextureHeights(this, corner, lowValue, highValue); |                                         OnSetEstateTerrainTextureHeights(this, corner, lowValue, highValue); | ||||||
|                                     } |                                     } | ||||||
|  | @ -13984,19 +13984,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | ||||||
|                                     { |                                     { | ||||||
|                                         string tmp = Utils.BytesToString(messagePacket.ParamList[0].Parameter); |                                         string tmp = Utils.BytesToString(messagePacket.ParamList[0].Parameter); | ||||||
|                                         if (!tmp.Contains(".")) tmp += ".00"; |                                         if (!tmp.Contains(".")) tmp += ".00"; | ||||||
|                                         float WaterHeight = (float)Convert.ToDecimal(tmp); |                                         float WaterHeight = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo); | ||||||
|                                         tmp = Utils.BytesToString(messagePacket.ParamList[1].Parameter); |                                         tmp = Utils.BytesToString(messagePacket.ParamList[1].Parameter); | ||||||
|                                         if (!tmp.Contains(".")) tmp += ".00"; |                                         if (!tmp.Contains(".")) tmp += ".00"; | ||||||
|                                         float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp); |                                         float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo); | ||||||
|                                         tmp = Utils.BytesToString(messagePacket.ParamList[2].Parameter); |                                         tmp = Utils.BytesToString(messagePacket.ParamList[2].Parameter); | ||||||
|                                         if (!tmp.Contains(".")) tmp += ".00"; |                                         if (!tmp.Contains(".")) tmp += ".00"; | ||||||
|                                         float TerrainLowerLimit = (float)Convert.ToDecimal(tmp); |                                         float TerrainLowerLimit = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo); | ||||||
|                                         bool UseEstateSun = convertParamStringToBool(messagePacket.ParamList[3].Parameter); |                                         bool UseEstateSun = convertParamStringToBool(messagePacket.ParamList[3].Parameter); | ||||||
|                                         bool UseFixedSun = convertParamStringToBool(messagePacket.ParamList[4].Parameter); |                                         bool UseFixedSun = convertParamStringToBool(messagePacket.ParamList[4].Parameter); | ||||||
|                                         float SunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter)); |                                         float SunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter), Culture.NumberFormatInfo); | ||||||
|                                         bool UseGlobal = convertParamStringToBool(messagePacket.ParamList[6].Parameter); |                                         bool UseGlobal = convertParamStringToBool(messagePacket.ParamList[6].Parameter); | ||||||
|                                         bool EstateFixedSun = convertParamStringToBool(messagePacket.ParamList[7].Parameter); |                                         bool EstateFixedSun = convertParamStringToBool(messagePacket.ParamList[7].Parameter); | ||||||
|                                         float EstateSunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[8].Parameter)); |                                         float EstateSunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[8].Parameter), Culture.NumberFormatInfo); | ||||||
| 
 | 
 | ||||||
|                                         OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseEstateSun, UseFixedSun, SunHour, UseGlobal, EstateFixedSun, EstateSunHour); |                                         OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseEstateSun, UseFixedSun, SunHour, UseGlobal, EstateFixedSun, EstateSunHour); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -673,13 +673,13 @@ namespace OpenSim.Region.Communications.OGS1 | ||||||
|             else |             else | ||||||
|                 userData.HomeRegionID = UUID.Zero; |                 userData.HomeRegionID = UUID.Zero; | ||||||
|             userData.HomeLocation = |             userData.HomeLocation = | ||||||
|                 new Vector3((float)Convert.ToDecimal((string)data["home_coordinates_x"]), |                 new Vector3((float)Convert.ToDecimal((string)data["home_coordinates_x"], Culture.NumberFormatInfo), | ||||||
|                               (float)Convert.ToDecimal((string)data["home_coordinates_y"]), |                               (float)Convert.ToDecimal((string)data["home_coordinates_y"], Culture.NumberFormatInfo), | ||||||
|                               (float)Convert.ToDecimal((string)data["home_coordinates_z"])); |                               (float)Convert.ToDecimal((string)data["home_coordinates_z"], Culture.NumberFormatInfo)); | ||||||
|             userData.HomeLookAt = |             userData.HomeLookAt = | ||||||
|                 new Vector3((float)Convert.ToDecimal((string)data["home_look_x"]), |                 new Vector3((float)Convert.ToDecimal((string)data["home_look_x"], Culture.NumberFormatInfo), | ||||||
|                               (float)Convert.ToDecimal((string)data["home_look_y"]), |                               (float)Convert.ToDecimal((string)data["home_look_y"], Culture.NumberFormatInfo), | ||||||
|                               (float)Convert.ToDecimal((string)data["home_look_z"])); |                               (float)Convert.ToDecimal((string)data["home_look_z"], Culture.NumberFormatInfo)); | ||||||
|             if (data.Contains("user_flags")) |             if (data.Contains("user_flags")) | ||||||
|                 userData.UserFlags = Convert.ToInt32((string)data["user_flags"]); |                 userData.UserFlags = Convert.ToInt32((string)data["user_flags"]); | ||||||
|             if (data.Contains("god_level")) |             if (data.Contains("god_level")) | ||||||
|  |  | ||||||
|  | @ -1,226 +0,0 @@ | ||||||
| /* |  | ||||||
|  * Copyright (c) Contributors, http://opensimulator.org/ |  | ||||||
|  * See CONTRIBUTORS.TXT for a full list of copyright holders. |  | ||||||
|  * |  | ||||||
|  * Redistribution and use in source and binary forms, with or without |  | ||||||
|  * modification, are permitted provided that the following conditions are met: |  | ||||||
|  *     * Redistributions of source code must retain the above copyright |  | ||||||
|  *       notice, this list of conditions and the following disclaimer. |  | ||||||
|  *     * Redistributions in binary form must reproduce the above copyright |  | ||||||
|  *       notice, this list of conditions and the following disclaimer in the |  | ||||||
|  *       documentation and/or other materials provided with the distribution. |  | ||||||
|  *     * Neither the name of the OpenSimulator Project nor the |  | ||||||
|  *       names of its contributors may be used to endorse or promote products |  | ||||||
|  *       derived from this software without specific prior written permission. |  | ||||||
|  * |  | ||||||
|  * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY |  | ||||||
|  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |  | ||||||
|  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |  | ||||||
|  * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |  | ||||||
|  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |  | ||||||
|  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |  | ||||||
|  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |  | ||||||
|  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |  | ||||||
|  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |  | ||||||
|  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| //using System.Reflection; |  | ||||||
| //using log4net; |  | ||||||
| 
 |  | ||||||
| namespace OpenSim.Region.CoreModules.Agent.AssetTransaction |  | ||||||
| { |  | ||||||
|     /* |  | ||||||
|     public class AgentAssetTransactionsManager |  | ||||||
|     { |  | ||||||
|         //private static readonly ILog m_log |  | ||||||
|         //    = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |  | ||||||
| 
 |  | ||||||
|         /// <summary> |  | ||||||
|         /// Each agent has its own singleton collection of transactions |  | ||||||
|         /// </summary> |  | ||||||
|         private Dictionary<UUID, AgentAssetTransactions> AgentTransactions = |  | ||||||
|             new Dictionary<UUID, AgentAssetTransactions>(); |  | ||||||
| 
 |  | ||||||
|         /// <summary> |  | ||||||
|         /// Should we dump uploaded assets to the filesystem? |  | ||||||
|         /// </summary> |  | ||||||
|         private bool m_dumpAssetsToFile; |  | ||||||
| 
 |  | ||||||
|         public Scene MyScene; |  | ||||||
| 
 |  | ||||||
|         public AgentAssetTransactionsManager(Scene scene, bool dumpAssetsToFile) |  | ||||||
|         { |  | ||||||
|             MyScene = scene; |  | ||||||
|             m_dumpAssetsToFile = dumpAssetsToFile; |  | ||||||
|         } |  | ||||||
| 
 |  | ||||||
|         /// <summary> |  | ||||||
|         /// Get the collection of asset transactions for the given user.  If one does not already exist, it |  | ||||||
|         /// is created. |  | ||||||
|         /// </summary> |  | ||||||
|         /// <param name="userID"></param> |  | ||||||
|         /// <returns></returns> |  | ||||||
|         private AgentAssetTransactions GetUserTransactions(UUID userID) |  | ||||||
|         { |  | ||||||
|             lock (AgentTransactions) |  | ||||||
|             { |  | ||||||
|                 if (!AgentTransactions.ContainsKey(userID)) |  | ||||||
|                 { |  | ||||||
|                     AgentAssetTransactions transactions = null; |  | ||||||
|                         //= new AgentAssetTransactions(userID, this, m_dumpAssetsToFile); |  | ||||||
|                     AgentTransactions.Add(userID, transactions); |  | ||||||
|                 } |  | ||||||
| 
 |  | ||||||
|                 return AgentTransactions[userID]; |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
| 
 |  | ||||||
|         /// <summary> |  | ||||||
|         /// Remove the given agent asset transactions.  This should be called when a client is departing |  | ||||||
|         /// from a scene (and hence won't be making any more transactions here). |  | ||||||
|         /// </summary> |  | ||||||
|         /// <param name="userID"></param> |  | ||||||
|         public void RemoveAgentAssetTransactions(UUID userID) |  | ||||||
|         { |  | ||||||
|             // m_log.DebugFormat("Removing agent asset transactions structure for agent {0}", userID); |  | ||||||
| 
 |  | ||||||
|             lock (AgentTransactions) |  | ||||||
|             { |  | ||||||
|                 AgentTransactions.Remove(userID); |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
| 
 |  | ||||||
|         /// <summary> |  | ||||||
|         /// Create an inventory item from data that has been received through a transaction. |  | ||||||
|         /// |  | ||||||
|         /// This is called when new clothing or body parts are created.  It may also be called in other |  | ||||||
|         /// situations. |  | ||||||
|         /// </summary> |  | ||||||
|         /// <param name="remoteClient"></param> |  | ||||||
|         /// <param name="transactionID"></param> |  | ||||||
|         /// <param name="folderID"></param> |  | ||||||
|         /// <param name="callbackID"></param> |  | ||||||
|         /// <param name="description"></param> |  | ||||||
|         /// <param name="name"></param> |  | ||||||
|         /// <param name="invType"></param> |  | ||||||
|         /// <param name="type"></param> |  | ||||||
|         /// <param name="wearableType"></param> |  | ||||||
|         /// <param name="nextOwnerMask"></param> |  | ||||||
|         public void HandleItemCreationFromTransaction(IClientAPI remoteClient, UUID transactionID, UUID folderID, |  | ||||||
|                                                       uint callbackID, string description, string name, sbyte invType, |  | ||||||
|                                                       sbyte type, byte wearableType, uint nextOwnerMask) |  | ||||||
|         { |  | ||||||
| //            m_log.DebugFormat( |  | ||||||
| //                "[TRANSACTIONS MANAGER] Called HandleItemCreationFromTransaction with item {0}", name); |  | ||||||
| 
 |  | ||||||
|             AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); |  | ||||||
| 
 |  | ||||||
|             transactions.RequestCreateInventoryItem( |  | ||||||
|                 remoteClient, transactionID, folderID, callbackID, description, |  | ||||||
|                 name, invType, type, wearableType, nextOwnerMask); |  | ||||||
|         } |  | ||||||
| 
 |  | ||||||
|         /// <summary> |  | ||||||
|         /// Update an inventory item with data that has been received through a transaction. |  | ||||||
|         /// |  | ||||||
|         /// This is called when clothing or body parts are updated (for instance, with new textures or |  | ||||||
|         /// colours).  It may also be called in other situations. |  | ||||||
|         /// </summary> |  | ||||||
|         /// <param name="remoteClient"></param> |  | ||||||
|         /// <param name="transactionID"></param> |  | ||||||
|         /// <param name="item"></param> |  | ||||||
|         public void HandleItemUpdateFromTransaction(IClientAPI remoteClient, UUID transactionID, |  | ||||||
|                                                     InventoryItemBase item) |  | ||||||
|         { |  | ||||||
| //            m_log.DebugFormat( |  | ||||||
| //                "[TRANSACTIONS MANAGER] Called HandleItemUpdateFromTransaction with item {0}", |  | ||||||
| //                item.Name); |  | ||||||
| 
 |  | ||||||
|             AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); |  | ||||||
| 
 |  | ||||||
|             transactions.RequestUpdateInventoryItem(remoteClient, transactionID, item); |  | ||||||
|         } |  | ||||||
|          |  | ||||||
|         /// <summary> |  | ||||||
|         /// Update a task inventory item with data that has been received through a transaction. |  | ||||||
|         /// |  | ||||||
|         /// This is currently called when, for instance, a notecard in a prim is saved.  The data is sent |  | ||||||
|         /// up through a single AssetUploadRequest.  A subsequent UpdateTaskInventory then references the transaction |  | ||||||
|         /// and comes through this method. |  | ||||||
|         /// </summary> |  | ||||||
|         /// <param name="remoteClient"></param> |  | ||||||
|         /// <param name="transactionID"></param> |  | ||||||
|         /// <param name="item"></param> |  | ||||||
|         public void HandleTaskItemUpdateFromTransaction( |  | ||||||
|             IClientAPI remoteClient, SceneObjectPart part, UUID transactionID, TaskInventoryItem item) |  | ||||||
|         { |  | ||||||
| //            m_log.DebugFormat( |  | ||||||
| //                "[TRANSACTIONS MANAGER] Called HandleTaskItemUpdateFromTransaction with item {0}", |  | ||||||
| //                item.Name); |  | ||||||
| 
 |  | ||||||
|             AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); |  | ||||||
| 
 |  | ||||||
|             transactions.RequestUpdateTaskInventoryItem(remoteClient, part, transactionID, item); |  | ||||||
|         } |  | ||||||
| 
 |  | ||||||
|         /// <summary> |  | ||||||
|         /// Request that a client (agent) begin an asset transfer. |  | ||||||
|         /// </summary> |  | ||||||
|         /// <param name="remoteClient"></param> |  | ||||||
|         /// <param name="assetID"></param> |  | ||||||
|         /// <param name="transaction"></param> |  | ||||||
|         /// <param name="type"></param> |  | ||||||
|         /// <param name="data"></param></param> |  | ||||||
|         /// <param name="tempFile"></param> |  | ||||||
|         public void HandleUDPUploadRequest(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type, |  | ||||||
|                                            byte[] data, bool storeLocal, bool tempFile) |  | ||||||
|         { |  | ||||||
|             //m_log.Debug("HandleUDPUploadRequest - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile); |  | ||||||
|             if (((AssetType)type == AssetType.Texture ||  |  | ||||||
|                 (AssetType)type == AssetType.Sound || |  | ||||||
|                 (AssetType)type == AssetType.TextureTGA || |  | ||||||
|                 (AssetType)type == AssetType.Animation) && |  | ||||||
|                 tempFile == false) |  | ||||||
|             { |  | ||||||
|                 Scene scene = (Scene)remoteClient.Scene; |  | ||||||
|                 IMoneyModule mm = scene.RequestModuleInterface<IMoneyModule>(); |  | ||||||
|                  |  | ||||||
|                 if (mm != null) |  | ||||||
|                 { |  | ||||||
|                     if (!mm.UploadCovered(remoteClient)) |  | ||||||
|                     { |  | ||||||
|                         remoteClient.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false); |  | ||||||
|                         return; |  | ||||||
|                     } |  | ||||||
|                 } |  | ||||||
|             } |  | ||||||
| 
 |  | ||||||
|             //m_log.Debug("asset upload of " + assetID); |  | ||||||
|             AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); |  | ||||||
| 
 |  | ||||||
|             AssetXferUploader uploader = transactions.RequestXferUploader(transaction); |  | ||||||
|             if (uploader != null) |  | ||||||
|             { |  | ||||||
|                 uploader.Initialise(remoteClient, assetID, transaction, type, data, storeLocal, tempFile); |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
| 
 |  | ||||||
|         /// <summary> |  | ||||||
|         /// Handle asset transfer data packets received in response to the asset upload request in |  | ||||||
|         /// HandleUDPUploadRequest() |  | ||||||
|         /// </summary> |  | ||||||
|         /// <param name="remoteClient"></param> |  | ||||||
|         /// <param name="xferID"></param> |  | ||||||
|         /// <param name="packetID"></param> |  | ||||||
|         /// <param name="data"></param> |  | ||||||
|         public void HandleXfer(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data) |  | ||||||
|         { |  | ||||||
|             //m_log.Debug("xferID: " + xferID + "  packetID: " + packetID + "  data!"); |  | ||||||
|             AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); |  | ||||||
| 
 |  | ||||||
|             transactions.HandleXfer(xferID, packetID, data); |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
|      */ |  | ||||||
| } |  | ||||||
|  | @ -27,6 +27,8 @@ | ||||||
| 
 | 
 | ||||||
| using System; | using System; | ||||||
| using System.Collections.Generic; | using System.Collections.Generic; | ||||||
|  | using System.Reflection; | ||||||
|  | using log4net; | ||||||
| using Nini.Config; | using Nini.Config; | ||||||
| using OpenMetaverse; | using OpenMetaverse; | ||||||
| using OpenSim.Framework; | using OpenSim.Framework; | ||||||
|  | @ -37,6 +39,8 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | ||||||
| { | { | ||||||
|     public class AssetTransactionModule : IRegionModule, IAgentAssetTransactions |     public class AssetTransactionModule : IRegionModule, IAgentAssetTransactions | ||||||
|     { |     { | ||||||
|  | //        private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||||||
|  |          | ||||||
|         private readonly Dictionary<UUID, Scene> RegisteredScenes = new Dictionary<UUID, Scene>(); |         private readonly Dictionary<UUID, Scene> RegisteredScenes = new Dictionary<UUID, Scene>(); | ||||||
|         private bool m_dumpAssetsToFile = false; |         private bool m_dumpAssetsToFile = false; | ||||||
|         private Scene m_scene = null; |         private Scene m_scene = null; | ||||||
|  | @ -226,7 +230,8 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | ||||||
|         public void HandleUDPUploadRequest(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type, |         public void HandleUDPUploadRequest(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type, | ||||||
|                                            byte[] data, bool storeLocal, bool tempFile) |                                            byte[] data, bool storeLocal, bool tempFile) | ||||||
|         { |         { | ||||||
|             //m_log.Debug("HandleUDPUploadRequest - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile); | //            m_log.Debug("HandleUDPUploadRequest - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile); | ||||||
|  |              | ||||||
|             if (((AssetType)type == AssetType.Texture || |             if (((AssetType)type == AssetType.Texture || | ||||||
|                 (AssetType)type == AssetType.Sound || |                 (AssetType)type == AssetType.Sound || | ||||||
|                 (AssetType)type == AssetType.TextureTGA || |                 (AssetType)type == AssetType.TextureTGA || | ||||||
|  | @ -246,7 +251,6 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             //m_log.Debug("asset upload of " + assetID); |  | ||||||
|             AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); |             AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); | ||||||
| 
 | 
 | ||||||
|             AssetXferUploader uploader = transactions.RequestXferUploader(transaction); |             AssetXferUploader uploader = transactions.RequestXferUploader(transaction); | ||||||
|  |  | ||||||
|  | @ -154,7 +154,8 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | ||||||
|                 m_userTransactions.Manager.MyScene.AssetService.Store(m_asset); |                 m_userTransactions.Manager.MyScene.AssetService.Store(m_asset); | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             m_log.DebugFormat("[ASSET TRANSACTIONS]: Uploaded asset data for transaction {0}", TransactionID); |             m_log.DebugFormat( | ||||||
|  |                 "[ASSET TRANSACTIONS]: Uploaded asset {0} for transaction {1}", m_asset.FullID, TransactionID); | ||||||
| 
 | 
 | ||||||
|             if (m_dumpAssetToFile) |             if (m_dumpAssetToFile) | ||||||
|             { |             { | ||||||
|  |  | ||||||
|  | @ -91,6 +91,8 @@ namespace OpenSim.Region.CoreModules.Asset | ||||||
|     /// </example> |     /// </example> | ||||||
|     public class CenomeMemoryAssetCache : IImprovedAssetCache, ISharedRegionModule |     public class CenomeMemoryAssetCache : IImprovedAssetCache, ISharedRegionModule | ||||||
|     { |     { | ||||||
|  |         private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||||||
|  |          | ||||||
|         /// <summary> |         /// <summary> | ||||||
|         /// Cache's default maximal asset count. |         /// Cache's default maximal asset count. | ||||||
|         /// </summary> |         /// </summary> | ||||||
|  | @ -115,12 +117,7 @@ namespace OpenSim.Region.CoreModules.Asset | ||||||
|         /// Asset's default expiration time in the cache. |         /// Asset's default expiration time in the cache. | ||||||
|         /// </summary> |         /// </summary> | ||||||
|         public static readonly TimeSpan DefaultExpirationTime = TimeSpan.FromMinutes(30.0); |         public static readonly TimeSpan DefaultExpirationTime = TimeSpan.FromMinutes(30.0); | ||||||
| 
 |          | ||||||
|         /// <summary> |  | ||||||
|         /// Log manager instance. |  | ||||||
|         /// </summary> |  | ||||||
|         private static readonly ILog Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |  | ||||||
| 
 |  | ||||||
|         /// <summary> |         /// <summary> | ||||||
|         /// Cache object. |         /// Cache object. | ||||||
|         /// </summary> |         /// </summary> | ||||||
|  | @ -170,7 +167,7 @@ namespace OpenSim.Region.CoreModules.Asset | ||||||
|         { |         { | ||||||
|             if (maximalSize <= 0 || maximalCount <= 0) |             if (maximalSize <= 0 || maximalCount <= 0) | ||||||
|             { |             { | ||||||
|                 //Log.Debug("[ASSET CACHE]: Cenome asset cache is not enabled."); |                 //m_log.Debug("[ASSET CACHE]: Cenome asset cache is not enabled."); | ||||||
|                 m_enabled = false; |                 m_enabled = false; | ||||||
|                 return; |                 return; | ||||||
|             } |             } | ||||||
|  | @ -186,7 +183,7 @@ namespace OpenSim.Region.CoreModules.Asset | ||||||
|                 CnmSynchronizedCache<string, AssetBase>.Synchronized(new CnmMemoryCache<string, AssetBase>( |                 CnmSynchronizedCache<string, AssetBase>.Synchronized(new CnmMemoryCache<string, AssetBase>( | ||||||
|                     maximalSize, maximalCount, expirationTime)); |                     maximalSize, maximalCount, expirationTime)); | ||||||
|             m_enabled = true; |             m_enabled = true; | ||||||
|             Log.DebugFormat( |             m_log.DebugFormat( | ||||||
|                 "[ASSET CACHE]: Cenome asset cache enabled (MaxSize = {0} bytes, MaxCount = {1}, ExpirationTime = {2})", |                 "[ASSET CACHE]: Cenome asset cache enabled (MaxSize = {0} bytes, MaxCount = {1}, ExpirationTime = {2})", | ||||||
|                 maximalSize, |                 maximalSize, | ||||||
|                 maximalCount, |                 maximalCount, | ||||||
|  | @ -205,6 +202,8 @@ namespace OpenSim.Region.CoreModules.Asset | ||||||
|         { |         { | ||||||
|             if (asset != null) |             if (asset != null) | ||||||
|             { |             { | ||||||
|  | //                m_log.DebugFormat("[CENOME ASSET CACHE]: Caching asset {0}", asset.ID); | ||||||
|  |                  | ||||||
|                 long size = asset.Data != null ? asset.Data.Length : 1; |                 long size = asset.Data != null ? asset.Data.Length : 1; | ||||||
|                 m_cache.Set(asset.ID, asset, size); |                 m_cache.Set(asset.ID, asset, size); | ||||||
|                 m_cachedCount++; |                 m_cachedCount++; | ||||||
|  | @ -255,7 +254,7 @@ namespace OpenSim.Region.CoreModules.Asset | ||||||
| 
 | 
 | ||||||
|             if (m_getCount == m_debugEpoch) |             if (m_getCount == m_debugEpoch) | ||||||
|             { |             { | ||||||
|                 Log.DebugFormat( |                 m_log.DebugFormat( | ||||||
|                     "[ASSET CACHE]: Cached = {0}, Get = {1}, Hits = {2}%, Size = {3} bytes, Avg. A. Size = {4} bytes", |                     "[ASSET CACHE]: Cached = {0}, Get = {1}, Hits = {2}%, Size = {3} bytes, Avg. A. Size = {4} bytes", | ||||||
|                     m_cachedCount, |                     m_cachedCount, | ||||||
|                     m_getCount, |                     m_getCount, | ||||||
|  | @ -267,6 +266,9 @@ namespace OpenSim.Region.CoreModules.Asset | ||||||
|                 m_cachedCount = 0; |                 m_cachedCount = 0; | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|  | //            if (null == assetBase) | ||||||
|  | //                m_log.DebugFormat("[CENOME ASSET CACHE]: Asset {0} not in cache", id); | ||||||
|  |              | ||||||
|             return assetBase; |             return assetBase; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  | @ -325,12 +327,11 @@ namespace OpenSim.Region.CoreModules.Asset | ||||||
|                 return; |                 return; | ||||||
| 
 | 
 | ||||||
|             string name = moduleConfig.GetString("AssetCaching"); |             string name = moduleConfig.GetString("AssetCaching"); | ||||||
|             //Log.DebugFormat("[XXX] name = {0} (this module's name: {1}", name, Name); |             //m_log.DebugFormat("[XXX] name = {0} (this module's name: {1}", name, Name); | ||||||
| 
 | 
 | ||||||
|             if (name != Name) |             if (name != Name) | ||||||
|                 return; |                 return;            | ||||||
| 
 |              | ||||||
|             // This module is used  |  | ||||||
|             long maxSize = DefaultMaxSize; |             long maxSize = DefaultMaxSize; | ||||||
|             int maxCount = DefaultMaxCount; |             int maxCount = DefaultMaxCount; | ||||||
|             TimeSpan expirationTime = DefaultExpirationTime; |             TimeSpan expirationTime = DefaultExpirationTime; | ||||||
|  |  | ||||||
|  | @ -147,7 +147,7 @@ namespace OpenSim.Region.CoreModules.Framework.InterfaceCommander | ||||||
|                             m_args[i].ArgumentValue = Int32.Parse(arg.ToString()); |                             m_args[i].ArgumentValue = Int32.Parse(arg.ToString()); | ||||||
|                             break; |                             break; | ||||||
|                         case "Double": |                         case "Double": | ||||||
|                             m_args[i].ArgumentValue = Double.Parse(arg.ToString()); |                             m_args[i].ArgumentValue = Double.Parse(arg.ToString(), OpenSim.Framework.Culture.NumberFormatInfo); | ||||||
|                             break; |                             break; | ||||||
|                         case "Boolean": |                         case "Boolean": | ||||||
|                             m_args[i].ArgumentValue = Boolean.Parse(arg.ToString()); |                             m_args[i].ArgumentValue = Boolean.Parse(arg.ToString()); | ||||||
|  |  | ||||||
|  | @ -38,12 +38,9 @@ using OpenSim.Services.Interfaces; | ||||||
| 
 | 
 | ||||||
| namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | ||||||
| { | { | ||||||
|     public class LocalAssetServicesConnector : |     public class LocalAssetServicesConnector : ISharedRegionModule, IAssetService | ||||||
|             ISharedRegionModule, IAssetService |  | ||||||
|     { |     { | ||||||
|         private static readonly ILog m_log = |         private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||||||
|                 LogManager.GetLogger( |  | ||||||
|                 MethodBase.GetCurrentMethod().DeclaringType); |  | ||||||
| 
 | 
 | ||||||
|         private IImprovedAssetCache m_Cache = null; |         private IImprovedAssetCache m_Cache = null; | ||||||
| 
 | 
 | ||||||
|  | @ -72,7 +69,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | ||||||
|                     IConfig assetConfig = source.Configs["AssetService"]; |                     IConfig assetConfig = source.Configs["AssetService"]; | ||||||
|                     if (assetConfig == null) |                     if (assetConfig == null) | ||||||
|                     { |                     { | ||||||
|                         m_log.Error("[ASSET CONNECTOR]: AssetService missing from OpenSim.ini"); |                         m_log.Error("[LOCAL ASSET SERVICES CONNECTOR]: AssetService missing from OpenSim.ini"); | ||||||
|                         return; |                         return; | ||||||
|                     } |                     } | ||||||
| 
 | 
 | ||||||
|  | @ -81,22 +78,20 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | ||||||
| 
 | 
 | ||||||
|                     if (serviceDll == String.Empty) |                     if (serviceDll == String.Empty) | ||||||
|                     { |                     { | ||||||
|                         m_log.Error("[ASSET CONNECTOR]: No LocalServiceModule named in section AssetService"); |                         m_log.Error("[LOCAL ASSET SERVICES CONNECTOR]: No LocalServiceModule named in section AssetService"); | ||||||
|                         return; |                         return; | ||||||
|                     } |                     } | ||||||
| 
 | 
 | ||||||
|                     Object[] args = new Object[] { source }; |                     Object[] args = new Object[] { source }; | ||||||
|                     m_AssetService = |                     m_AssetService = ServerUtils.LoadPlugin<IAssetService>(serviceDll, args); | ||||||
|                             ServerUtils.LoadPlugin<IAssetService>(serviceDll, |  | ||||||
|                             args); |  | ||||||
| 
 | 
 | ||||||
|                     if (m_AssetService == null) |                     if (m_AssetService == null) | ||||||
|                     { |                     { | ||||||
|                         m_log.Error("[ASSET CONNECTOR]: Can't load asset service"); |                         m_log.Error("[LOCAL ASSET SERVICES CONNECTOR]: Can't load asset service"); | ||||||
|                         return; |                         return; | ||||||
|                     } |                     } | ||||||
|                     m_Enabled = true; |                     m_Enabled = true; | ||||||
|                     m_log.Info("[ASSET CONNECTOR]: Local asset connector enabled"); |                     m_log.Info("[LOCAL ASSET SERVICES CONNECTOR]: Local asset connector enabled"); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  | @ -134,11 +129,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | ||||||
|                     m_Cache = null; |                     m_Cache = null; | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             m_log.InfoFormat("[ASSET CONNECTOR]: Enabled local assets for region {0}", scene.RegionInfo.RegionName); |             m_log.InfoFormat("[LOCAL ASSET SERVICES CONNECTOR]: Enabled local assets for region {0}", scene.RegionInfo.RegionName); | ||||||
| 
 | 
 | ||||||
|             if (m_Cache != null) |             if (m_Cache != null) | ||||||
|             { |             { | ||||||
|                 m_log.InfoFormat("[ASSET CONNECTOR]: Enabled asset caching for region {0}", scene.RegionInfo.RegionName); |                 m_log.InfoFormat("[LOCAL ASSET SERVICES CONNECTOR]: Enabled asset caching for region {0}", scene.RegionInfo.RegionName); | ||||||
|             } |             } | ||||||
|             else |             else | ||||||
|             { |             { | ||||||
|  | @ -151,6 +146,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | ||||||
| 
 | 
 | ||||||
|         public AssetBase Get(string id) |         public AssetBase Get(string id) | ||||||
|         { |         { | ||||||
|  | //            m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Synchronously requesting asset {0}", id); | ||||||
|  |              | ||||||
|             AssetBase asset = null; |             AssetBase asset = null; | ||||||
|             if (m_Cache != null) |             if (m_Cache != null) | ||||||
|                 asset = m_Cache.Get(id); |                 asset = m_Cache.Get(id); | ||||||
|  | @ -160,7 +157,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | ||||||
|                 asset = m_AssetService.Get(id); |                 asset = m_AssetService.Get(id); | ||||||
|                 if ((m_Cache != null) && (asset != null)) |                 if ((m_Cache != null) && (asset != null)) | ||||||
|                     m_Cache.Cache(asset); |                     m_Cache.Cache(asset); | ||||||
|  | 
 | ||||||
|  | //                if (null == asset) | ||||||
|  | //                    m_log.WarnFormat("[LOCAL ASSET SERVICES CONNECTOR]: Could not synchronously find asset with id {0}", id); | ||||||
|             } |             } | ||||||
|  |              | ||||||
|             return asset; |             return asset; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  | @ -204,15 +205,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | ||||||
| 
 | 
 | ||||||
|         public bool Get(string id, Object sender, AssetRetrieved handler) |         public bool Get(string id, Object sender, AssetRetrieved handler) | ||||||
|         { |         { | ||||||
|             AssetBase asset = null; | //            m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Asynchronously requesting asset {0}", id); | ||||||
|              |                                      | ||||||
|             if (m_Cache != null) |             if (m_Cache != null) | ||||||
|                 m_Cache.Get(id); |  | ||||||
| 
 |  | ||||||
|             if (asset != null) |  | ||||||
|             { |             { | ||||||
|                 Util.FireAndForget(delegate { handler(id, sender, asset); }); |                 AssetBase asset = m_Cache.Get(id); | ||||||
|                 return true; | 
 | ||||||
|  |                 if (asset != null) | ||||||
|  |                 { | ||||||
|  |                     Util.FireAndForget(delegate { handler(id, sender, asset); }); | ||||||
|  |                     return true; | ||||||
|  |                 } | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             return m_AssetService.Get(id, sender, delegate (string assetID, Object s, AssetBase a) |             return m_AssetService.Get(id, sender, delegate (string assetID, Object s, AssetBase a) | ||||||
|  | @ -220,6 +223,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | ||||||
|                 if ((a != null) && (m_Cache != null)) |                 if ((a != null) && (m_Cache != null)) | ||||||
|                     m_Cache.Cache(a); |                     m_Cache.Cache(a); | ||||||
| 
 | 
 | ||||||
|  | //                if (null == a) | ||||||
|  | //                    m_log.WarnFormat("[LOCAL ASSET SERVICES CONNECTOR]: Could not asynchronously find asset with id {0}", id);                 | ||||||
|  | 
 | ||||||
|                 Util.FireAndForget(delegate { handler(assetID, s, a); }); |                 Util.FireAndForget(delegate { handler(assetID, s, a); }); | ||||||
|             }); |             }); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  | @ -73,7 +73,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | ||||||
|                     IConfig inventoryConfig = source.Configs["InventoryService"]; |                     IConfig inventoryConfig = source.Configs["InventoryService"]; | ||||||
|                     if (inventoryConfig == null) |                     if (inventoryConfig == null) | ||||||
|                     { |                     { | ||||||
|                         m_log.Error("[INVENTORY CONNECTOR]: InventoryService missing from OpenSim.ini"); |                         m_log.Error("[LOCAL INVENTORY SERVICES CONNECTOR]: InventoryService missing from OpenSim.ini"); | ||||||
|                         return; |                         return; | ||||||
|                     } |                     } | ||||||
| 
 | 
 | ||||||
|  | @ -81,18 +81,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | ||||||
| 
 | 
 | ||||||
|                     if (serviceDll == String.Empty) |                     if (serviceDll == String.Empty) | ||||||
|                     { |                     { | ||||||
|                         m_log.Error("[INVENTORY CONNECTOR]: No LocalServiceModule named in section InventoryService"); |                         m_log.Error("[LOCAL INVENTORY SERVICES CONNECTOR]: No LocalServiceModule named in section InventoryService"); | ||||||
|                         return; |                         return; | ||||||
|                     } |                     } | ||||||
| 
 | 
 | ||||||
|                     Object[] args = new Object[] { source }; |                     Object[] args = new Object[] { source }; | ||||||
|                     m_log.DebugFormat("[INVENTORY CONNECTOR]: Service dll = {0}", serviceDll); |                     m_log.DebugFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Service dll = {0}", serviceDll); | ||||||
| 
 | 
 | ||||||
|                     m_InventoryService = ServerUtils.LoadPlugin<IInventoryService>(serviceDll, args); |                     m_InventoryService = ServerUtils.LoadPlugin<IInventoryService>(serviceDll, args); | ||||||
| 
 | 
 | ||||||
|                     if (m_InventoryService == null) |                     if (m_InventoryService == null) | ||||||
|                     { |                     { | ||||||
|                         m_log.Error("[INVENTORY CONNECTOR]: Can't load inventory service"); |                         m_log.Error("[LOCAL INVENTORY SERVICES CONNECTOR]: Can't load inventory service"); | ||||||
|                         //return; |                         //return; | ||||||
|                         throw new Exception("Unable to proceed. Please make sure your ini files in config-include are updated according to .example's"); |                         throw new Exception("Unable to proceed. Please make sure your ini files in config-include are updated according to .example's"); | ||||||
|                     } |                     } | ||||||
|  | @ -111,7 +111,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | ||||||
|                     Init(source); |                     Init(source); | ||||||
| 
 | 
 | ||||||
|                     m_Enabled = true; |                     m_Enabled = true; | ||||||
|                     m_log.Info("[INVENTORY CONNECTOR]: Local inventory connector enabled"); |                     m_log.Info("[LOCAL INVENTORY SERVICES CONNECTOR]: Local inventory connector enabled"); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  | @ -138,7 +138,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
| //            m_log.DebugFormat( | //            m_log.DebugFormat( | ||||||
| //                "[INVENTORY CONNECTOR]: Registering IInventoryService to scene {0}", scene.RegionInfo.RegionName); | //                "[LOCAL INVENTORY SERVICES CONNECTOR]: Registering IInventoryService to scene {0}", scene.RegionInfo.RegionName); | ||||||
|              |              | ||||||
|             scene.RegisterModuleInterface<IInventoryService>(this); |             scene.RegisterModuleInterface<IInventoryService>(this); | ||||||
|             m_cache.AddRegion(scene); |             m_cache.AddRegion(scene); | ||||||
|  | @ -158,7 +158,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | ||||||
|                 return; |                 return; | ||||||
| 
 | 
 | ||||||
|             m_log.InfoFormat( |             m_log.InfoFormat( | ||||||
|                 "[INVENTORY CONNECTOR]: Enabled local invnetory for region {0}", scene.RegionInfo.RegionName); |                 "[LOCAL INVENTORY SERVICES CONNECTOR]: Enabled local inventory for region {0}", scene.RegionInfo.RegionName); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         #region IInventoryService |         #region IInventoryService | ||||||
|  | @ -213,7 +213,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | ||||||
|                     return folders; |                     return folders; | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|             m_log.WarnFormat("[INVENTORY CONNECTOR]: System folders for {0} not found", userID); |             m_log.WarnFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: System folders for {0} not found", userID); | ||||||
|             return new Dictionary<AssetType, InventoryFolderBase>(); |             return new Dictionary<AssetType, InventoryFolderBase>(); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  | @ -312,7 +312,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | ||||||
| 
 | 
 | ||||||
|         public override InventoryItemBase GetItem(InventoryItemBase item) |         public override InventoryItemBase GetItem(InventoryItemBase item) | ||||||
|         { |         { | ||||||
|             return m_InventoryService.GetItem(item); | //            m_log.DebugFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Requesting inventory item {0}", item.ID); | ||||||
|  | 
 | ||||||
|  |             item = m_InventoryService.GetItem(item); | ||||||
|  | 
 | ||||||
|  |             if (null == item) | ||||||
|  |                 m_log.ErrorFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Could not find item with id {0}"); | ||||||
|  | 
 | ||||||
|  |             return item; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         public override InventoryFolderBase GetFolder(InventoryFolderBase folder) |         public override InventoryFolderBase GetFolder(InventoryFolderBase folder) | ||||||
|  |  | ||||||
|  | @ -974,8 +974,8 @@ namespace OpenSim.Region.CoreModules.World.Estate | ||||||
|                 if (y == -1 || m_scene.RegionInfo.RegionLocY == y) |                 if (y == -1 || m_scene.RegionInfo.RegionLocY == y) | ||||||
|                 { |                 { | ||||||
|                     int corner = int.Parse(num); |                     int corner = int.Parse(num); | ||||||
|                     float lowValue = float.Parse(min); |                     float lowValue = float.Parse(min, Culture.NumberFormatInfo); | ||||||
|                     float highValue = float.Parse(max); |                     float highValue = float.Parse(max, Culture.NumberFormatInfo); | ||||||
| 
 | 
 | ||||||
|                     m_log.Debug("[ESTATEMODULE] Setting terrain heights " + m_scene.RegionInfo.RegionName + |                     m_log.Debug("[ESTATEMODULE] Setting terrain heights " + m_scene.RegionInfo.RegionName + | ||||||
|                                 string.Format(" (C{0}, {1}-{2}", corner, lowValue, highValue)); |                                 string.Format(" (C{0}, {1}-{2}", corner, lowValue, highValue)); | ||||||
|  |  | ||||||
|  | @ -3147,7 +3147,6 @@ namespace OpenSim.Region.Framework.Scenes | ||||||
|                 m_log.DebugFormat("[APPEARANCE]: Appearance not found in {0}, returning default", RegionInfo.RegionName); |                 m_log.DebugFormat("[APPEARANCE]: Appearance not found in {0}, returning default", RegionInfo.RegionName); | ||||||
|                 appearance = new AvatarAppearance(client.AgentId); |                 appearance = new AvatarAppearance(client.AgentId); | ||||||
|             } |             } | ||||||
| 
 |  | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         /// <summary> |         /// <summary> | ||||||
|  |  | ||||||
|  | @ -2701,6 +2701,8 @@ namespace OpenSim.Region.Framework.Scenes | ||||||
|         /// </summary> |         /// </summary> | ||||||
|         public void SendWearables() |         public void SendWearables() | ||||||
|         { |         { | ||||||
|  |             m_log.DebugFormat("[SCENE]: Received request for wearables of {0}", Name); | ||||||
|  |              | ||||||
|             ControllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); |             ControllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -104,9 +104,9 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | ||||||
|                 this.m_name = field[1].Trim(); |                 this.m_name = field[1].Trim(); | ||||||
|                 this.m_frozen = (copsedef[0] == 'F'); |                 this.m_frozen = (copsedef[0] == 'F'); | ||||||
|                 this.m_tree_quantity = int.Parse(field[2]); |                 this.m_tree_quantity = int.Parse(field[2]); | ||||||
|                 this.m_treeline_high = float.Parse(field[3]); |                 this.m_treeline_high = float.Parse(field[3], Culture.NumberFormatInfo); | ||||||
|                 this.m_treeline_low = float.Parse(field[4]); |                 this.m_treeline_low = float.Parse(field[4], Culture.NumberFormatInfo); | ||||||
|                 this.m_range = double.Parse(field[5]); |                 this.m_range = double.Parse(field[5], Culture.NumberFormatInfo); | ||||||
|                 this.m_tree_type = (Tree) Enum.Parse(typeof(Tree),field[6]); |                 this.m_tree_type = (Tree) Enum.Parse(typeof(Tree),field[6]); | ||||||
|                 this.m_seed_point = Vector3.Parse(field[7]); |                 this.m_seed_point = Vector3.Parse(field[7]); | ||||||
|                 this.m_initial_scale = Vector3.Parse(field[8]); |                 this.m_initial_scale = Vector3.Parse(field[8]); | ||||||
|  |  | ||||||
|  | @ -389,7 +389,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | ||||||
|                         break; |                         break; | ||||||
|                     case "MinEventDelay": |                     case "MinEventDelay": | ||||||
|                         double minEventDelay = 0.0; |                         double minEventDelay = 0.0; | ||||||
|                         double.TryParse(part.InnerText, out minEventDelay); |                         double.TryParse(part.InnerText, NumberStyles.Float, Culture.NumberFormatInfo, out minEventDelay); | ||||||
|                         instance.MinEventDelay = minEventDelay; |                         instance.MinEventDelay = minEventDelay; | ||||||
|                         break; |                         break; | ||||||
|                 } |                 } | ||||||
|  |  | ||||||
|  | @ -72,9 +72,9 @@ namespace OpenSim.Region.ScriptEngine.Shared | ||||||
|                     return; |                     return; | ||||||
|                 } |                 } | ||||||
|                 bool res; |                 bool res; | ||||||
|                 res = Double.TryParse(tmps[0], out x); |                 res = Double.TryParse(tmps[0], NumberStyles.Float, Culture.NumberFormatInfo, out x); | ||||||
|                 res = res & Double.TryParse(tmps[1], out y); |                 res = res & Double.TryParse(tmps[1], NumberStyles.Float, Culture.NumberFormatInfo, out y); | ||||||
|                 res = res & Double.TryParse(tmps[2], out z); |                 res = res & Double.TryParse(tmps[2], NumberStyles.Float, Culture.NumberFormatInfo, out z); | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             #endregion |             #endregion | ||||||
|  | @ -309,10 +309,10 @@ namespace OpenSim.Region.ScriptEngine.Shared | ||||||
|                     return; |                     return; | ||||||
|                 } |                 } | ||||||
|                 bool res; |                 bool res; | ||||||
|                 res = Double.TryParse(tmps[0], NumberStyles.Float, Culture.FormatProvider, out x); |                 res = Double.TryParse(tmps[0], NumberStyles.Float, Culture.NumberFormatInfo, out x); | ||||||
|                 res = res & Double.TryParse(tmps[1], NumberStyles.Float, Culture.FormatProvider, out y); |                 res = res & Double.TryParse(tmps[1], NumberStyles.Float, Culture.NumberFormatInfo, out y); | ||||||
|                 res = res & Double.TryParse(tmps[2], NumberStyles.Float, Culture.FormatProvider, out z); |                 res = res & Double.TryParse(tmps[2], NumberStyles.Float, Culture.NumberFormatInfo, out z); | ||||||
|                 res = res & Double.TryParse(tmps[3], NumberStyles.Float, Culture.FormatProvider, out s); |                 res = res & Double.TryParse(tmps[3], NumberStyles.Float, Culture.NumberFormatInfo, out s); | ||||||
|                 if (x == 0 && y == 0 && z == 0 && s == 0) |                 if (x == 0 && y == 0 && z == 0 && s == 0) | ||||||
|                     s = 1; |                     s = 1; | ||||||
|             } |             } | ||||||
|  | @ -1015,7 +1015,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | ||||||
|                 double entry; |                 double entry; | ||||||
|                 for (int i = 0; i < Data.Length; i++) |                 for (int i = 0; i < Data.Length; i++) | ||||||
|                 { |                 { | ||||||
|                     if (double.TryParse(Data[i].ToString(), out entry)) |                     if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry)) | ||||||
|                     { |                     { | ||||||
|                         if (entry < minimum) minimum = entry; |                         if (entry < minimum) minimum = entry; | ||||||
|                     } |                     } | ||||||
|  | @ -1029,7 +1029,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | ||||||
|                 double entry; |                 double entry; | ||||||
|                 for (int i = 0; i < Data.Length; i++) |                 for (int i = 0; i < Data.Length; i++) | ||||||
|                 { |                 { | ||||||
|                     if (double.TryParse(Data[i].ToString(), out entry)) |                     if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry)) | ||||||
|                     { |                     { | ||||||
|                         if (entry > maximum) maximum = entry; |                         if (entry > maximum) maximum = entry; | ||||||
|                     } |                     } | ||||||
|  | @ -1048,7 +1048,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | ||||||
|                 double entry; |                 double entry; | ||||||
|                 for (int i = 0; i < Data.Length; i++) |                 for (int i = 0; i < Data.Length; i++) | ||||||
|                 { |                 { | ||||||
|                     if (double.TryParse(Data[i].ToString(), out entry)) |                     if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry)) | ||||||
|                     { |                     { | ||||||
|                         count++; |                         count++; | ||||||
|                     } |                     } | ||||||
|  | @ -1062,7 +1062,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | ||||||
|                 double entry; |                 double entry; | ||||||
|                 for (int i = 0; i < src.Data.Length - 1; i++) |                 for (int i = 0; i < src.Data.Length - 1; i++) | ||||||
|                 { |                 { | ||||||
|                     if (double.TryParse(src.Data[i].ToString(), out entry)) |                     if (double.TryParse(src.Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry)) | ||||||
|                     { |                     { | ||||||
|                         ret.Add(entry); |                         ret.Add(entry); | ||||||
|                     } |                     } | ||||||
|  | @ -1076,7 +1076,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | ||||||
|                 double entry; |                 double entry; | ||||||
|                 for (int i = 0; i < Data.Length; i++) |                 for (int i = 0; i < Data.Length; i++) | ||||||
|                 { |                 { | ||||||
|                     if (double.TryParse(Data[i].ToString(), out entry)) |                     if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry)) | ||||||
|                     { |                     { | ||||||
|                         sum = sum + entry; |                         sum = sum + entry; | ||||||
|                     } |                     } | ||||||
|  | @ -1090,7 +1090,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | ||||||
|                 double entry; |                 double entry; | ||||||
|                 for (int i = 0; i < Data.Length; i++) |                 for (int i = 0; i < Data.Length; i++) | ||||||
|                 { |                 { | ||||||
|                     if (double.TryParse(Data[i].ToString(), out entry)) |                     if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry)) | ||||||
|                     { |                     { | ||||||
|                         sum = sum + Math.Pow(entry, 2); |                         sum = sum + Math.Pow(entry, 2); | ||||||
|                     } |                     } | ||||||
|  | @ -1213,11 +1213,11 @@ namespace OpenSim.Region.ScriptEngine.Shared | ||||||
|                 { |                 { | ||||||
|                     double a; |                     double a; | ||||||
|                     double b; |                     double b; | ||||||
|                     if (!double.TryParse(x.ToString(), out a)) |                     if (!double.TryParse(x.ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out a)) | ||||||
|                     { |                     { | ||||||
|                         a = 0.0; |                         a = 0.0; | ||||||
|                     } |                     } | ||||||
|                     if (!double.TryParse(y.ToString(), out b)) |                     if (!double.TryParse(y.ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out b)) | ||||||
|                     { |                     { | ||||||
|                         b = 0.0; |                         b = 0.0; | ||||||
|                     } |                     } | ||||||
|  | @ -1857,7 +1857,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | ||||||
|                     else |                     else | ||||||
|                         if (v.EndsWith(".")) |                         if (v.EndsWith(".")) | ||||||
|                             v = v + "0"; |                             v = v + "0"; | ||||||
|                 this.value = double.Parse(v, System.Globalization.NumberStyles.Float, Culture.FormatProvider); |                 this.value = double.Parse(v, System.Globalization.NumberStyles.Float, Culture.NumberFormatInfo); | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             #endregion |             #endregion | ||||||
|  |  | ||||||
|  | @ -132,9 +132,9 @@ namespace OpenSim.Server.Handlers.Grid | ||||||
|             userData.SurName = (string)requestData["lastname"]; |             userData.SurName = (string)requestData["lastname"]; | ||||||
|             userData.ID = new UUID((string)requestData["agent_id"]); |             userData.ID = new UUID((string)requestData["agent_id"]); | ||||||
|             UUID sessionID = new UUID((string)requestData["session_id"]); |             UUID sessionID = new UUID((string)requestData["session_id"]); | ||||||
|             userData.HomeLocation = new Vector3((float)Convert.ToDecimal((string)requestData["startpos_x"]), |             userData.HomeLocation = new Vector3((float)Convert.ToDecimal((string)requestData["startpos_x"], Culture.NumberFormatInfo), | ||||||
|                                   (float)Convert.ToDecimal((string)requestData["startpos_y"]), |                                   (float)Convert.ToDecimal((string)requestData["startpos_y"], Culture.NumberFormatInfo), | ||||||
|                                   (float)Convert.ToDecimal((string)requestData["startpos_z"])); |                                   (float)Convert.ToDecimal((string)requestData["startpos_z"], Culture.NumberFormatInfo)); | ||||||
| 
 | 
 | ||||||
|             userData.UserServerURI = (string)requestData["userserver_id"]; |             userData.UserServerURI = (string)requestData["userserver_id"]; | ||||||
|             userData.UserAssetURI = (string)requestData["assetserver_id"]; |             userData.UserAssetURI = (string)requestData["assetserver_id"]; | ||||||
|  |  | ||||||
|  | @ -76,17 +76,19 @@ namespace OpenSim.Services.AssetService | ||||||
|                             }); |                             }); | ||||||
|                 } |                 } | ||||||
|                  |                  | ||||||
|                 m_log.Info("[ASSET CONNECTOR]: Local asset service enabled"); |                 m_log.Info("[ASSET SERVICE]: Local asset service enabled"); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         public AssetBase Get(string id) |         public AssetBase Get(string id) | ||||||
|         { |         {                         | ||||||
|             //m_log.DebugFormat("[ASSET SERVICE]: Get asset {0}", id); |  | ||||||
|             UUID assetID; |             UUID assetID; | ||||||
| 
 | 
 | ||||||
|             if (!UUID.TryParse(id, out assetID)) |             if (!UUID.TryParse(id, out assetID)) | ||||||
|  |             { | ||||||
|  |                 m_log.WarnFormat("[ASSET SERVICE]: Could not parse requested sset id {0}", id);                 | ||||||
|                 return null; |                 return null; | ||||||
|  |             } | ||||||
| 
 | 
 | ||||||
|             return m_Database.GetAsset(assetID); |             return m_Database.GetAsset(assetID); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  | @ -93,7 +93,7 @@ namespace OpenSim.Services.Connectors | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         public AssetBase Get(string id) |         public AssetBase Get(string id) | ||||||
|         { |         {             | ||||||
|             string uri = m_ServerURI + "/assets/" + id; |             string uri = m_ServerURI + "/assets/" + id; | ||||||
| 
 | 
 | ||||||
|             AssetBase asset = null; |             AssetBase asset = null; | ||||||
|  |  | ||||||
|  | @ -1,3 +1,30 @@ | ||||||
|  | /* | ||||||
|  |  * Copyright (c) Contributors, http://opensimulator.org/ | ||||||
|  |  * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||||||
|  |  * | ||||||
|  |  * Redistribution and use in source and binary forms, with or without | ||||||
|  |  * modification, are permitted provided that the following conditions are met: | ||||||
|  |  *     * Redistributions of source code must retain the above copyright | ||||||
|  |  *       notice, this list of conditions and the following disclaimer. | ||||||
|  |  *     * Redistributions in binary form must reproduce the above copyright | ||||||
|  |  *       notice, this list of conditions and the following disclaimer in the | ||||||
|  |  *       documentation and/or other materials provided with the distribution. | ||||||
|  |  *     * Neither the name of the OpenSimulator Project nor the | ||||||
|  |  *       names of its contributors may be used to endorse or promote products | ||||||
|  |  *       derived from this software without specific prior written permission. | ||||||
|  |  * | ||||||
|  |  * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||||||
|  |  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||||||
|  |  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||||||
|  |  * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||||||
|  |  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||||||
|  |  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||||||
|  |  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||||||
|  |  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||||||
|  |  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||||||
|  |  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||||
|  |  */ | ||||||
|  | 
 | ||||||
| using System; | using System; | ||||||
| using System.Collections.Generic; | using System.Collections.Generic; | ||||||
| using System.IO; | using System.IO; | ||||||
|  | @ -7,7 +34,7 @@ using System.Xml; | ||||||
| using log4net; | using log4net; | ||||||
| using Nini.Config; | using Nini.Config; | ||||||
| 
 | 
 | ||||||
| namespace Careminster | namespace OpenSim.Tools.Configger | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Loads the Configuration files into nIni |     /// Loads the Configuration files into nIni | ||||||
|  |  | ||||||
|  | @ -1,7 +1,34 @@ | ||||||
|  | /* | ||||||
|  |  * Copyright (c) Contributors, http://opensimulator.org/ | ||||||
|  |  * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||||||
|  |  * | ||||||
|  |  * Redistribution and use in source and binary forms, with or without | ||||||
|  |  * modification, are permitted provided that the following conditions are met: | ||||||
|  |  *     * Redistributions of source code must retain the above copyright | ||||||
|  |  *       notice, this list of conditions and the following disclaimer. | ||||||
|  |  *     * Redistributions in binary form must reproduce the above copyright | ||||||
|  |  *       notice, this list of conditions and the following disclaimer in the | ||||||
|  |  *       documentation and/or other materials provided with the distribution. | ||||||
|  |  *     * Neither the name of the OpenSimulator Project nor the | ||||||
|  |  *       names of its contributors may be used to endorse or promote products | ||||||
|  |  *       derived from this software without specific prior written permission. | ||||||
|  |  * | ||||||
|  |  * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||||||
|  |  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||||||
|  |  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||||||
|  |  * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||||||
|  |  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||||||
|  |  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||||||
|  |  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||||||
|  |  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||||||
|  |  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||||||
|  |  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||||
|  |  */ | ||||||
|  | 
 | ||||||
| using Nini.Config; | using Nini.Config; | ||||||
| using System; | using System; | ||||||
| 
 | 
 | ||||||
| namespace Careminster | namespace OpenSim.Tools.Configger | ||||||
| { | { | ||||||
|     public class Configger |     public class Configger | ||||||
|     { |     { | ||||||
|  |  | ||||||
|  | @ -1,3 +1,30 @@ | ||||||
|  | /* | ||||||
|  |  * Copyright (c) Contributors, http://opensimulator.org/ | ||||||
|  |  * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||||||
|  |  * | ||||||
|  |  * Redistribution and use in source and binary forms, with or without | ||||||
|  |  * modification, are permitted provided that the following conditions are met: | ||||||
|  |  *     * Redistributions of source code must retain the above copyright | ||||||
|  |  *       notice, this list of conditions and the following disclaimer. | ||||||
|  |  *     * Redistributions in binary form must reproduce the above copyright | ||||||
|  |  *       notice, this list of conditions and the following disclaimer in the | ||||||
|  |  *       documentation and/or other materials provided with the distribution. | ||||||
|  |  *     * Neither the name of the OpenSimulator Project nor the | ||||||
|  |  *       names of its contributors may be used to endorse or promote products | ||||||
|  |  *       derived from this software without specific prior written permission. | ||||||
|  |  * | ||||||
|  |  * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||||||
|  |  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||||||
|  |  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||||||
|  |  * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||||||
|  |  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||||||
|  |  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||||||
|  |  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||||||
|  |  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||||||
|  |  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||||||
|  |  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||||
|  |  */ | ||||||
|  | 
 | ||||||
| using System; | using System; | ||||||
| using System.Collections; | using System.Collections; | ||||||
| using System.Collections.Generic; | using System.Collections.Generic; | ||||||
|  | @ -13,7 +40,7 @@ using System.Threading; | ||||||
| using log4net; | using log4net; | ||||||
| using Nini.Config; | using Nini.Config; | ||||||
| 
 | 
 | ||||||
| namespace Careminster | namespace OpenSim.Tools.Configger | ||||||
| { | { | ||||||
|     public static class Util |     public static class Util | ||||||
|     { |     { | ||||||
|  |  | ||||||
|  | @ -2930,6 +2930,7 @@ | ||||||
| 
 | 
 | ||||||
|       <ReferencePath>../../../bin/</ReferencePath> |       <ReferencePath>../../../bin/</ReferencePath> | ||||||
|       <Reference name="System"/> |       <Reference name="System"/> | ||||||
|  |       <Reference name="System.Xml"/> | ||||||
|       <Reference name="Nini.dll"/> |       <Reference name="Nini.dll"/> | ||||||
|       <Reference name="log4net.dll"/> |       <Reference name="log4net.dll"/> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Melanie
						Melanie