aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorJeff Ames2007-12-04 21:44:10 +0000
committerJeff Ames2007-12-04 21:44:10 +0000
commit54c070608e66aca34c022b7be0f049262d3fdcd0 (patch)
tree54fa25c1983486b39b09821f8c4aa9fba6904515 /OpenSim/Region/ClientStack
parentminor refactor so that I can now grok what happens for outgoing packets (diff)
downloadopensim-SC_OLD-54c070608e66aca34c022b7be0f049262d3fdcd0.zip
opensim-SC_OLD-54c070608e66aca34c022b7be0f049262d3fdcd0.tar.gz
opensim-SC_OLD-54c070608e66aca34c022b7be0f049262d3fdcd0.tar.bz2
opensim-SC_OLD-54c070608e66aca34c022b7be0f049262d3fdcd0.tar.xz
made log messages for known unhandled packet types shorter and yellower. added handler stubs.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs107
-rw-r--r--OpenSim/Region/ClientStack/PacketQueue.cs10
2 files changed, 81 insertions, 36 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index 230e8ef..06470b6 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -2520,8 +2520,7 @@ namespace OpenSim.Region.ClientStack
2520 return; 2520 return;
2521 } 2521 }
2522 2522
2523 //OpenSim.Framework.Console.MainLog.Instance.WriteLine("Sending PacketAck"); 2523 //MainLog.Instance.Verbose("Sending PacketAck");
2524
2525 2524
2526 int i = 0; 2525 int i = 0;
2527 PacketAckPacket acks = new PacketAckPacket(); 2526 PacketAckPacket acks = new PacketAckPacket();
@@ -2676,7 +2675,7 @@ namespace OpenSim.Region.ClientStack
2676 } 2675 }
2677 break; 2676 break;
2678 case PacketType.AgentSetAppearance: 2677 case PacketType.AgentSetAppearance:
2679 //OpenSim.Framework.Console.MainLog.Instance.Verbose("set appear", Pack.ToString()); 2678 //MainLog.Instance.Verbose("set appear", Pack.ToString());
2680 AgentSetAppearancePacket appear = (AgentSetAppearancePacket) Pack; 2679 AgentSetAppearancePacket appear = (AgentSetAppearancePacket) Pack;
2681 if (OnSetAppearance != null) 2680 if (OnSetAppearance != null)
2682 { 2681 {
@@ -2760,7 +2759,7 @@ namespace OpenSim.Region.ClientStack
2760 #region Objects/m_sceneObjects 2759 #region Objects/m_sceneObjects
2761 2760
2762 case PacketType.ObjectLink: 2761 case PacketType.ObjectLink:
2763 //OpenSim.Framework.Console.MainLog.Instance.Verbose( Pack.ToString()); 2762 //MainLog.Instance.Verbose(Pack.ToString());
2764 ObjectLinkPacket link = (ObjectLinkPacket) Pack; 2763 ObjectLinkPacket link = (ObjectLinkPacket) Pack;
2765 uint parentprimid = 0; 2764 uint parentprimid = 0;
2766 List<uint> childrenprims = new List<uint>(); 2765 List<uint> childrenprims = new List<uint>();
@@ -2779,7 +2778,7 @@ namespace OpenSim.Region.ClientStack
2779 } 2778 }
2780 break; 2779 break;
2781 case PacketType.ObjectDelink: 2780 case PacketType.ObjectDelink:
2782 //OpenSim.Framework.Console.MainLog.Instance.Verbose( Pack.ToString()); 2781 //MainLog.Instance.Verbose(Pack.ToString());
2783 ObjectDelinkPacket delink = (ObjectDelinkPacket) Pack; 2782 ObjectDelinkPacket delink = (ObjectDelinkPacket) Pack;
2784 2783
2785 // It appears the prim at index 0 is not always the root prim (for 2784 // It appears the prim at index 0 is not always the root prim (for
@@ -2920,7 +2919,7 @@ namespace OpenSim.Region.ClientStack
2920 } 2919 }
2921 break; 2920 break;
2922 case PacketType.ObjectPermissions: 2921 case PacketType.ObjectPermissions:
2923 OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString()); 2922 // MainLog.Instance.Warn("CLIENT", "unhandled packet " + Pack.ToString());
2924 break; 2923 break;
2925 2924
2926 case PacketType.RequestObjectPropertiesFamily: 2925 case PacketType.RequestObjectPropertiesFamily:
@@ -3127,7 +3126,7 @@ namespace OpenSim.Region.ClientStack
3127 } 3126 }
3128 break; 3127 break;
3129 case PacketType.MoveTaskInventory: 3128 case PacketType.MoveTaskInventory:
3130 OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString()); 3129 MainLog.Instance.Warn("CLIENT", "unhandled MoveTaskInventory packet");
3131 break; 3130 break;
3132 case PacketType.RezScript: 3131 case PacketType.RezScript:
3133 //Console.WriteLine(Pack.ToString()); 3132 //Console.WriteLine(Pack.ToString());
@@ -3308,9 +3307,6 @@ namespace OpenSim.Region.ClientStack
3308 break; 3307 break;
3309 3308
3310 case PacketType.AgentThrottle: 3309 case PacketType.AgentThrottle:
3311
3312 //OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString());
3313
3314 AgentThrottlePacket atpack = (AgentThrottlePacket)Pack; 3310 AgentThrottlePacket atpack = (AgentThrottlePacket)Pack;
3315 3311
3316 byte[] throttle = atpack.Throttle.Throttles; 3312 byte[] throttle = atpack.Throttle.Throttles;
@@ -3352,7 +3348,7 @@ namespace OpenSim.Region.ClientStack
3352 3348
3353 tall = tResend + tLand + tWind + tCloud + tTask + tTexture + tAsset; 3349 tall = tResend + tLand + tWind + tCloud + tTask + tTexture + tAsset;
3354 /* 3350 /*
3355 OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "Client AgentThrottle - Got throttle:resendbytes=" + tResend + 3351 MainLog.Instance.Verbose("CLIENT", "Client AgentThrottle - Got throttle:resendbytes=" + tResend +
3356 " landbytes=" + tLand + 3352 " landbytes=" + tLand +
3357 " windbytes=" + tWind + 3353 " windbytes=" + tWind +
3358 " cloudbytes=" + tCloud + 3354 " cloudbytes=" + tCloud +
@@ -3425,7 +3421,7 @@ namespace OpenSim.Region.ClientStack
3425 if (tAsset < AssetthrottleMin) 3421 if (tAsset < AssetthrottleMin)
3426 AssetthrottleOutbound = AssetthrottleMin; 3422 AssetthrottleOutbound = AssetthrottleMin;
3427 3423
3428 /* OpenSim.Framework.Console.MainLog.Instance.Verbose("THROTTLE", "Using:resendbytes=" + ResendthrottleOutbound + 3424 /* MainLog.Instance.Verbose("THROTTLE", "Using:resendbytes=" + ResendthrottleOutbound +
3429 " landbytes=" + LandthrottleOutbound + 3425 " landbytes=" + LandthrottleOutbound +
3430 " windbytes=" + WindthrottleOutbound + 3426 " windbytes=" + WindthrottleOutbound +
3431 " cloudbytes=" + CloudthrottleOutbound + 3427 " cloudbytes=" + CloudthrottleOutbound +
@@ -3536,7 +3532,7 @@ namespace OpenSim.Region.ClientStack
3536 if (tAssetResult < AssetthrottleMin) 3532 if (tAssetResult < AssetthrottleMin)
3537 AssetthrottleOutbound = AssetthrottleMin; 3533 AssetthrottleOutbound = AssetthrottleMin;
3538 3534
3539 /* OpenSim.Framework.Console.MainLog.Instance.Verbose("THROTTLE", "Using:resendbytes=" + ResendthrottleOutbound + 3535 /* MainLog.Instance.Verbose("THROTTLE", "Using:resendbytes=" + ResendthrottleOutbound +
3540 " landbytes=" + LandthrottleOutbound + 3536 " landbytes=" + LandthrottleOutbound +
3541 " windbytes=" + WindthrottleOutbound + 3537 " windbytes=" + WindthrottleOutbound +
3542 " cloudbytes=" + CloudthrottleOutbound + 3538 " cloudbytes=" + CloudthrottleOutbound +
@@ -3545,11 +3541,9 @@ namespace OpenSim.Region.ClientStack
3545 " Assetbytes=" + AssetthrottleOutbound + 3541 " Assetbytes=" + AssetthrottleOutbound +
3546 " Allbytes=" + tall); 3542 " Allbytes=" + tall);
3547 */ 3543 */
3548
3549 } 3544 }
3550 else 3545 else
3551 { 3546 {
3552
3553 // The client sent a stupid value.. 3547 // The client sent a stupid value..
3554 // We're going to set the throttles to the minimum possible 3548 // We're going to set the throttles to the minimum possible
3555 ResendthrottleOutbound = ResendthrottleMin; 3549 ResendthrottleOutbound = ResendthrottleMin;
@@ -3559,7 +3553,7 @@ namespace OpenSim.Region.ClientStack
3559 TaskthrottleOutbound = TaskthrottleMin; 3553 TaskthrottleOutbound = TaskthrottleMin;
3560 TexturethrottleOutbound = TexturethrottleMin; 3554 TexturethrottleOutbound = TexturethrottleMin;
3561 AssetthrottleOutbound = AssetthrottleMin; 3555 AssetthrottleOutbound = AssetthrottleMin;
3562 OpenSim.Framework.Console.MainLog.Instance.Verbose("THROTTLE", "ClientSentBadThrottle Using:resendbytes=" + ResendthrottleOutbound + 3556 MainLog.Instance.Verbose("THROTTLE", "ClientSentBadThrottle Using:resendbytes=" + ResendthrottleOutbound +
3563 " landbytes=" + LandthrottleOutbound + 3557 " landbytes=" + LandthrottleOutbound +
3564 " windbytes=" + WindthrottleOutbound + 3558 " windbytes=" + WindthrottleOutbound +
3565 " cloudbytes=" + CloudthrottleOutbound + 3559 " cloudbytes=" + CloudthrottleOutbound +
@@ -3568,7 +3562,6 @@ namespace OpenSim.Region.ClientStack
3568 " Assetbytes=" + AssetthrottleOutbound + 3562 " Assetbytes=" + AssetthrottleOutbound +
3569 " Allbytes=" + tall); 3563 " Allbytes=" + tall);
3570 } 3564 }
3571
3572 } 3565 }
3573 // Reset Client Throttles 3566 // Reset Client Throttles
3574 // This has the effect of 'wiggling the slider 3567 // This has the effect of 'wiggling the slider
@@ -3583,9 +3576,6 @@ namespace OpenSim.Region.ClientStack
3583 TextureBytesSent = 0; 3576 TextureBytesSent = 0;
3584 3577
3585 //Yay, we've finally handled the agent Throttle packet! 3578 //Yay, we've finally handled the agent Throttle packet!
3586
3587
3588
3589 break; 3579 break;
3590 3580
3591 #endregion 3581 #endregion
@@ -3601,7 +3591,7 @@ namespace OpenSim.Region.ClientStack
3601 3591
3602 break; 3592 break;
3603 case PacketType.GodKickUser: 3593 case PacketType.GodKickUser:
3604 OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString()); 3594 MainLog.Instance.Warn("CLIENT", "unhandled GodKickUser packet");
3605 3595
3606 GodKickUserPacket gkupack = (GodKickUserPacket) Pack; 3596 GodKickUserPacket gkupack = (GodKickUserPacket) Pack;
3607 3597
@@ -3623,7 +3613,6 @@ namespace OpenSim.Region.ClientStack
3623 //kupack.TargetBlock.TargetPort = (ushort)0; 3613 //kupack.TargetBlock.TargetPort = (ushort)0;
3624 //kupack.UserInfo.Reason = gkupack.UserInfo.Reason; 3614 //kupack.UserInfo.Reason = gkupack.UserInfo.Reason;
3625 3615
3626
3627 //OutPacket(kupack, ThrottleOutPacketType.Task); 3616 //OutPacket(kupack, ThrottleOutPacketType.Task);
3628 break; 3617 break;
3629 3618
@@ -3631,19 +3620,83 @@ namespace OpenSim.Region.ClientStack
3631 // Send the client the ping response back 3620 // Send the client the ping response back
3632 // Pass the same PingID in the matching packet 3621 // Pass the same PingID in the matching packet
3633 // Handled In the packet processing 3622 // Handled In the packet processing
3634 OpenSim.Framework.Console.MainLog.Instance.Debug("CLIENT", "possibly unhandled packet " + Pack.ToString()); 3623 MainLog.Instance.Debug("CLIENT", "possibly unhandled StartPingCheck packet");
3635 break; 3624 break;
3636 case PacketType.CompletePingCheck: 3625 case PacketType.CompletePingCheck:
3637 // Parhaps this should be processed on the Sim to determine whether or not to drop a dead client 3626 // Parhaps this should be processed on the Sim to determine whether or not to drop a dead client
3638 // Dumping it to the verbose console until it's handled properly. 3627 // Dumping it to the verbose console until it's handled properly.
3639 3628 MainLog.Instance.Warn("CLIENT", "unhandled CompletePingCheck packet");
3640 OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString());
3641 break; 3629 break;
3642 case PacketType.ObjectScale: 3630 case PacketType.ObjectScale:
3643 OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString()); 3631 // TODO: handle this packet
3632 MainLog.Instance.Warn("CLIENT", "unhandled ObjectScale packet");
3633 break;
3634 case PacketType.ViewerStats:
3635 // TODO: handle this packet
3636 MainLog.Instance.Warn("CLIENT", "unhandled ViewerStats packet");
3637 break;
3638 case PacketType.EstateCovenantRequest:
3639 // TODO: handle this packet
3640 MainLog.Instance.Warn("CLIENT", "unhandled EstateCovenantRequest packet");
3641 break;
3642 case PacketType.CreateGroupRequest:
3643 // TODO: handle this packet
3644 MainLog.Instance.Warn("CLIENT", "unhandled CreateGroupRequest packet");
3645 break;
3646 case PacketType.GenericMessage:
3647 // TODO: handle this packet
3648 MainLog.Instance.Warn("CLIENT", "unhandled GenericMessage packet");
3649 break;
3650 case PacketType.MapItemRequest:
3651 // TODO: handle this packet
3652 MainLog.Instance.Warn("CLIENT", "unhandled MapItemRequest packet");
3653 break;
3654 case PacketType.AgentResume:
3655 // TODO: handle this packet
3656 MainLog.Instance.Warn("CLIENT", "unhandled AgentResume packet");
3657 break;
3658 case PacketType.AgentPause:
3659 // TODO: handle this packet
3660 MainLog.Instance.Warn("CLIENT", "unhandled AgentPause packet");
3661 break;
3662 case PacketType.TransferAbort:
3663 // TODO: handle this packet
3664 MainLog.Instance.Warn("CLIENT", "unhandled TransferAbort packet");
3665 break;
3666 case PacketType.MuteListRequest:
3667 // TODO: handle this packet
3668 MainLog.Instance.Warn("CLIENT", "unhandled MuteListRequest packet");
3669 break;
3670 case PacketType.AgentDataUpdateRequest:
3671 // TODO: handle this packet
3672 MainLog.Instance.Warn("CLIENT", "unhandled AgentDataUpdateRequest packet");
3673 break;
3674 case PacketType.ParcelAccessListRequest:
3675 // TODO: handle this packet
3676 MainLog.Instance.Warn("CLIENT", "unhandled ParcelAccessListRequest packet");
3677 break;
3678 case PacketType.ParcelDwellRequest:
3679 // TODO: handle this packet
3680 MainLog.Instance.Warn("CLIENT", "unhandled ParcelDwellRequest packet");
3681 break;
3682 case PacketType.UseCircuitCode:
3683 // TODO: handle this packet
3684 MainLog.Instance.Warn("CLIENT", "unhandled UseCircuitCode packet");
3685 break;
3686 case PacketType.EconomyDataRequest:
3687 // TODO: handle this packet
3688 MainLog.Instance.Warn("CLIENT", "unhandled EconomyDataRequest packet");
3689 break;
3690 case PacketType.AgentHeightWidth:
3691 // TODO: handle this packet
3692 MainLog.Instance.Warn("CLIENT", "unhandled AgentHeightWidth packet");
3693 break;
3694 case PacketType.ObjectSpinStop:
3695 // TODO: handle this packet
3696 MainLog.Instance.Warn("CLIENT", "unhandled ObjectSpinStop packet");
3644 break; 3697 break;
3645 default: 3698 default:
3646 OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString()); 3699 MainLog.Instance.Warn("CLIENT", "unhandled packet " + Pack.ToString());
3647 break; 3700 break;
3648 3701
3649 #endregion 3702 #endregion
diff --git a/OpenSim/Region/ClientStack/PacketQueue.cs b/OpenSim/Region/ClientStack/PacketQueue.cs
index 270af48..7991c7d 100644
--- a/OpenSim/Region/ClientStack/PacketQueue.cs
+++ b/OpenSim/Region/ClientStack/PacketQueue.cs
@@ -216,9 +216,7 @@ namespace OpenSim.Region.ClientStack
216 TotalThrottle.Add(qpack.Packet.ToBytes().Length); 216 TotalThrottle.Add(qpack.Packet.ToBytes().Length);
217 AssetThrottle.Add(qpack.Packet.ToBytes().Length); 217 AssetThrottle.Add(qpack.Packet.ToBytes().Length);
218 } 218 }
219
220 } 219 }
221
222 } 220 }
223 221
224 private void ThrottleCheck(ref PacketThrottle throttle, ref Queue<QueItem> q, QueItem item) 222 private void ThrottleCheck(ref PacketThrottle throttle, ref Queue<QueItem> q, QueItem item)
@@ -273,7 +271,6 @@ namespace OpenSim.Region.ClientStack
273 SendQueue.Enqueue(item); 271 SendQueue.Enqueue(item);
274 break; 272 break;
275 } 273 }
276
277 } 274 }
278 275
279 private int ScaleThrottle(int value, int curmax, int newmax) 276 private int ScaleThrottle(int value, int curmax, int newmax)
@@ -283,9 +280,6 @@ namespace OpenSim.Region.ClientStack
283 280
284 public void SetThrottleFromClient(Packet Pack) 281 public void SetThrottleFromClient(Packet Pack)
285 { 282 {
286
287 //OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString());
288
289 AgentThrottlePacket atpack = (AgentThrottlePacket)Pack; 283 AgentThrottlePacket atpack = (AgentThrottlePacket)Pack;
290 284
291 byte[] throttle = atpack.Throttle.Throttles; 285 byte[] throttle = atpack.Throttle.Throttles;
@@ -381,8 +375,6 @@ namespace OpenSim.Region.ClientStack
381 } 375 }
382 // effectively wiggling the slider causes things reset 376 // effectively wiggling the slider causes things reset
383 ResetCounters(); 377 ResetCounters();
384
385 } 378 }
386
387 } 379 }
388} \ No newline at end of file 380}