Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim
commit
aeecdd1430
|
@ -44,6 +44,7 @@ namespace OpenSim.Framework.Console
|
||||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
// private readonly object m_syncRoot = new object();
|
// private readonly object m_syncRoot = new object();
|
||||||
|
private const string LOGLEVEL_NONE = "(none)";
|
||||||
|
|
||||||
private int y = -1;
|
private int y = -1;
|
||||||
private int cp = 0;
|
private int cp = 0;
|
||||||
|
@ -277,14 +278,16 @@ namespace OpenSim.Framework.Console
|
||||||
}
|
}
|
||||||
|
|
||||||
private void WriteLocalText(string text, string level)
|
private void WriteLocalText(string text, string level)
|
||||||
|
{
|
||||||
|
string outText = text;
|
||||||
|
|
||||||
|
if (level != LOGLEVEL_NONE)
|
||||||
{
|
{
|
||||||
string regex = @"^(?<Front>.*?)\[(?<Category>[^\]]+)\]:?(?<End>.*)";
|
string regex = @"^(?<Front>.*?)\[(?<Category>[^\]]+)\]:?(?<End>.*)";
|
||||||
|
|
||||||
Regex RE = new Regex(regex, RegexOptions.Multiline);
|
Regex RE = new Regex(regex, RegexOptions.Multiline);
|
||||||
MatchCollection matches = RE.Matches(text);
|
MatchCollection matches = RE.Matches(text);
|
||||||
|
|
||||||
string outText = text;
|
|
||||||
|
|
||||||
if (matches.Count == 1)
|
if (matches.Count == 1)
|
||||||
{
|
{
|
||||||
outText = matches[0].Groups["End"].Value;
|
outText = matches[0].Groups["End"].Value;
|
||||||
|
@ -295,6 +298,7 @@ namespace OpenSim.Framework.Console
|
||||||
matches[0].Groups["Category"].Value);
|
matches[0].Groups["Category"].Value);
|
||||||
System.Console.Write("]:");
|
System.Console.Write("]:");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (level == "error")
|
if (level == "error")
|
||||||
WriteColorText(ConsoleColor.Red, outText);
|
WriteColorText(ConsoleColor.Red, outText);
|
||||||
|
@ -308,7 +312,7 @@ namespace OpenSim.Framework.Console
|
||||||
|
|
||||||
public override void Output(string text)
|
public override void Output(string text)
|
||||||
{
|
{
|
||||||
Output(text, "normal");
|
Output(text, LOGLEVEL_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Output(string text, string level)
|
public override void Output(string text, string level)
|
||||||
|
|
|
@ -140,10 +140,10 @@ namespace OpenSim.Framework.Tests
|
||||||
settings.Save();
|
settings.Save();
|
||||||
settings.OnSave -= RegionSaveFired;
|
settings.OnSave -= RegionSaveFired;
|
||||||
|
|
||||||
string str = settings.LoadedCreationDate;
|
// string str = settings.LoadedCreationDate;
|
||||||
int dt = settings.LoadedCreationDateTime;
|
// int dt = settings.LoadedCreationDateTime;
|
||||||
string id = settings.LoadedCreationID;
|
// string id = settings.LoadedCreationID;
|
||||||
string time = settings.LoadedCreationTime;
|
// string time = settings.LoadedCreationTime;
|
||||||
|
|
||||||
Assert.That(m_RegionSettingsOnSaveEventFired, "RegionSettings Save Event didn't Fire");
|
Assert.That(m_RegionSettingsOnSaveEventFired, "RegionSettings Save Event didn't Fire");
|
||||||
|
|
||||||
|
|
|
@ -187,8 +187,16 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
|
||||||
int start, end;
|
int start, end;
|
||||||
if (TryParseRange(range, out start, out end))
|
if (TryParseRange(range, out start, out end))
|
||||||
{
|
{
|
||||||
end = Utils.Clamp(end, 1, texture.Data.Length - 1);
|
// Before clamping end make sure we can satisfy it in order to avoid
|
||||||
start = Utils.Clamp(start, 0, end - 1);
|
// sending back the last byte instead of an error status
|
||||||
|
if (end >= texture.Data.Length)
|
||||||
|
{
|
||||||
|
response.StatusCode = (int)System.Net.HttpStatusCode.RequestedRangeNotSatisfiable;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
end = Utils.Clamp(end, 0, texture.Data.Length - 1);
|
||||||
|
start = Utils.Clamp(start, 0, end);
|
||||||
int len = end - start + 1;
|
int len = end - start + 1;
|
||||||
|
|
||||||
//m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID);
|
//m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID);
|
||||||
|
|
|
@ -208,7 +208,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (List<SceneObjectGroup> objlist in deletes.Values)
|
foreach (List<SceneObjectGroup> objlist in deletes.Values)
|
||||||
ret = DeleteToInventory(action, folderID, objlist, remoteClient);
|
{
|
||||||
|
foreach (SceneObjectGroup g in objlist)
|
||||||
|
ret = DeleteToInventory(action, folderID, g, remoteClient);
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue