made log messages for known unhandled packet types shorter and yellower. added handler stubs.

afrisby
Jeff Ames 2007-12-04 21:44:10 +00:00
parent 2adcdd3d15
commit 54c070608e
2 changed files with 81 additions and 36 deletions

View File

@ -2520,8 +2520,7 @@ namespace OpenSim.Region.ClientStack
return; return;
} }
//OpenSim.Framework.Console.MainLog.Instance.WriteLine("Sending PacketAck"); //MainLog.Instance.Verbose("Sending PacketAck");
int i = 0; int i = 0;
PacketAckPacket acks = new PacketAckPacket(); PacketAckPacket acks = new PacketAckPacket();
@ -2676,7 +2675,7 @@ namespace OpenSim.Region.ClientStack
} }
break; break;
case PacketType.AgentSetAppearance: case PacketType.AgentSetAppearance:
//OpenSim.Framework.Console.MainLog.Instance.Verbose("set appear", Pack.ToString()); //MainLog.Instance.Verbose("set appear", Pack.ToString());
AgentSetAppearancePacket appear = (AgentSetAppearancePacket) Pack; AgentSetAppearancePacket appear = (AgentSetAppearancePacket) Pack;
if (OnSetAppearance != null) if (OnSetAppearance != null)
{ {
@ -2760,7 +2759,7 @@ namespace OpenSim.Region.ClientStack
#region Objects/m_sceneObjects #region Objects/m_sceneObjects
case PacketType.ObjectLink: case PacketType.ObjectLink:
//OpenSim.Framework.Console.MainLog.Instance.Verbose( Pack.ToString()); //MainLog.Instance.Verbose(Pack.ToString());
ObjectLinkPacket link = (ObjectLinkPacket) Pack; ObjectLinkPacket link = (ObjectLinkPacket) Pack;
uint parentprimid = 0; uint parentprimid = 0;
List<uint> childrenprims = new List<uint>(); List<uint> childrenprims = new List<uint>();
@ -2779,7 +2778,7 @@ namespace OpenSim.Region.ClientStack
} }
break; break;
case PacketType.ObjectDelink: case PacketType.ObjectDelink:
//OpenSim.Framework.Console.MainLog.Instance.Verbose( Pack.ToString()); //MainLog.Instance.Verbose(Pack.ToString());
ObjectDelinkPacket delink = (ObjectDelinkPacket) Pack; ObjectDelinkPacket delink = (ObjectDelinkPacket) Pack;
// It appears the prim at index 0 is not always the root prim (for // It appears the prim at index 0 is not always the root prim (for
@ -2920,7 +2919,7 @@ namespace OpenSim.Region.ClientStack
} }
break; break;
case PacketType.ObjectPermissions: case PacketType.ObjectPermissions:
OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString()); // MainLog.Instance.Warn("CLIENT", "unhandled packet " + Pack.ToString());
break; break;
case PacketType.RequestObjectPropertiesFamily: case PacketType.RequestObjectPropertiesFamily:
@ -3127,7 +3126,7 @@ namespace OpenSim.Region.ClientStack
} }
break; break;
case PacketType.MoveTaskInventory: case PacketType.MoveTaskInventory:
OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString()); MainLog.Instance.Warn("CLIENT", "unhandled MoveTaskInventory packet");
break; break;
case PacketType.RezScript: case PacketType.RezScript:
//Console.WriteLine(Pack.ToString()); //Console.WriteLine(Pack.ToString());
@ -3308,9 +3307,6 @@ namespace OpenSim.Region.ClientStack
break; break;
case PacketType.AgentThrottle: case PacketType.AgentThrottle:
//OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString());
AgentThrottlePacket atpack = (AgentThrottlePacket)Pack; AgentThrottlePacket atpack = (AgentThrottlePacket)Pack;
byte[] throttle = atpack.Throttle.Throttles; byte[] throttle = atpack.Throttle.Throttles;
@ -3352,7 +3348,7 @@ namespace OpenSim.Region.ClientStack
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 + MainLog.Instance.Verbose("CLIENT", "Client AgentThrottle - Got throttle:resendbytes=" + tResend +
" landbytes=" + tLand + " landbytes=" + tLand +
" windbytes=" + tWind + " windbytes=" + tWind +
" cloudbytes=" + tCloud + " cloudbytes=" + tCloud +
@ -3425,7 +3421,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 + /* MainLog.Instance.Verbose("THROTTLE", "Using:resendbytes=" + ResendthrottleOutbound +
" landbytes=" + LandthrottleOutbound + " landbytes=" + LandthrottleOutbound +
" windbytes=" + WindthrottleOutbound + " windbytes=" + WindthrottleOutbound +
" cloudbytes=" + CloudthrottleOutbound + " cloudbytes=" + CloudthrottleOutbound +
@ -3536,7 +3532,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 + /* MainLog.Instance.Verbose("THROTTLE", "Using:resendbytes=" + ResendthrottleOutbound +
" landbytes=" + LandthrottleOutbound + " landbytes=" + LandthrottleOutbound +
" windbytes=" + WindthrottleOutbound + " windbytes=" + WindthrottleOutbound +
" cloudbytes=" + CloudthrottleOutbound + " cloudbytes=" + CloudthrottleOutbound +
@ -3545,11 +3541,9 @@ namespace OpenSim.Region.ClientStack
" Assetbytes=" + AssetthrottleOutbound + " Assetbytes=" + AssetthrottleOutbound +
" Allbytes=" + tall); " Allbytes=" + tall);
*/ */
} }
else else
{ {
// The client sent a stupid value.. // The client sent a stupid value..
// We're going to set the throttles to the minimum possible // We're going to set the throttles to the minimum possible
ResendthrottleOutbound = ResendthrottleMin; ResendthrottleOutbound = ResendthrottleMin;
@ -3559,7 +3553,7 @@ namespace OpenSim.Region.ClientStack
TaskthrottleOutbound = TaskthrottleMin; TaskthrottleOutbound = TaskthrottleMin;
TexturethrottleOutbound = TexturethrottleMin; TexturethrottleOutbound = TexturethrottleMin;
AssetthrottleOutbound = AssetthrottleMin; AssetthrottleOutbound = AssetthrottleMin;
OpenSim.Framework.Console.MainLog.Instance.Verbose("THROTTLE", "ClientSentBadThrottle Using:resendbytes=" + ResendthrottleOutbound + MainLog.Instance.Verbose("THROTTLE", "ClientSentBadThrottle Using:resendbytes=" + ResendthrottleOutbound +
" landbytes=" + LandthrottleOutbound + " landbytes=" + LandthrottleOutbound +
" windbytes=" + WindthrottleOutbound + " windbytes=" + WindthrottleOutbound +
" cloudbytes=" + CloudthrottleOutbound + " cloudbytes=" + CloudthrottleOutbound +
@ -3568,7 +3562,6 @@ namespace OpenSim.Region.ClientStack
" Assetbytes=" + AssetthrottleOutbound + " Assetbytes=" + AssetthrottleOutbound +
" Allbytes=" + tall); " Allbytes=" + tall);
} }
} }
// Reset Client Throttles // Reset Client Throttles
// This has the effect of 'wiggling the slider // This has the effect of 'wiggling the slider
@ -3583,9 +3576,6 @@ namespace OpenSim.Region.ClientStack
TextureBytesSent = 0; TextureBytesSent = 0;
//Yay, we've finally handled the agent Throttle packet! //Yay, we've finally handled the agent Throttle packet!
break; break;
#endregion #endregion
@ -3601,7 +3591,7 @@ namespace OpenSim.Region.ClientStack
break; break;
case PacketType.GodKickUser: case PacketType.GodKickUser:
OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString()); MainLog.Instance.Warn("CLIENT", "unhandled GodKickUser packet");
GodKickUserPacket gkupack = (GodKickUserPacket) Pack; GodKickUserPacket gkupack = (GodKickUserPacket) Pack;
@ -3623,7 +3613,6 @@ namespace OpenSim.Region.ClientStack
//kupack.TargetBlock.TargetPort = (ushort)0; //kupack.TargetBlock.TargetPort = (ushort)0;
//kupack.UserInfo.Reason = gkupack.UserInfo.Reason; //kupack.UserInfo.Reason = gkupack.UserInfo.Reason;
//OutPacket(kupack, ThrottleOutPacketType.Task); //OutPacket(kupack, ThrottleOutPacketType.Task);
break; break;
@ -3631,19 +3620,83 @@ namespace OpenSim.Region.ClientStack
// Send the client the ping response back // Send the client the ping response back
// Pass the same PingID in the matching packet // Pass the same PingID in the matching packet
// Handled In the packet processing // Handled In the packet processing
OpenSim.Framework.Console.MainLog.Instance.Debug("CLIENT", "possibly unhandled packet " + Pack.ToString()); MainLog.Instance.Debug("CLIENT", "possibly unhandled StartPingCheck packet");
break; break;
case PacketType.CompletePingCheck: case PacketType.CompletePingCheck:
// Parhaps this should be processed on the Sim to determine whether or not to drop a dead client // Parhaps this should be processed on the Sim to determine whether or not to drop a dead client
// Dumping it to the verbose console until it's handled properly. // Dumping it to the verbose console until it's handled properly.
MainLog.Instance.Warn("CLIENT", "unhandled CompletePingCheck packet");
OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString());
break; break;
case PacketType.ObjectScale: case PacketType.ObjectScale:
OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString()); // TODO: handle this packet
MainLog.Instance.Warn("CLIENT", "unhandled ObjectScale packet");
break;
case PacketType.ViewerStats:
// TODO: handle this packet
MainLog.Instance.Warn("CLIENT", "unhandled ViewerStats packet");
break;
case PacketType.EstateCovenantRequest:
// TODO: handle this packet
MainLog.Instance.Warn("CLIENT", "unhandled EstateCovenantRequest packet");
break;
case PacketType.CreateGroupRequest:
// TODO: handle this packet
MainLog.Instance.Warn("CLIENT", "unhandled CreateGroupRequest packet");
break;
case PacketType.GenericMessage:
// TODO: handle this packet
MainLog.Instance.Warn("CLIENT", "unhandled GenericMessage packet");
break;
case PacketType.MapItemRequest:
// TODO: handle this packet
MainLog.Instance.Warn("CLIENT", "unhandled MapItemRequest packet");
break;
case PacketType.AgentResume:
// TODO: handle this packet
MainLog.Instance.Warn("CLIENT", "unhandled AgentResume packet");
break;
case PacketType.AgentPause:
// TODO: handle this packet
MainLog.Instance.Warn("CLIENT", "unhandled AgentPause packet");
break;
case PacketType.TransferAbort:
// TODO: handle this packet
MainLog.Instance.Warn("CLIENT", "unhandled TransferAbort packet");
break;
case PacketType.MuteListRequest:
// TODO: handle this packet
MainLog.Instance.Warn("CLIENT", "unhandled MuteListRequest packet");
break;
case PacketType.AgentDataUpdateRequest:
// TODO: handle this packet
MainLog.Instance.Warn("CLIENT", "unhandled AgentDataUpdateRequest packet");
break;
case PacketType.ParcelAccessListRequest:
// TODO: handle this packet
MainLog.Instance.Warn("CLIENT", "unhandled ParcelAccessListRequest packet");
break;
case PacketType.ParcelDwellRequest:
// TODO: handle this packet
MainLog.Instance.Warn("CLIENT", "unhandled ParcelDwellRequest packet");
break;
case PacketType.UseCircuitCode:
// TODO: handle this packet
MainLog.Instance.Warn("CLIENT", "unhandled UseCircuitCode packet");
break;
case PacketType.EconomyDataRequest:
// TODO: handle this packet
MainLog.Instance.Warn("CLIENT", "unhandled EconomyDataRequest packet");
break;
case PacketType.AgentHeightWidth:
// TODO: handle this packet
MainLog.Instance.Warn("CLIENT", "unhandled AgentHeightWidth packet");
break;
case PacketType.ObjectSpinStop:
// TODO: handle this packet
MainLog.Instance.Warn("CLIENT", "unhandled ObjectSpinStop packet");
break; break;
default: default:
OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString()); MainLog.Instance.Warn("CLIENT", "unhandled packet " + Pack.ToString());
break; break;
#endregion #endregion

View File

@ -216,9 +216,7 @@ namespace OpenSim.Region.ClientStack
TotalThrottle.Add(qpack.Packet.ToBytes().Length); TotalThrottle.Add(qpack.Packet.ToBytes().Length);
AssetThrottle.Add(qpack.Packet.ToBytes().Length); AssetThrottle.Add(qpack.Packet.ToBytes().Length);
} }
} }
} }
private void ThrottleCheck(ref PacketThrottle throttle, ref Queue<QueItem> q, QueItem item) private void ThrottleCheck(ref PacketThrottle throttle, ref Queue<QueItem> q, QueItem item)
@ -273,7 +271,6 @@ namespace OpenSim.Region.ClientStack
SendQueue.Enqueue(item); SendQueue.Enqueue(item);
break; break;
} }
} }
private int ScaleThrottle(int value, int curmax, int newmax) private int ScaleThrottle(int value, int curmax, int newmax)
@ -283,9 +280,6 @@ namespace OpenSim.Region.ClientStack
public void SetThrottleFromClient(Packet Pack) public void SetThrottleFromClient(Packet Pack)
{ {
//OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString());
AgentThrottlePacket atpack = (AgentThrottlePacket)Pack; AgentThrottlePacket atpack = (AgentThrottlePacket)Pack;
byte[] throttle = atpack.Throttle.Throttles; byte[] throttle = atpack.Throttle.Throttles;
@ -381,8 +375,6 @@ namespace OpenSim.Region.ClientStack
} }
// effectively wiggling the slider causes things reset // effectively wiggling the slider causes things reset
ResetCounters(); ResetCounters();
} }
} }
} }