* Quelled a Log format exception in the logging routines.

* Tweaked some esoteric throttle settings
* Removed AgentThrottle from the unsupported packet list.
afrisby
Teravus Ovares 2007-11-22 21:40:53 +00:00
parent 999eec603e
commit f97aeab916
3 changed files with 25 additions and 7 deletions

View File

@ -238,9 +238,16 @@ namespace OpenSim.Framework.Console
{ {
string now = DateTime.Now.ToString("[MM-dd hh:mm:ss] "); string now = DateTime.Now.ToString("[MM-dd hh:mm:ss] ");
Log.Write(now); Log.Write(now);
try
{
Log.WriteLine(format, args); Log.WriteLine(format, args);
Log.Flush(); Log.Flush();
}
catch (FormatException FE)
{
System.Console.WriteLine(args);
}
System.Console.Write(now); System.Console.Write(now);
try try
{ {
@ -255,6 +262,12 @@ namespace OpenSim.Framework.Console
// Some older systems dont support coloured text. // Some older systems dont support coloured text.
System.Console.WriteLine(format, args); System.Console.WriteLine(format, args);
} }
catch (System.FormatException)
{
// Some older systems dont support coloured text.
System.Console.WriteLine(args);
}
return; return;
} }
} }

View File

@ -783,7 +783,7 @@ namespace OpenSim.Region.ClientStack
case PacketType.AgentThrottle: case PacketType.AgentThrottle:
OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString()); //OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString());
AgentThrottlePacket atpack = (AgentThrottlePacket)Pack; AgentThrottlePacket atpack = (AgentThrottlePacket)Pack;
@ -825,6 +825,7 @@ namespace OpenSim.Region.ClientStack
tAsset = (int)BitConverter.ToSingle(throttle, j); tAsset = (int)BitConverter.ToSingle(throttle, j);
tall = tResend + tLand + tWind + tCloud + tTask + tTexture + tAsset; tall = tResend + tLand + tWind + tCloud + tTask + tTexture + tAsset;
/*
OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "Client AgentThrottle - Got throttle:resendbytes=" + tResend + OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "Client AgentThrottle - Got throttle:resendbytes=" + tResend +
" landbytes=" + tLand + " landbytes=" + tLand +
" windbytes=" + tWind + " windbytes=" + tWind +
@ -833,6 +834,8 @@ namespace OpenSim.Region.ClientStack
" texturebytes=" + tTexture + " texturebytes=" + tTexture +
" Assetbytes=" + tAsset + " Assetbytes=" + tAsset +
" Allbytes=" + tall); " Allbytes=" + tall);
*/
// Total Sanity // Total Sanity
// Make sure that the client sent sane total values. // Make sure that the client sent sane total values.
@ -896,7 +899,7 @@ namespace OpenSim.Region.ClientStack
if (tAsset < AssetthrottleMin) if (tAsset < AssetthrottleMin)
AssetthrottleOutbound = AssetthrottleMin; AssetthrottleOutbound = AssetthrottleMin;
OpenSim.Framework.Console.MainLog.Instance.Verbose("THROTTLE", "Using:resendbytes=" + ResendthrottleOutbound + /* OpenSim.Framework.Console.MainLog.Instance.Verbose("THROTTLE", "Using:resendbytes=" + ResendthrottleOutbound +
" landbytes=" + LandthrottleOutbound + " landbytes=" + LandthrottleOutbound +
" windbytes=" + WindthrottleOutbound + " windbytes=" + WindthrottleOutbound +
" cloudbytes=" + CloudthrottleOutbound + " cloudbytes=" + CloudthrottleOutbound +
@ -904,6 +907,7 @@ namespace OpenSim.Region.ClientStack
" texturebytes=" + TexturethrottleOutbound + " texturebytes=" + TexturethrottleOutbound +
" Assetbytes=" + AssetthrottleOutbound + " Assetbytes=" + AssetthrottleOutbound +
" Allbytes=" + tall); " Allbytes=" + tall);
*/
} }
else else
{ {
@ -1006,7 +1010,7 @@ namespace OpenSim.Region.ClientStack
if (tAssetResult < AssetthrottleMin) if (tAssetResult < AssetthrottleMin)
AssetthrottleOutbound = AssetthrottleMin; AssetthrottleOutbound = AssetthrottleMin;
OpenSim.Framework.Console.MainLog.Instance.Verbose("THROTTLE", "Using:resendbytes=" + ResendthrottleOutbound + /* OpenSim.Framework.Console.MainLog.Instance.Verbose("THROTTLE", "Using:resendbytes=" + ResendthrottleOutbound +
" landbytes=" + LandthrottleOutbound + " landbytes=" + LandthrottleOutbound +
" windbytes=" + WindthrottleOutbound + " windbytes=" + WindthrottleOutbound +
" cloudbytes=" + CloudthrottleOutbound + " cloudbytes=" + CloudthrottleOutbound +
@ -1014,6 +1018,7 @@ namespace OpenSim.Region.ClientStack
" texturebytes=" + TexturethrottleOutbound + " texturebytes=" + TexturethrottleOutbound +
" Assetbytes=" + AssetthrottleOutbound + " Assetbytes=" + AssetthrottleOutbound +
" Allbytes=" + tall); " Allbytes=" + tall);
*/
} }
else else

View File

@ -96,7 +96,7 @@ namespace OpenSim.Region.ClientStack
// TODO: Make this variable. Lower throttle on un-ack. Raise over time // TODO: Make this variable. Lower throttle on un-ack. Raise over time
// All throttle times and number of bytes are calculated by dividing by this value // All throttle times and number of bytes are calculated by dividing by this value
private int throttleTimeDivisor = 5; private int throttleTimeDivisor = 7;
private int throttletimems = 1000; private int throttletimems = 1000;
@ -208,7 +208,7 @@ namespace OpenSim.Region.ClientStack
// The General overhead of the UDP protocol gets sent to the queue un-throttled by this // The General overhead of the UDP protocol gets sent to the queue un-throttled by this
// so This'll pick up about around the right time. // so This'll pick up about around the right time.
int MaxThrottleLoops = 5550; // 50*7 packets can be dequeued at once. int MaxThrottleLoops = 4550; // 50*7 packets can be dequeued at once.
int throttleLoops = 0; int throttleLoops = 0;
// We're going to dequeue all of the saved up packets until // We're going to dequeue all of the saved up packets until