From 8643db3ef0c4dca709d85fc37240a18fd9049520 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 19 Jun 2010 22:48:43 +0100 Subject: This is a HACK! Downright nasty. For some reason, the devs of the mysql connector have decided that their vision of timeouts is the only valid one. This uses reflection to show them the finger. Please test. --- OpenSim/Data/MySQL/MySQLMigrations.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Data/MySQL/MySQLMigrations.cs b/OpenSim/Data/MySQL/MySQLMigrations.cs index 81a0e83..b6f714c 100644 --- a/OpenSim/Data/MySQL/MySQLMigrations.cs +++ b/OpenSim/Data/MySQL/MySQLMigrations.cs @@ -66,6 +66,12 @@ namespace OpenSim.Data.MySQL return; } + MySqlConnection c = (MySqlConnection)conn; + + Type tc = c.GetType(); + MethodInfo miSetCommandTimeout = tc.GetMethod("SetCommandTimeout", BindingFlags.NonPublic | BindingFlags.Instance); + MethodInfo miClearCommandTimeout = tc.GetMethod("ClearCommandTimeout", BindingFlags.NonPublic | BindingFlags.Instance); + miSetCommandTimeout.Invoke(c, new Object[] { 2147483 }); // INT_MAX / 1000; MySqlScript scr = new MySqlScript((MySqlConnection)conn); { foreach (string sql in script) @@ -78,6 +84,7 @@ namespace OpenSim.Data.MySQL scr.Execute(); } } + miClearCommandTimeout.Invoke(c, new Object[] { }); } } } -- cgit v1.1 From a3ebd4db3fce78544a7d0f0069b4aa386ff605e8 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 19 Jun 2010 23:45:56 +0100 Subject: Revert "This is a HACK! Downright nasty. For some reason, the devs of the mysql" Didn't do what it said on the package! This reverts commit 8643db3ef0c4dca709d85fc37240a18fd9049520. --- OpenSim/Data/MySQL/MySQLMigrations.cs | 7 ------- 1 file changed, 7 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Data/MySQL/MySQLMigrations.cs b/OpenSim/Data/MySQL/MySQLMigrations.cs index b6f714c..81a0e83 100644 --- a/OpenSim/Data/MySQL/MySQLMigrations.cs +++ b/OpenSim/Data/MySQL/MySQLMigrations.cs @@ -66,12 +66,6 @@ namespace OpenSim.Data.MySQL return; } - MySqlConnection c = (MySqlConnection)conn; - - Type tc = c.GetType(); - MethodInfo miSetCommandTimeout = tc.GetMethod("SetCommandTimeout", BindingFlags.NonPublic | BindingFlags.Instance); - MethodInfo miClearCommandTimeout = tc.GetMethod("ClearCommandTimeout", BindingFlags.NonPublic | BindingFlags.Instance); - miSetCommandTimeout.Invoke(c, new Object[] { 2147483 }); // INT_MAX / 1000; MySqlScript scr = new MySqlScript((MySqlConnection)conn); { foreach (string sql in script) @@ -84,7 +78,6 @@ namespace OpenSim.Data.MySQL scr.Execute(); } } - miClearCommandTimeout.Invoke(c, new Object[] { }); } } } -- cgit v1.1 From c571c33b6b0ace77e3626556ee1e048e588a3705 Mon Sep 17 00:00:00 2001 From: dahlia Date: Sat, 19 Jun 2010 16:07:35 -0700 Subject: fix faulty profile cut parameter checking in llSetPrimitiveParams() - see Mantis #4510 --- .../Shared/Api/Implementation/LSL_Api.cs | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 59ab26b..86d0c30 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -6516,10 +6516,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (cut.y > 1f) { cut.y = 1f; - } - if (cut.y - cut.x < 0.05f) - { - cut.x = cut.y - 0.05f; + } + if (cut.y - cut.x < 0.05f) + { + cut.x = cut.y - 0.05f; + if (cut.x < 0.0f) + { + cut.x = 0.0f; + cut.y = 0.05f; + } } shapeBlock.ProfileBegin = (ushort)(50000 * cut.x); shapeBlock.ProfileEnd = (ushort)(50000 * (1 - cut.y)); @@ -6715,9 +6720,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { profilecut.y = 1f; } - if (profilecut.y - cut.x < 0.05f) + if (profilecut.y - profilecut.x < 0.05f) { - profilecut.x = cut.y - 0.05f; + profilecut.x = profilecut.y - 0.05f; + if (profilecut.x < 0.0f) + { + profilecut.x = 0.0f; + profilecut.y = 0.05f; + } } shapeBlock.ProfileBegin = (ushort)(50000 * profilecut.x); shapeBlock.ProfileEnd = (ushort)(50000 * (1 - profilecut.y)); -- cgit v1.1 From 1e1485de5b48248ffeec75e49e792b321164c547 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Tue, 22 Jun 2010 16:09:30 -0700 Subject: * Fixed SimianGrid map tile uploads not having any objects in the images --- .../SimianAuthenticationServiceConnector.cs | 2 ++ .../SimianGrid/SimianGridServiceConnector.cs | 32 +++++++++++++++++++--- 2 files changed, 30 insertions(+), 4 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs index 3c784f2..7a96a05 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs @@ -198,6 +198,8 @@ namespace OpenSim.Services.Connectors.SimianGrid if (!String.IsNullOrEmpty(identifier)) { // Add/update the md5hash identity + // TODO: Support salts when AddIdentity does + // TODO: Create an a1hash too for WebDAV logins requestArgs = new NameValueCollection { { "RequestMethod", "AddIdentity" }, diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs index db9027a..bea8172 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs @@ -59,18 +59,35 @@ namespace OpenSim.Services.Connectors.SimianGrid MethodBase.GetCurrentMethod().DeclaringType); private string m_serverUrl = String.Empty; + private Dictionary m_scenes = new Dictionary(); #region ISharedRegionModule public Type ReplaceableInterface { get { return null; } } - public void RegionLoaded(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { UploadMapTile(scene); } } + public void RegionLoaded(Scene scene) { } public void PostInitialise() { } public void Close() { } public SimianGridServiceConnector() { } public string Name { get { return "SimianGridServiceConnector"; } } - public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface(this); } } - public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface(this); } } + public void AddRegion(Scene scene) + { + // Every shared region module has to maintain an indepedent list of + // currently running regions + lock (m_scenes) + m_scenes[scene.RegionInfo.RegionID] = scene; + + if (!String.IsNullOrEmpty(m_serverUrl)) + scene.RegisterModuleInterface(this); + } + public void RemoveRegion(Scene scene) + { + lock (m_scenes) + m_scenes.Remove(scene.RegionInfo.RegionID); + + if (!String.IsNullOrEmpty(m_serverUrl)) + scene.UnregisterModuleInterface(this); + } #endregion ISharedRegionModule @@ -105,6 +122,13 @@ namespace OpenSim.Services.Connectors.SimianGrid public string RegisterRegion(UUID scopeID, GridRegion regionInfo) { + // Generate and upload our map tile in PNG format to the SimianGrid AddMapTile service + Scene scene; + if (m_scenes.TryGetValue(regionInfo.RegionID, out scene)) + UploadMapTile(scene); + else + m_log.Warn("Registering region " + regionInfo.RegionName + " (" + regionInfo.RegionID + ") that we are not tracking"); + Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0); Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, 4096.0); @@ -430,7 +454,7 @@ namespace OpenSim.Services.Connectors.SimianGrid if (!String.IsNullOrEmpty(errorMessage)) { m_log.WarnFormat("[SIMIAN GRID CONNECTOR]: Failed to store {0} byte PNG map tile for {1}: {2}", - pngData.Length, scene.RegionInfo.RegionName, errorMessage); + pngData.Length, scene.RegionInfo.RegionName, errorMessage.Replace('\n', ' ')); } } -- cgit v1.1