aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Console/LocalConsole.cs30
-rw-r--r--OpenSim/Framework/Tests/MundaneFrameworkTests.cs8
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs12
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs5
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs16
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneViewer.cs8
-rw-r--r--OpenSim/Region/Physics/Meshing/Meshmerizer.cs2
7 files changed, 49 insertions, 32 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..97581e5 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 start 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 (start >= 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 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 8140d42..39b109b 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2694,7 +2694,7 @@ namespace OpenSim.Region.Framework.Scenes
2694 public void PreloadSound(string sound) 2694 public void PreloadSound(string sound)
2695 { 2695 {
2696 // UUID ownerID = OwnerID; 2696 // UUID ownerID = OwnerID;
2697 UUID objectID = UUID; 2697 UUID objectID = ParentGroup.RootPart.UUID;
2698 UUID soundID = UUID.Zero; 2698 UUID soundID = UUID.Zero;
2699 2699
2700 if (!UUID.TryParse(sound, out soundID)) 2700 if (!UUID.TryParse(sound, out soundID))
@@ -3101,7 +3101,7 @@ namespace OpenSim.Region.Framework.Scenes
3101 volume = 0; 3101 volume = 0;
3102 3102
3103 UUID ownerID = _ownerID; 3103 UUID ownerID = _ownerID;
3104 UUID objectID = UUID; 3104 UUID objectID = ParentGroup.RootPart.UUID;
3105 UUID parentID = GetRootPartUUID(); 3105 UUID parentID = GetRootPartUUID();
3106 UUID soundID = UUID.Zero; 3106 UUID soundID = UUID.Zero;
3107 Vector3 position = AbsolutePosition; // region local 3107 Vector3 position = AbsolutePosition; // region local
@@ -3138,11 +3138,11 @@ namespace OpenSim.Region.Framework.Scenes
3138 else 3138 else
3139 soundModule.PlayAttachedSound(soundID, ownerID, objectID, volume, position, flags, radius); 3139 soundModule.PlayAttachedSound(soundID, ownerID, objectID, volume, position, flags, radius);
3140 ParentGroup.PlaySoundMasterPrim = this; 3140 ParentGroup.PlaySoundMasterPrim = this;
3141 ownerID = this._ownerID; 3141 ownerID = _ownerID;
3142 objectID = this.UUID; 3142 objectID = ParentGroup.RootPart.UUID;
3143 parentID = this.GetRootPartUUID(); 3143 parentID = GetRootPartUUID();
3144 position = this.AbsolutePosition; // region local 3144 position = AbsolutePosition; // region local
3145 regionHandle = this.ParentGroup.Scene.RegionInfo.RegionHandle; 3145 regionHandle = ParentGroup.Scene.RegionInfo.RegionHandle;
3146 if (triggered) 3146 if (triggered)
3147 soundModule.TriggerSound(soundID, ownerID, objectID, parentID, volume, position, regionHandle, radius); 3147 soundModule.TriggerSound(soundID, ownerID, objectID, parentID, volume, position, regionHandle, radius);
3148 else 3148 else
@@ -3150,7 +3150,7 @@ namespace OpenSim.Region.Framework.Scenes
3150 foreach (SceneObjectPart prim in ParentGroup.PlaySoundSlavePrims) 3150 foreach (SceneObjectPart prim in ParentGroup.PlaySoundSlavePrims)
3151 { 3151 {
3152 ownerID = prim._ownerID; 3152 ownerID = prim._ownerID;
3153 objectID = prim.UUID; 3153 objectID = prim.ParentGroup.RootPart.UUID;
3154 parentID = prim.GetRootPartUUID(); 3154 parentID = prim.GetRootPartUUID();
3155 position = prim.AbsolutePosition; // region local 3155 position = prim.AbsolutePosition; // region local
3156 regionHandle = prim.ParentGroup.Scene.RegionInfo.RegionHandle; 3156 regionHandle = prim.ParentGroup.Scene.RegionInfo.RegionHandle;
diff --git a/OpenSim/Region/Framework/Scenes/SceneViewer.cs b/OpenSim/Region/Framework/Scenes/SceneViewer.cs
index b45291f..b44a010 100644
--- a/OpenSim/Region/Framework/Scenes/SceneViewer.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneViewer.cs
@@ -179,11 +179,13 @@ namespace OpenSim.Region.Framework.Scenes
179 179
180 public void Reset() 180 public void Reset()
181 { 181 {
182 if (m_pendingObjects != null) 182 if (m_pendingObjects == null)
183 return;
184
185 lock (m_pendingObjects)
183 { 186 {
184 lock (m_pendingObjects) 187 if (m_pendingObjects != null)
185 { 188 {
186
187 m_pendingObjects.Clear(); 189 m_pendingObjects.Clear();
188 m_pendingObjects = null; 190 m_pendingObjects = null;
189 } 191 }
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index c97db8c..cf57c0a 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -81,7 +81,7 @@ namespace OpenSim.Region.Physics.Meshing
81 { 81 {
82 IConfig start_config = config.Configs["Startup"]; 82 IConfig start_config = config.Configs["Startup"];
83 83
84 decodedSculptMapPath = start_config.GetString("DecodedSculptMapPath","j2kDecodeCache"); 84 decodedSculptMapPath = start_config.GetString("DecodedSculptMapPath","j2kDecodeCache");
85 cacheSculptMaps = start_config.GetBoolean("CacheSculptMaps", cacheSculptMaps); 85 cacheSculptMaps = start_config.GetBoolean("CacheSculptMaps", cacheSculptMaps);
86 86
87 try 87 try