aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2010-06-22 23:38:56 +0100
committerMelanie2010-06-22 23:38:56 +0100
commit317ac50a973f43c87cc7d48bde07e2a5e819d3c2 (patch)
tree0460fdf987f317c6ec5a2f79a36761fb60f25f9b /OpenSim
parentSecurity fix: Allow only textures to be fetched using HTTP texture cap (diff)
parent* Fixed SimianGrid map tile uploads not having any objects in the images (diff)
downloadopensim-SC-317ac50a973f43c87cc7d48bde07e2a5e819d3c2.zip
opensim-SC-317ac50a973f43c87cc7d48bde07e2a5e819d3c2.tar.gz
opensim-SC-317ac50a973f43c87cc7d48bde07e2a5e819d3c2.tar.bz2
opensim-SC-317ac50a973f43c87cc7d48bde07e2a5e819d3c2.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs22
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs2
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs32
3 files changed, 46 insertions, 10 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 5c6d382..7e57603 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -6889,10 +6889,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6889 if (cut.y > 1f) 6889 if (cut.y > 1f)
6890 { 6890 {
6891 cut.y = 1f; 6891 cut.y = 1f;
6892 } 6892 }
6893 if (cut.y - cut.x < 0.05f) 6893 if (cut.y - cut.x < 0.05f)
6894 { 6894 {
6895 cut.x = cut.y - 0.05f; 6895 cut.x = cut.y - 0.05f;
6896 if (cut.x < 0.0f)
6897 {
6898 cut.x = 0.0f;
6899 cut.y = 0.05f;
6900 }
6896 } 6901 }
6897 shapeBlock.ProfileBegin = (ushort)(50000 * cut.x); 6902 shapeBlock.ProfileBegin = (ushort)(50000 * cut.x);
6898 shapeBlock.ProfileEnd = (ushort)(50000 * (1 - cut.y)); 6903 shapeBlock.ProfileEnd = (ushort)(50000 * (1 - cut.y));
@@ -7097,9 +7102,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7097 { 7102 {
7098 profilecut.y = 1f; 7103 profilecut.y = 1f;
7099 } 7104 }
7100 if (profilecut.y - cut.x < 0.05f) 7105 if (profilecut.y - profilecut.x < 0.05f)
7101 { 7106 {
7102 profilecut.x = cut.y - 0.05f; 7107 profilecut.x = profilecut.y - 0.05f;
7108 if (profilecut.x < 0.0f)
7109 {
7110 profilecut.x = 0.0f;
7111 profilecut.y = 0.05f;
7112 }
7103 } 7113 }
7104 shapeBlock.ProfileBegin = (ushort)(50000 * profilecut.x); 7114 shapeBlock.ProfileBegin = (ushort)(50000 * profilecut.x);
7105 shapeBlock.ProfileEnd = (ushort)(50000 * (1 - profilecut.y)); 7115 shapeBlock.ProfileEnd = (ushort)(50000 * (1 - profilecut.y));
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
198 if (!String.IsNullOrEmpty(identifier)) 198 if (!String.IsNullOrEmpty(identifier))
199 { 199 {
200 // Add/update the md5hash identity 200 // Add/update the md5hash identity
201 // TODO: Support salts when AddIdentity does
202 // TODO: Create an a1hash too for WebDAV logins
201 requestArgs = new NameValueCollection 203 requestArgs = new NameValueCollection
202 { 204 {
203 { "RequestMethod", "AddIdentity" }, 205 { "RequestMethod", "AddIdentity" },
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
index 6a61da6..496eb2c 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
@@ -59,18 +59,35 @@ namespace OpenSim.Services.Connectors.SimianGrid
59 MethodBase.GetCurrentMethod().DeclaringType); 59 MethodBase.GetCurrentMethod().DeclaringType);
60 60
61 private string m_serverUrl = String.Empty; 61 private string m_serverUrl = String.Empty;
62 private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
62 63
63 #region ISharedRegionModule 64 #region ISharedRegionModule
64 65
65 public Type ReplaceableInterface { get { return null; } } 66 public Type ReplaceableInterface { get { return null; } }
66 public void RegionLoaded(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { UploadMapTile(scene); } } 67 public void RegionLoaded(Scene scene) { }
67 public void PostInitialise() { } 68 public void PostInitialise() { }
68 public void Close() { } 69 public void Close() { }
69 70
70 public SimianGridServiceConnector() { } 71 public SimianGridServiceConnector() { }
71 public string Name { get { return "SimianGridServiceConnector"; } } 72 public string Name { get { return "SimianGridServiceConnector"; } }
72 public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IGridService>(this); } } 73 public void AddRegion(Scene scene)
73 public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IGridService>(this); } } 74 {
75 // Every shared region module has to maintain an indepedent list of
76 // currently running regions
77 lock (m_scenes)
78 m_scenes[scene.RegionInfo.RegionID] = scene;
79
80 if (!String.IsNullOrEmpty(m_serverUrl))
81 scene.RegisterModuleInterface<IGridService>(this);
82 }
83 public void RemoveRegion(Scene scene)
84 {
85 lock (m_scenes)
86 m_scenes.Remove(scene.RegionInfo.RegionID);
87
88 if (!String.IsNullOrEmpty(m_serverUrl))
89 scene.UnregisterModuleInterface<IGridService>(this);
90 }
74 91
75 #endregion ISharedRegionModule 92 #endregion ISharedRegionModule
76 93
@@ -107,6 +124,13 @@ namespace OpenSim.Services.Connectors.SimianGrid
107 { 124 {
108 IPEndPoint ext = regionInfo.ExternalEndPoint; 125 IPEndPoint ext = regionInfo.ExternalEndPoint;
109 if (ext == null) return "Region registration for " + regionInfo.RegionName + " failed: Could not resolve EndPoint"; 126 if (ext == null) return "Region registration for " + regionInfo.RegionName + " failed: Could not resolve EndPoint";
127 // Generate and upload our map tile in PNG format to the SimianGrid AddMapTile service
128 Scene scene;
129 if (m_scenes.TryGetValue(regionInfo.RegionID, out scene))
130 UploadMapTile(scene);
131 else
132 m_log.Warn("Registering region " + regionInfo.RegionName + " (" + regionInfo.RegionID + ") that we are not tracking");
133
110 Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0); 134 Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0);
111 Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, 4096.0); 135 Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, 4096.0);
112 136
@@ -432,7 +456,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
432 if (!String.IsNullOrEmpty(errorMessage)) 456 if (!String.IsNullOrEmpty(errorMessage))
433 { 457 {
434 m_log.WarnFormat("[SIMIAN GRID CONNECTOR]: Failed to store {0} byte PNG map tile for {1}: {2}", 458 m_log.WarnFormat("[SIMIAN GRID CONNECTOR]: Failed to store {0} byte PNG map tile for {1}: {2}",
435 pngData.Length, scene.RegionInfo.RegionName, errorMessage); 459 pngData.Length, scene.RegionInfo.RegionName, errorMessage.Replace('\n', ' '));
436 } 460 }
437 } 461 }
438 462