aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/ClientView.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs37
1 files changed, 22 insertions, 15 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index 75c4187..58cb9a2 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -535,7 +535,7 @@ namespace OpenSim.Region.ClientStack
535 /// <param name="regionInfo"></param> 535 /// <param name="regionInfo"></param>
536 public void SendRegionHandshake(RegionInfo regionInfo) 536 public void SendRegionHandshake(RegionInfo regionInfo)
537 { 537 {
538 RegionHandshakePacket handshake = new RegionHandshakePacket(); 538 RegionHandshakePacket handshake = (RegionHandshakePacket) PacketPool.Instance.GetPacket(PacketType.RegionHandshake);
539 539
540 handshake.RegionInfo.BillableFactor = regionInfo.EstateSettings.billableFactor; 540 handshake.RegionInfo.BillableFactor = regionInfo.EstateSettings.billableFactor;
541 handshake.RegionInfo.IsEstateManager = false; 541 handshake.RegionInfo.IsEstateManager = false;
@@ -2187,17 +2187,22 @@ namespace OpenSim.Region.ClientStack
2187 // Actually make the byte array and send it 2187 // Actually make the byte array and send it
2188 try 2188 try
2189 { 2189 {
2190 byte[] sendbuffer = Pack.ToBytes(); 2190 byte[] sendbuffer = Pack.ToBytes();
2191 if (Pack.Header.Zerocoded) 2191 if (Pack is RegionHandshakePacket)
2192 { 2192 {
2193 byte[] ZeroOutBuffer = new byte[4096]; 2193 PacketPool.Instance.ReturnPacket(Pack);
2194 int packetsize = Helpers.ZeroEncode(sendbuffer, sendbuffer.Length, ZeroOutBuffer); 2194 }
2195 m_networkServer.SendPacketTo(ZeroOutBuffer, packetsize, SocketFlags.None, m_circuitCode); 2195
2196 } 2196 if (Pack.Header.Zerocoded)
2197 else 2197 {
2198 { 2198 byte[] ZeroOutBuffer = new byte[4096];
2199 m_networkServer.SendPacketTo(sendbuffer, sendbuffer.Length, SocketFlags.None, m_circuitCode); 2199 int packetsize = Helpers.ZeroEncode(sendbuffer, sendbuffer.Length, ZeroOutBuffer);
2200 } 2200 m_networkServer.SendPacketTo(ZeroOutBuffer, packetsize, SocketFlags.None, m_circuitCode);
2201 }
2202 else
2203 {
2204 m_networkServer.SendPacketTo(sendbuffer, sendbuffer.Length, SocketFlags.None, m_circuitCode);
2205 }
2201 } 2206 }
2202 catch (Exception e) 2207 catch (Exception e)
2203 { 2208 {
@@ -2801,7 +2806,7 @@ namespace OpenSim.Region.ClientStack
2801 case PacketType.AssetUploadRequest: 2806 case PacketType.AssetUploadRequest:
2802 AssetUploadRequestPacket request = (AssetUploadRequestPacket) Pack; 2807 AssetUploadRequestPacket request = (AssetUploadRequestPacket) Pack;
2803 // Console.WriteLine("upload request " + Pack.ToString()); 2808 // Console.WriteLine("upload request " + Pack.ToString());
2804 // Console.WriteLine("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionId).ToStringHyphenated()); 2809 // Console.WriteLine("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionId).ToString());
2805 if (OnAssetUploadRequest != null) 2810 if (OnAssetUploadRequest != null)
2806 { 2811 {
2807 LLUUID temp=libsecondlife.LLUUID.Combine(request.AssetBlock.TransactionID, SecureSessionId); 2812 LLUUID temp=libsecondlife.LLUUID.Combine(request.AssetBlock.TransactionID, SecureSessionId);
@@ -2928,7 +2933,7 @@ namespace OpenSim.Region.ClientStack
2928 AssetBase asset = m_assetCache.GetAsset(update.InventoryData[i].TransactionID.Combine(this.SecureSessionId)); 2933 AssetBase asset = m_assetCache.GetAsset(update.InventoryData[i].TransactionID.Combine(this.SecureSessionId));
2929 if (asset != null) 2934 if (asset != null)
2930 { 2935 {
2931 // Console.WriteLine("updating inventory item, found asset" + asset.FullID.ToStringHyphenated() + " already in cache"); 2936 // Console.WriteLine("updating inventory item, found asset" + asset.FullID.ToString() + " already in cache");
2932 m_inventoryCache.UpdateInventoryItemAsset(this, update.InventoryData[i].ItemID, asset); 2937 m_inventoryCache.UpdateInventoryItemAsset(this, update.InventoryData[i].ItemID, asset);
2933 } 2938 }
2934 else 2939 else
@@ -2936,7 +2941,7 @@ namespace OpenSim.Region.ClientStack
2936 asset = this.UploadAssets.AddUploadToAssetCache(update.InventoryData[i].TransactionID); 2941 asset = this.UploadAssets.AddUploadToAssetCache(update.InventoryData[i].TransactionID);
2937 if (asset != null) 2942 if (asset != null)
2938 { 2943 {
2939 //Console.WriteLine("updating inventory item, adding asset" + asset.FullID.ToStringHyphenated() + " to cache"); 2944 //Console.WriteLine("updating inventory item, adding asset" + asset.FullID.ToString() + " to cache");
2940 m_inventoryCache.UpdateInventoryItemAsset(this, update.InventoryData[i].ItemID, asset); 2945 m_inventoryCache.UpdateInventoryItemAsset(this, update.InventoryData[i].ItemID, asset);
2941 } 2946 }
2942 else 2947 else
@@ -3351,6 +3356,8 @@ namespace OpenSim.Region.ClientStack
3351 #endregion 3356 #endregion
3352 } 3357 }
3353 } 3358 }
3359
3360 PacketPool.Instance.ReturnPacket(Pack);
3354 } 3361 }
3355 3362
3356 private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket) 3363 private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket)