diff options
author | Melanie | 2012-09-10 13:53:00 +0100 |
---|---|---|
committer | Melanie | 2012-09-10 13:53:00 +0100 |
commit | 21c476228a1dbeef1f180a16e9ebb47c8b3fa185 (patch) | |
tree | 5a2fc5d269eb4711fa2ace11d04731e7dc08607b /OpenSim/Region/ClientStack/Linden/UDP | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Remove commented code (diff) | |
download | opensim-SC-21c476228a1dbeef1f180a16e9ebb47c8b3fa185.zip opensim-SC-21c476228a1dbeef1f180a16e9ebb47c8b3fa185.tar.gz opensim-SC-21c476228a1dbeef1f180a16e9ebb47c8b3fa185.tar.bz2 opensim-SC-21c476228a1dbeef1f180a16e9ebb47c8b3fa185.tar.xz |
Merge branch 'avination' into careminster
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 57 |
1 files changed, 52 insertions, 5 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 7e51638..74b27d7 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -807,7 +807,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
807 | handshake.RegionInfo3.ProductName = Util.StringToBytes256(regionInfo.RegionType); | 807 | handshake.RegionInfo3.ProductName = Util.StringToBytes256(regionInfo.RegionType); |
808 | handshake.RegionInfo3.ProductSKU = Utils.EmptyBytes; | 808 | handshake.RegionInfo3.ProductSKU = Utils.EmptyBytes; |
809 | 809 | ||
810 | OutPacket(handshake, ThrottleOutPacketType.Task); | 810 | // OutPacket(handshake, ThrottleOutPacketType.Task); |
811 | // use same as MoveAgentIntoRegion (both should be task ) | ||
812 | OutPacket(handshake, ThrottleOutPacketType.Unknown); | ||
811 | } | 813 | } |
812 | 814 | ||
813 | public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look) | 815 | public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look) |
@@ -8748,16 +8750,61 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8748 | 8750 | ||
8749 | #region Parcel related packets | 8751 | #region Parcel related packets |
8750 | 8752 | ||
8753 | // acumulate several HandleRegionHandleRequest consecutive overlaping requests | ||
8754 | // to be done with minimal resources as possible | ||
8755 | // variables temporary here while in test | ||
8756 | |||
8757 | Queue<UUID> RegionHandleRequests = new Queue<UUID>(); | ||
8758 | bool RegionHandleRequestsInService = false; | ||
8759 | |||
8751 | private bool HandleRegionHandleRequest(IClientAPI sender, Packet Pack) | 8760 | private bool HandleRegionHandleRequest(IClientAPI sender, Packet Pack) |
8752 | { | 8761 | { |
8753 | RegionHandleRequestPacket rhrPack = (RegionHandleRequestPacket)Pack; | 8762 | UUID currentUUID; |
8754 | 8763 | ||
8755 | RegionHandleRequest handlerRegionHandleRequest = OnRegionHandleRequest; | 8764 | RegionHandleRequest handlerRegionHandleRequest = OnRegionHandleRequest; |
8756 | if (handlerRegionHandleRequest != null) | 8765 | |
8766 | if (handlerRegionHandleRequest == null) | ||
8767 | return true; | ||
8768 | |||
8769 | RegionHandleRequestPacket rhrPack = (RegionHandleRequestPacket)Pack; | ||
8770 | |||
8771 | lock (RegionHandleRequests) | ||
8772 | { | ||
8773 | if (RegionHandleRequestsInService) | ||
8774 | { | ||
8775 | // we are already busy doing a previus request | ||
8776 | // so enqueue it | ||
8777 | RegionHandleRequests.Enqueue(rhrPack.RequestBlock.RegionID); | ||
8778 | return true; | ||
8779 | } | ||
8780 | |||
8781 | // else do it | ||
8782 | currentUUID = rhrPack.RequestBlock.RegionID; | ||
8783 | RegionHandleRequestsInService = true; | ||
8784 | } | ||
8785 | |||
8786 | while (true) | ||
8757 | { | 8787 | { |
8758 | handlerRegionHandleRequest(this, rhrPack.RequestBlock.RegionID); | 8788 | handlerRegionHandleRequest(this, currentUUID); |
8789 | |||
8790 | lock (RegionHandleRequests) | ||
8791 | { | ||
8792 | // exit condition, nothing to do or closed | ||
8793 | // current code seems to assume we may loose the handler at anytime, | ||
8794 | // so keep checking it | ||
8795 | handlerRegionHandleRequest = OnRegionHandleRequest; | ||
8796 | |||
8797 | if (RegionHandleRequests.Count == 0 || !IsActive || handlerRegionHandleRequest == null) | ||
8798 | { | ||
8799 | RegionHandleRequests.Clear(); | ||
8800 | RegionHandleRequestsInService = false; | ||
8801 | return true; | ||
8802 | } | ||
8803 | currentUUID = RegionHandleRequests.Dequeue(); | ||
8804 | } | ||
8759 | } | 8805 | } |
8760 | return true; | 8806 | |
8807 | return true; // actually unreached | ||
8761 | } | 8808 | } |
8762 | 8809 | ||
8763 | private bool HandleParcelInfoRequest(IClientAPI sender, Packet Pack) | 8810 | private bool HandleParcelInfoRequest(IClientAPI sender, Packet Pack) |