diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.cs | 86 |
1 files changed, 44 insertions, 42 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 5fdb9b3..10bf0d1 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -51,6 +51,8 @@ namespace OpenSim.Region.ClientStack | |||
51 | /// </summary> | 51 | /// </summary> |
52 | public class ClientView : IClientAPI | 52 | public class ClientView : IClientAPI |
53 | { | 53 | { |
54 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
55 | |||
54 | /* static variables */ | 56 | /* static variables */ |
55 | public static TerrainManager TerrainManager; | 57 | public static TerrainManager TerrainManager; |
56 | 58 | ||
@@ -196,7 +198,7 @@ namespace OpenSim.Region.ClientStack | |||
196 | // m_inventoryCache = inventoryCache; | 198 | // m_inventoryCache = inventoryCache; |
197 | m_authenticateSessionsHandler = authenSessions; | 199 | m_authenticateSessionsHandler = authenSessions; |
198 | 200 | ||
199 | MainLog.Instance.Verbose("CLIENT", "Started up new client thread to handle incoming request"); | 201 | m_log.Info("[CLIENT]: Started up new client thread to handle incoming request"); |
200 | 202 | ||
201 | m_agentId = agentId; | 203 | m_agentId = agentId; |
202 | m_sessionId = sessionId; | 204 | m_sessionId = sessionId; |
@@ -260,7 +262,7 @@ namespace OpenSim.Region.ClientStack | |||
260 | public void Close(bool ShutdownCircult) | 262 | public void Close(bool ShutdownCircult) |
261 | { | 263 | { |
262 | // Pull Client out of Region | 264 | // Pull Client out of Region |
263 | MainLog.Instance.Verbose("CLIENT", "Close has been called"); | 265 | m_log.Info("[CLIENT]: Close has been called"); |
264 | 266 | ||
265 | //raiseevent on the packet server to Shutdown the circuit | 267 | //raiseevent on the packet server to Shutdown the circuit |
266 | if (ShutdownCircult) | 268 | if (ShutdownCircult) |
@@ -286,7 +288,7 @@ namespace OpenSim.Region.ClientStack | |||
286 | 288 | ||
287 | public void Stop() | 289 | public void Stop() |
288 | { | 290 | { |
289 | MainLog.Instance.Verbose("BUG", "Stop called, please find out where and remove it"); | 291 | m_log.Info("[BUG]: Stop called, please find out where and remove it"); |
290 | } | 292 | } |
291 | 293 | ||
292 | #endregion | 294 | #endregion |
@@ -378,7 +380,7 @@ namespace OpenSim.Region.ClientStack | |||
378 | 380 | ||
379 | protected virtual void ClientLoop() | 381 | protected virtual void ClientLoop() |
380 | { | 382 | { |
381 | MainLog.Instance.Verbose("CLIENT", "Entered loop"); | 383 | m_log.Info("[CLIENT]: Entered loop"); |
382 | while (true) | 384 | while (true) |
383 | { | 385 | { |
384 | QueItem nextPacket = m_packetQueue.Dequeue(); | 386 | QueItem nextPacket = m_packetQueue.Dequeue(); |
@@ -445,7 +447,7 @@ namespace OpenSim.Region.ClientStack | |||
445 | m_clientPingTimer.Elapsed += new ElapsedEventHandler(CheckClientConnectivity); | 447 | m_clientPingTimer.Elapsed += new ElapsedEventHandler(CheckClientConnectivity); |
446 | m_clientPingTimer.Enabled = true; | 448 | m_clientPingTimer.Enabled = true; |
447 | 449 | ||
448 | MainLog.Instance.Verbose("CLIENT", "Adding viewer agent to scene"); | 450 | m_log.Info("[CLIENT]: Adding viewer agent to scene"); |
449 | m_scene.AddNewClient(this, true); | 451 | m_scene.AddNewClient(this, true); |
450 | } | 452 | } |
451 | 453 | ||
@@ -458,13 +460,13 @@ namespace OpenSim.Region.ClientStack | |||
458 | if (!sessionInfo.Authorised) | 460 | if (!sessionInfo.Authorised) |
459 | { | 461 | { |
460 | //session/circuit not authorised | 462 | //session/circuit not authorised |
461 | MainLog.Instance.Notice("CLIENT", "New user request denied to " + m_userEndPoint.ToString()); | 463 | m_log.Info("[CLIENT]: New user request denied to " + m_userEndPoint.ToString()); |
462 | m_packetQueue.Close(); | 464 | m_packetQueue.Close(); |
463 | m_clientThread.Abort(); | 465 | m_clientThread.Abort(); |
464 | } | 466 | } |
465 | else | 467 | else |
466 | { | 468 | { |
467 | MainLog.Instance.Notice("CLIENT", "Got authenticated connection from " + m_userEndPoint.ToString()); | 469 | m_log.Info("[CLIENT]: Got authenticated connection from " + m_userEndPoint.ToString()); |
468 | //session is authorised | 470 | //session is authorised |
469 | m_firstName = sessionInfo.LoginInfo.First; | 471 | m_firstName = sessionInfo.LoginInfo.First; |
470 | m_lastName = sessionInfo.LoginInfo.Last; | 472 | m_lastName = sessionInfo.LoginInfo.Last; |
@@ -731,7 +733,7 @@ namespace OpenSim.Region.ClientStack | |||
731 | } | 733 | } |
732 | catch (Exception e) | 734 | catch (Exception e) |
733 | { | 735 | { |
734 | MainLog.Instance.Warn("client", | 736 | m_log.Warn("[client]: " + |
735 | "ClientView.API.cs: SendLayerData() - Failed with exception " + e.ToString()); | 737 | "ClientView.API.cs: SendLayerData() - Failed with exception " + e.ToString()); |
736 | } | 738 | } |
737 | } | 739 | } |
@@ -758,7 +760,7 @@ namespace OpenSim.Region.ClientStack | |||
758 | } | 760 | } |
759 | catch (Exception e) | 761 | catch (Exception e) |
760 | { | 762 | { |
761 | MainLog.Instance.Warn("client", | 763 | m_log.Warn("[client]: " + |
762 | "ClientView.API.cs: SendLayerData() - Failed with exception " + e.ToString()); | 764 | "ClientView.API.cs: SendLayerData() - Failed with exception " + e.ToString()); |
763 | } | 765 | } |
764 | } | 766 | } |
@@ -2102,7 +2104,7 @@ namespace OpenSim.Region.ClientStack | |||
2102 | 2104 | ||
2103 | protected virtual bool Logout(IClientAPI client, Packet packet) | 2105 | protected virtual bool Logout(IClientAPI client, Packet packet) |
2104 | { | 2106 | { |
2105 | MainLog.Instance.Verbose("CLIENT", "Got a logout request"); | 2107 | m_log.Info("[CLIENT]: Got a logout request"); |
2106 | 2108 | ||
2107 | if (OnLogout != null) | 2109 | if (OnLogout != null) |
2108 | { | 2110 | { |
@@ -2431,10 +2433,10 @@ namespace OpenSim.Region.ClientStack | |||
2431 | } | 2433 | } |
2432 | catch (Exception e) | 2434 | catch (Exception e) |
2433 | { | 2435 | { |
2434 | MainLog.Instance.Warn("client", | 2436 | m_log.Warn("[client]: " + |
2435 | "ClientView.m_packetQueue.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection " + | 2437 | "ClientView.m_packetQueue.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection " + |
2436 | m_userEndPoint.ToString() + " - killing thread"); | 2438 | m_userEndPoint.ToString() + " - killing thread"); |
2437 | MainLog.Instance.Error(e.ToString()); | 2439 | m_log.Error(e.ToString()); |
2438 | Close(true); | 2440 | Close(true); |
2439 | } | 2441 | } |
2440 | } | 2442 | } |
@@ -2545,7 +2547,7 @@ namespace OpenSim.Region.ClientStack | |||
2545 | { | 2547 | { |
2546 | if ((now - packet.TickCount > RESEND_TIMEOUT) && (!packet.Header.Resent)) | 2548 | if ((now - packet.TickCount > RESEND_TIMEOUT) && (!packet.Header.Resent)) |
2547 | { | 2549 | { |
2548 | MainLog.Instance.Verbose("NETWORK", "Resending " + packet.Type.ToString() + " packet, " + | 2550 | m_log.Info("[NETWORK]: Resending " + packet.Type.ToString() + " packet, " + |
2549 | (now - packet.TickCount) + "ms have passed"); | 2551 | (now - packet.TickCount) + "ms have passed"); |
2550 | 2552 | ||
2551 | packet.Header.Resent = true; | 2553 | packet.Header.Resent = true; |
@@ -2564,11 +2566,11 @@ namespace OpenSim.Region.ClientStack | |||
2564 | if (m_pendingAcks.Count > 250) | 2566 | if (m_pendingAcks.Count > 250) |
2565 | { | 2567 | { |
2566 | // FIXME: Handle the odd case where we have too many pending ACKs queued up | 2568 | // FIXME: Handle the odd case where we have too many pending ACKs queued up |
2567 | MainLog.Instance.Verbose("NETWORK", "Too many ACKs queued up!"); | 2569 | m_log.Info("[NETWORK]: Too many ACKs queued up!"); |
2568 | return; | 2570 | return; |
2569 | } | 2571 | } |
2570 | 2572 | ||
2571 | //MainLog.Instance.Verbose("NETWORK", "Sending PacketAck"); | 2573 | //m_log.Info("[NETWORK]: Sending PacketAck"); |
2572 | 2574 | ||
2573 | int i = 0; | 2575 | int i = 0; |
2574 | PacketAckPacket acks = (PacketAckPacket)PacketPool.Instance.GetPacket(PacketType.PacketAck); | 2576 | PacketAckPacket acks = (PacketAckPacket)PacketPool.Instance.GetPacket(PacketType.PacketAck); |
@@ -2754,7 +2756,7 @@ namespace OpenSim.Region.ClientStack | |||
2754 | //rezPacket.RezData.RemoveItem; | 2756 | //rezPacket.RezData.RemoveItem; |
2755 | //rezPacket.RezData.RezSelected; | 2757 | //rezPacket.RezData.RezSelected; |
2756 | //rezPacket.RezData.FromTaskID; | 2758 | //rezPacket.RezData.FromTaskID; |
2757 | //MainLog.Instance.Verbose("REZData", rezPacket.ToString()); | 2759 | //m_log.Info("[REZData]: " + rezPacket.ToString()); |
2758 | OnRezObject(this, rezPacket.InventoryData.ItemID, rezPacket.RezData.RayEnd, | 2760 | OnRezObject(this, rezPacket.InventoryData.ItemID, rezPacket.RezData.RayEnd, |
2759 | rezPacket.RezData.RayStart, rezPacket.RezData.RayTargetID, | 2761 | rezPacket.RezData.RayStart, rezPacket.RezData.RayTargetID, |
2760 | rezPacket.RezData.BypassRaycast, rezPacket.RezData.RayEndIsIntersection, | 2762 | rezPacket.RezData.BypassRaycast, rezPacket.RezData.RayEndIsIntersection, |
@@ -2772,7 +2774,7 @@ namespace OpenSim.Region.ClientStack | |||
2772 | break; | 2774 | break; |
2773 | case PacketType.ModifyLand: | 2775 | case PacketType.ModifyLand: |
2774 | ModifyLandPacket modify = (ModifyLandPacket)Pack; | 2776 | ModifyLandPacket modify = (ModifyLandPacket)Pack; |
2775 | //MainLog.Instance.Verbose("LAND", "LAND:" + modify.ToString()); | 2777 | //m_log.Info("[LAND]: LAND:" + modify.ToString()); |
2776 | if (modify.ParcelData.Length > 0) | 2778 | if (modify.ParcelData.Length > 0) |
2777 | { | 2779 | { |
2778 | if (OnModifyTerrain != null) | 2780 | if (OnModifyTerrain != null) |
@@ -2941,7 +2943,7 @@ namespace OpenSim.Region.ClientStack | |||
2941 | { | 2943 | { |
2942 | ObjectAddPacket addPacket = (ObjectAddPacket)Pack; | 2944 | ObjectAddPacket addPacket = (ObjectAddPacket)Pack; |
2943 | PrimitiveBaseShape shape = GetShapeFromAddPacket(addPacket); | 2945 | PrimitiveBaseShape shape = GetShapeFromAddPacket(addPacket); |
2944 | // MainLog.Instance.Verbose("REZData", addPacket.ToString()); | 2946 | // m_log.Info("[REZData]: " + addPacket.ToString()); |
2945 | //BypassRaycast: 1 | 2947 | //BypassRaycast: 1 |
2946 | //RayStart: <69.79469, 158.2652, 98.40343> | 2948 | //RayStart: <69.79469, 158.2652, 98.40343> |
2947 | //RayEnd: <61.97724, 141.995, 92.58341> | 2949 | //RayEnd: <61.97724, 141.995, 92.58341> |
@@ -3068,7 +3070,7 @@ namespace OpenSim.Region.ClientStack | |||
3068 | } | 3070 | } |
3069 | break; | 3071 | break; |
3070 | case PacketType.ObjectPermissions: | 3072 | case PacketType.ObjectPermissions: |
3071 | MainLog.Instance.Warn("CLIENT", "unhandled packet " + PacketType.ObjectPermissions.ToString()); | 3073 | m_log.Warn("[CLIENT]: unhandled packet " + PacketType.ObjectPermissions.ToString()); |
3072 | ObjectPermissionsPacket newobjPerms = (ObjectPermissionsPacket)Pack; | 3074 | ObjectPermissionsPacket newobjPerms = (ObjectPermissionsPacket)Pack; |
3073 | 3075 | ||
3074 | List<ObjectPermissionsPacket.ObjectDataBlock> permChanges = | 3076 | List<ObjectPermissionsPacket.ObjectDataBlock> permChanges = |
@@ -3344,7 +3346,7 @@ namespace OpenSim.Region.ClientStack | |||
3344 | } | 3346 | } |
3345 | break; | 3347 | break; |
3346 | case PacketType.MoveTaskInventory: | 3348 | case PacketType.MoveTaskInventory: |
3347 | MainLog.Instance.Warn("CLIENT", "unhandled MoveTaskInventory packet"); | 3349 | m_log.Warn("[CLIENT]: unhandled MoveTaskInventory packet"); |
3348 | break; | 3350 | break; |
3349 | case PacketType.RezScript: | 3351 | case PacketType.RezScript: |
3350 | //Console.WriteLine(Pack.ToString()); | 3352 | //Console.WriteLine(Pack.ToString()); |
@@ -3594,7 +3596,7 @@ namespace OpenSim.Region.ClientStack | |||
3594 | 3596 | ||
3595 | break; | 3597 | break; |
3596 | case PacketType.GodKickUser: | 3598 | case PacketType.GodKickUser: |
3597 | MainLog.Instance.Warn("CLIENT", "unhandled GodKickUser packet"); | 3599 | m_log.Warn("[CLIENT]: unhandled GodKickUser packet"); |
3598 | 3600 | ||
3599 | GodKickUserPacket gkupack = (GodKickUserPacket)Pack; | 3601 | GodKickUserPacket gkupack = (GodKickUserPacket)Pack; |
3600 | 3602 | ||
@@ -3624,88 +3626,88 @@ namespace OpenSim.Region.ClientStack | |||
3624 | // Send the client the ping response back | 3626 | // Send the client the ping response back |
3625 | // Pass the same PingID in the matching packet | 3627 | // Pass the same PingID in the matching packet |
3626 | // Handled In the packet processing | 3628 | // Handled In the packet processing |
3627 | //MainLog.Instance.Debug("CLIENT", "possibly unhandled StartPingCheck packet"); | 3629 | //m_log.Debug("[CLIENT]: possibly unhandled StartPingCheck packet"); |
3628 | break; | 3630 | break; |
3629 | case PacketType.CompletePingCheck: | 3631 | case PacketType.CompletePingCheck: |
3630 | // TODO: Perhaps this should be processed on the Sim to determine whether or not to drop a dead client | 3632 | // TODO: Perhaps this should be processed on the Sim to determine whether or not to drop a dead client |
3631 | //MainLog.Instance.Warn("CLIENT", "unhandled CompletePingCheck packet"); | 3633 | //m_log.Warn("[CLIENT]: unhandled CompletePingCheck packet"); |
3632 | break; | 3634 | break; |
3633 | case PacketType.ObjectScale: | 3635 | case PacketType.ObjectScale: |
3634 | // TODO: handle this packet | 3636 | // TODO: handle this packet |
3635 | MainLog.Instance.Warn("CLIENT", "unhandled ObjectScale packet"); | 3637 | m_log.Warn("[CLIENT]: unhandled ObjectScale packet"); |
3636 | break; | 3638 | break; |
3637 | case PacketType.ViewerStats: | 3639 | case PacketType.ViewerStats: |
3638 | // TODO: handle this packet | 3640 | // TODO: handle this packet |
3639 | MainLog.Instance.Warn("CLIENT", "unhandled ViewerStats packet"); | 3641 | m_log.Warn("[CLIENT]: unhandled ViewerStats packet"); |
3640 | break; | 3642 | break; |
3641 | 3643 | ||
3642 | case PacketType.CreateGroupRequest: | 3644 | case PacketType.CreateGroupRequest: |
3643 | // TODO: handle this packet | 3645 | // TODO: handle this packet |
3644 | MainLog.Instance.Warn("CLIENT", "unhandled CreateGroupRequest packet"); | 3646 | m_log.Warn("[CLIENT]: unhandled CreateGroupRequest packet"); |
3645 | break; | 3647 | break; |
3646 | case PacketType.GenericMessage: | 3648 | case PacketType.GenericMessage: |
3647 | // TODO: handle this packet | 3649 | // TODO: handle this packet |
3648 | MainLog.Instance.Warn("CLIENT", "unhandled GenericMessage packet"); | 3650 | m_log.Warn("[CLIENT]: unhandled GenericMessage packet"); |
3649 | break; | 3651 | break; |
3650 | case PacketType.MapItemRequest: | 3652 | case PacketType.MapItemRequest: |
3651 | // TODO: handle this packet | 3653 | // TODO: handle this packet |
3652 | MainLog.Instance.Warn("CLIENT", "unhandled MapItemRequest packet"); | 3654 | m_log.Warn("[CLIENT]: unhandled MapItemRequest packet"); |
3653 | break; | 3655 | break; |
3654 | case PacketType.AgentResume: | 3656 | case PacketType.AgentResume: |
3655 | // TODO: handle this packet | 3657 | // TODO: handle this packet |
3656 | MainLog.Instance.Warn("CLIENT", "unhandled AgentResume packet"); | 3658 | m_log.Warn("[CLIENT]: unhandled AgentResume packet"); |
3657 | break; | 3659 | break; |
3658 | case PacketType.AgentPause: | 3660 | case PacketType.AgentPause: |
3659 | // TODO: handle this packet | 3661 | // TODO: handle this packet |
3660 | MainLog.Instance.Warn("CLIENT", "unhandled AgentPause packet"); | 3662 | m_log.Warn("[CLIENT]: unhandled AgentPause packet"); |
3661 | break; | 3663 | break; |
3662 | case PacketType.TransferAbort: | 3664 | case PacketType.TransferAbort: |
3663 | // TODO: handle this packet | 3665 | // TODO: handle this packet |
3664 | MainLog.Instance.Warn("CLIENT", "unhandled TransferAbort packet"); | 3666 | m_log.Warn("[CLIENT]: unhandled TransferAbort packet"); |
3665 | break; | 3667 | break; |
3666 | case PacketType.MuteListRequest: | 3668 | case PacketType.MuteListRequest: |
3667 | // TODO: handle this packet | 3669 | // TODO: handle this packet |
3668 | MainLog.Instance.Warn("CLIENT", "unhandled MuteListRequest packet"); | 3670 | m_log.Warn("[CLIENT]: unhandled MuteListRequest packet"); |
3669 | break; | 3671 | break; |
3670 | case PacketType.AgentDataUpdateRequest: | 3672 | case PacketType.AgentDataUpdateRequest: |
3671 | // TODO: handle this packet | 3673 | // TODO: handle this packet |
3672 | MainLog.Instance.Warn("CLIENT", "unhandled AgentDataUpdateRequest packet"); | 3674 | m_log.Warn("[CLIENT]: unhandled AgentDataUpdateRequest packet"); |
3673 | break; | 3675 | break; |
3674 | 3676 | ||
3675 | case PacketType.ParcelDwellRequest: | 3677 | case PacketType.ParcelDwellRequest: |
3676 | // TODO: handle this packet | 3678 | // TODO: handle this packet |
3677 | MainLog.Instance.Warn("CLIENT", "unhandled ParcelDwellRequest packet"); | 3679 | m_log.Warn("[CLIENT]: unhandled ParcelDwellRequest packet"); |
3678 | break; | 3680 | break; |
3679 | case PacketType.UseCircuitCode: | 3681 | case PacketType.UseCircuitCode: |
3680 | // TODO: handle this packet | 3682 | // TODO: handle this packet |
3681 | //MainLog.Instance.Warn("CLIENT", "unhandled UseCircuitCode packet"); | 3683 | //m_log.Warn("[CLIENT]: unhandled UseCircuitCode packet"); |
3682 | break; | 3684 | break; |
3683 | case PacketType.EconomyDataRequest: | 3685 | case PacketType.EconomyDataRequest: |
3684 | // TODO: handle this packet | 3686 | // TODO: handle this packet |
3685 | MainLog.Instance.Warn("CLIENT", "unhandled EconomyDataRequest packet"); | 3687 | m_log.Warn("[CLIENT]: unhandled EconomyDataRequest packet"); |
3686 | break; | 3688 | break; |
3687 | case PacketType.AgentHeightWidth: | 3689 | case PacketType.AgentHeightWidth: |
3688 | // TODO: handle this packet | 3690 | // TODO: handle this packet |
3689 | MainLog.Instance.Warn("CLIENT", "unhandled AgentHeightWidth packet"); | 3691 | m_log.Warn("[CLIENT]: unhandled AgentHeightWidth packet"); |
3690 | break; | 3692 | break; |
3691 | case PacketType.ObjectSpinStop: | 3693 | case PacketType.ObjectSpinStop: |
3692 | // TODO: handle this packet | 3694 | // TODO: handle this packet |
3693 | MainLog.Instance.Warn("CLIENT", "unhandled ObjectSpinStop packet"); | 3695 | m_log.Warn("[CLIENT]: unhandled ObjectSpinStop packet"); |
3694 | break; | 3696 | break; |
3695 | case PacketType.SoundTrigger: | 3697 | case PacketType.SoundTrigger: |
3696 | // TODO: handle this packet | 3698 | // TODO: handle this packet |
3697 | MainLog.Instance.Warn("CLIENT", "unhandled SoundTrigger packet"); | 3699 | m_log.Warn("[CLIENT]: unhandled SoundTrigger packet"); |
3698 | break; | 3700 | break; |
3699 | case PacketType.UserInfoRequest: | 3701 | case PacketType.UserInfoRequest: |
3700 | // TODO: handle this packet | 3702 | // TODO: handle this packet |
3701 | MainLog.Instance.Warn("CLIENT", "unhandled UserInfoRequest packet"); | 3703 | m_log.Warn("[CLIENT]: unhandled UserInfoRequest packet"); |
3702 | break; | 3704 | break; |
3703 | case PacketType.InventoryDescendents: | 3705 | case PacketType.InventoryDescendents: |
3704 | // TODO: handle this packet | 3706 | // TODO: handle this packet |
3705 | MainLog.Instance.Warn("CLIENT", "unhandled InventoryDescent packet"); | 3707 | m_log.Warn("[CLIENT]: unhandled InventoryDescent packet"); |
3706 | break; | 3708 | break; |
3707 | default: | 3709 | default: |
3708 | MainLog.Instance.Warn("CLIENT", "unhandled packet " + Pack.ToString()); | 3710 | m_log.Warn("[CLIENT]: unhandled packet " + Pack.ToString()); |
3709 | break; | 3711 | break; |
3710 | 3712 | ||
3711 | #endregion | 3713 | #endregion |