diff options
author | Diva Canto | 2010-10-09 09:09:38 -0700 |
---|---|---|
committer | Diva Canto | 2010-10-09 09:09:38 -0700 |
commit | aeecdd14309cb2947f1c3bcca00b26d671fd1721 (patch) | |
tree | 6772b2e6be9f05d920cf82aaab78da7914a0350d | |
parent | Added missing sections to StandaloneHypergrid.ini (diff) | |
parent | weird line endings fix commit (diff) | |
download | opensim-SC-aeecdd14309cb2947f1c3bcca00b26d671fd1721.zip opensim-SC-aeecdd14309cb2947f1c3bcca00b26d671fd1721.tar.gz opensim-SC-aeecdd14309cb2947f1c3bcca00b26d671fd1721.tar.bz2 opensim-SC-aeecdd14309cb2947f1c3bcca00b26d671fd1721.tar.xz |
Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim
Diffstat (limited to '')
4 files changed, 35 insertions, 20 deletions
diff --git a/OpenSim/Framework/Console/LocalConsole.cs b/OpenSim/Framework/Console/LocalConsole.cs index 6043094..5f2f404 100644 --- a/OpenSim/Framework/Console/LocalConsole.cs +++ b/OpenSim/Framework/Console/LocalConsole.cs | |||
@@ -44,6 +44,7 @@ namespace OpenSim.Framework.Console | |||
44 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 45 | ||
46 | // private readonly object m_syncRoot = new object(); | 46 | // private readonly object m_syncRoot = new object(); |
47 | private const string LOGLEVEL_NONE = "(none)"; | ||
47 | 48 | ||
48 | private int y = -1; | 49 | private int y = -1; |
49 | private int cp = 0; | 50 | private int cp = 0; |
@@ -278,22 +279,25 @@ namespace OpenSim.Framework.Console | |||
278 | 279 | ||
279 | private void WriteLocalText(string text, string level) | 280 | private void WriteLocalText(string text, string level) |
280 | { | 281 | { |
281 | string regex = @"^(?<Front>.*?)\[(?<Category>[^\]]+)\]:?(?<End>.*)"; | ||
282 | |||
283 | Regex RE = new Regex(regex, RegexOptions.Multiline); | ||
284 | MatchCollection matches = RE.Matches(text); | ||
285 | |||
286 | string outText = text; | 282 | string outText = text; |
287 | 283 | ||
288 | if (matches.Count == 1) | 284 | if (level != LOGLEVEL_NONE) |
289 | { | 285 | { |
290 | outText = matches[0].Groups["End"].Value; | 286 | string regex = @"^(?<Front>.*?)\[(?<Category>[^\]]+)\]:?(?<End>.*)"; |
291 | System.Console.Write(matches[0].Groups["Front"].Value); | 287 | |
288 | Regex RE = new Regex(regex, RegexOptions.Multiline); | ||
289 | MatchCollection matches = RE.Matches(text); | ||
292 | 290 | ||
293 | System.Console.Write("["); | 291 | if (matches.Count == 1) |
294 | WriteColorText(DeriveColor(matches[0].Groups["Category"].Value), | 292 | { |
295 | matches[0].Groups["Category"].Value); | 293 | outText = matches[0].Groups["End"].Value; |
296 | System.Console.Write("]:"); | 294 | System.Console.Write(matches[0].Groups["Front"].Value); |
295 | |||
296 | System.Console.Write("["); | ||
297 | WriteColorText(DeriveColor(matches[0].Groups["Category"].Value), | ||
298 | matches[0].Groups["Category"].Value); | ||
299 | System.Console.Write("]:"); | ||
300 | } | ||
297 | } | 301 | } |
298 | 302 | ||
299 | if (level == "error") | 303 | if (level == "error") |
@@ -308,7 +312,7 @@ namespace OpenSim.Framework.Console | |||
308 | 312 | ||
309 | public override void Output(string text) | 313 | public override void Output(string text) |
310 | { | 314 | { |
311 | Output(text, "normal"); | 315 | Output(text, LOGLEVEL_NONE); |
312 | } | 316 | } |
313 | 317 | ||
314 | public override void Output(string text, string level) | 318 | public override void Output(string text, string level) |
diff --git a/OpenSim/Framework/Tests/MundaneFrameworkTests.cs b/OpenSim/Framework/Tests/MundaneFrameworkTests.cs index 04be083..e7f8bfc 100644 --- a/OpenSim/Framework/Tests/MundaneFrameworkTests.cs +++ b/OpenSim/Framework/Tests/MundaneFrameworkTests.cs | |||
@@ -140,10 +140,10 @@ namespace OpenSim.Framework.Tests | |||
140 | settings.Save(); | 140 | settings.Save(); |
141 | settings.OnSave -= RegionSaveFired; | 141 | settings.OnSave -= RegionSaveFired; |
142 | 142 | ||
143 | string str = settings.LoadedCreationDate; | 143 | // string str = settings.LoadedCreationDate; |
144 | int dt = settings.LoadedCreationDateTime; | 144 | // int dt = settings.LoadedCreationDateTime; |
145 | string id = settings.LoadedCreationID; | 145 | // string id = settings.LoadedCreationID; |
146 | string time = settings.LoadedCreationTime; | 146 | // string time = settings.LoadedCreationTime; |
147 | 147 | ||
148 | Assert.That(m_RegionSettingsOnSaveEventFired, "RegionSettings Save Event didn't Fire"); | 148 | Assert.That(m_RegionSettingsOnSaveEventFired, "RegionSettings Save Event didn't Fire"); |
149 | 149 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs b/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs index a3238df..38151b1 100644 --- a/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs | |||
@@ -187,8 +187,16 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps | |||
187 | int start, end; | 187 | int start, end; |
188 | if (TryParseRange(range, out start, out end)) | 188 | if (TryParseRange(range, out start, out end)) |
189 | { | 189 | { |
190 | end = Utils.Clamp(end, 1, texture.Data.Length - 1); | 190 | // Before clamping end make sure we can satisfy it in order to avoid |
191 | start = Utils.Clamp(start, 0, end - 1); | 191 | // sending back the last byte instead of an error status |
192 | if (end >= texture.Data.Length) | ||
193 | { | ||
194 | response.StatusCode = (int)System.Net.HttpStatusCode.RequestedRangeNotSatisfiable; | ||
195 | return; | ||
196 | } | ||
197 | |||
198 | end = Utils.Clamp(end, 0, texture.Data.Length - 1); | ||
199 | start = Utils.Clamp(start, 0, end); | ||
192 | int len = end - start + 1; | 200 | int len = end - start + 1; |
193 | 201 | ||
194 | //m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID); | 202 | //m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID); |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index d05cfc2..7a175ea 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -208,7 +208,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
208 | } | 208 | } |
209 | 209 | ||
210 | foreach (List<SceneObjectGroup> objlist in deletes.Values) | 210 | foreach (List<SceneObjectGroup> objlist in deletes.Values) |
211 | ret = DeleteToInventory(action, folderID, objlist, remoteClient); | 211 | { |
212 | foreach (SceneObjectGroup g in objlist) | ||
213 | ret = DeleteToInventory(action, folderID, g, remoteClient); | ||
214 | } | ||
212 | 215 | ||
213 | return ret; | 216 | return ret; |
214 | } | 217 | } |