aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-06-23 01:22:42 +0100
committerJustin Clark-Casey (justincc)2010-06-23 01:22:42 +0100
commit1719dc9a9b6f87c006c04997005e83c66b134075 (patch)
tree686d63018385842ace3a614fdd1a05d16806ed63
parentadd new [RemoteAdmin] settings from Snoopy's create/update, etc user patch to... (diff)
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC-1719dc9a9b6f87c006c04997005e83c66b134075.zip
opensim-SC-1719dc9a9b6f87c006c04997005e83c66b134075.tar.gz
opensim-SC-1719dc9a9b6f87c006c04997005e83c66b134075.tar.bz2
opensim-SC-1719dc9a9b6f87c006c04997005e83c66b134075.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs12
-rw-r--r--OpenSim/Region/Framework/Scenes/Prioritizer.cs3
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs28
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs2
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs32
5 files changed, 59 insertions, 18 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs b/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
index f8e3d59..75efb79 100644
--- a/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
@@ -131,6 +131,12 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
131 131
132 if (texture != null) 132 if (texture != null)
133 { 133 {
134 if (texture.Type != (sbyte)AssetType.Texture)
135 {
136 httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound;
137 httpResponse.Send();
138 return null;
139 }
134 SendTexture(httpRequest, httpResponse, texture); 140 SendTexture(httpRequest, httpResponse, texture);
135 } 141 }
136 else 142 else
@@ -147,6 +153,12 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
147 153
148 if (texture != null) 154 if (texture != null)
149 { 155 {
156 if (texture.Type != (sbyte)AssetType.Texture)
157 {
158 httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound;
159 httpResponse.Send();
160 return null;
161 }
150 SendTexture(httpRequest, httpResponse, texture); 162 SendTexture(httpRequest, httpResponse, texture);
151 } 163 }
152 else 164 else
diff --git a/OpenSim/Region/Framework/Scenes/Prioritizer.cs b/OpenSim/Region/Framework/Scenes/Prioritizer.cs
index 7b7677b..de3c360 100644
--- a/OpenSim/Region/Framework/Scenes/Prioritizer.cs
+++ b/OpenSim/Region/Framework/Scenes/Prioritizer.cs
@@ -52,6 +52,9 @@ namespace OpenSim.Region.Framework.Scenes
52 public double GetUpdatePriority(IClientAPI client, ISceneEntity entity) 52 public double GetUpdatePriority(IClientAPI client, ISceneEntity entity)
53 { 53 {
54 double priority = 0; 54 double priority = 0;
55
56 if (entity == null)
57 return 100000;
55 58
56 switch (m_scene.UpdatePrioritizationScheme) 59 switch (m_scene.UpdatePrioritizationScheme)
57 { 60 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 86d0c30..1feb153 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -6516,15 +6516,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6516 if (cut.y > 1f) 6516 if (cut.y > 1f)
6517 { 6517 {
6518 cut.y = 1f; 6518 cut.y = 1f;
6519 } 6519 }
6520 if (cut.y - cut.x < 0.05f) 6520 if (cut.y - cut.x < 0.05f)
6521 { 6521 {
6522 cut.x = cut.y - 0.05f; 6522 cut.x = cut.y - 0.05f;
6523 if (cut.x < 0.0f) 6523 if (cut.x < 0.0f)
6524 { 6524 {
6525 cut.x = 0.0f; 6525 cut.x = 0.0f;
6526 cut.y = 0.05f; 6526 cut.y = 0.05f;
6527 } 6527 }
6528 } 6528 }
6529 shapeBlock.ProfileBegin = (ushort)(50000 * cut.x); 6529 shapeBlock.ProfileBegin = (ushort)(50000 * cut.x);
6530 shapeBlock.ProfileEnd = (ushort)(50000 * (1 - cut.y)); 6530 shapeBlock.ProfileEnd = (ushort)(50000 * (1 - cut.y));
@@ -6722,11 +6722,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6722 } 6722 }
6723 if (profilecut.y - profilecut.x < 0.05f) 6723 if (profilecut.y - profilecut.x < 0.05f)
6724 { 6724 {
6725 profilecut.x = profilecut.y - 0.05f; 6725 profilecut.x = profilecut.y - 0.05f;
6726 if (profilecut.x < 0.0f) 6726 if (profilecut.x < 0.0f)
6727 { 6727 {
6728 profilecut.x = 0.0f; 6728 profilecut.x = 0.0f;
6729 profilecut.y = 0.05f; 6729 profilecut.y = 0.05f;
6730 } 6730 }
6731 } 6731 }
6732 shapeBlock.ProfileBegin = (ushort)(50000 * profilecut.x); 6732 shapeBlock.ProfileBegin = (ushort)(50000 * profilecut.x);
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 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
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
@@ -105,6 +122,13 @@ namespace OpenSim.Services.Connectors.SimianGrid
105 122
106 public string RegisterRegion(UUID scopeID, GridRegion regionInfo) 123 public string RegisterRegion(UUID scopeID, GridRegion regionInfo)
107 { 124 {
125 // Generate and upload our map tile in PNG format to the SimianGrid AddMapTile service
126 Scene scene;
127 if (m_scenes.TryGetValue(regionInfo.RegionID, out scene))
128 UploadMapTile(scene);
129 else
130 m_log.Warn("Registering region " + regionInfo.RegionName + " (" + regionInfo.RegionID + ") that we are not tracking");
131
108 Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0); 132 Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0);
109 Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, 4096.0); 133 Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, 4096.0);
110 134
@@ -430,7 +454,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
430 if (!String.IsNullOrEmpty(errorMessage)) 454 if (!String.IsNullOrEmpty(errorMessage))
431 { 455 {
432 m_log.WarnFormat("[SIMIAN GRID CONNECTOR]: Failed to store {0} byte PNG map tile for {1}: {2}", 456 m_log.WarnFormat("[SIMIAN GRID CONNECTOR]: Failed to store {0} byte PNG map tile for {1}: {2}",
433 pngData.Length, scene.RegionInfo.RegionName, errorMessage); 457 pngData.Length, scene.RegionInfo.RegionName, errorMessage.Replace('\n', ' '));
434 } 458 }
435 } 459 }
436 460