diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/KillPacket.cs | 23 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 37 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs | 2 |
3 files changed, 36 insertions, 26 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/KillPacket.cs b/OpenSim/Region/ClientStack/LindenUDP/KillPacket.cs index 5091793..a80c1f0 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/KillPacket.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/KillPacket.cs | |||
@@ -36,14 +36,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
36 | /// </summary> | 36 | /// </summary> |
37 | class KillPacket : Packet | 37 | class KillPacket : Packet |
38 | { | 38 | { |
39 | private Header header; | ||
40 | |||
41 | public override int Length | 39 | public override int Length |
42 | { | 40 | { |
43 | get { return 0; } | 41 | get { return 0; } |
44 | } | 42 | } |
45 | 43 | ||
46 | public override void FromBytes(Header header, byte[] bytes, ref int i, ref int packetEnd, byte[] zeroBuffer) | 44 | public override void FromBytes(Header header, byte[] bytes, ref int i, ref int packetEnd) |
47 | { | 45 | { |
48 | } | 46 | } |
49 | 47 | ||
@@ -51,26 +49,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
51 | { | 49 | { |
52 | } | 50 | } |
53 | 51 | ||
54 | public override Header Header { get { return header; } set { header = value; }} | ||
55 | |||
56 | public override byte[] ToBytes() | 52 | public override byte[] ToBytes() |
57 | { | 53 | { |
58 | return new byte[0]; | 54 | return new byte[0]; |
59 | } | 55 | } |
60 | 56 | ||
61 | public KillPacket() | 57 | public override byte[][] ToBytesMultiple() |
62 | { | 58 | { |
63 | Header = new LowHeader(); | 59 | return new byte[][] { new byte[0] }; |
64 | Header.ID = 65531; | ||
65 | Header.Reliable = true; | ||
66 | } | 60 | } |
67 | 61 | ||
68 | public override PacketType Type | 62 | public KillPacket() |
69 | { | 63 | { |
70 | get | 64 | Type = PacketType.UseCircuitCode; |
71 | { | 65 | Header = new Header(); |
72 | return PacketType.UseCircuitCode; | 66 | Header.Frequency = OpenMetaverse.PacketFrequency.Low; |
73 | } | 67 | Header.ID = 65531; |
68 | Header.Reliable = true; | ||
74 | } | 69 | } |
75 | } | 70 | } |
76 | } | 71 | } |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index c0c074b..9d839ab 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -45,6 +45,7 @@ using OpenSim.Region.Framework.Interfaces; | |||
45 | using OpenSim.Region.Framework.Scenes; | 45 | using OpenSim.Region.Framework.Scenes; |
46 | using OpenSim.Services.Interfaces; | 46 | using OpenSim.Services.Interfaces; |
47 | using Timer=System.Timers.Timer; | 47 | using Timer=System.Timers.Timer; |
48 | using AssetLandmark = OpenSim.Framework.AssetLandmark; | ||
48 | using Nini.Config; | 49 | using Nini.Config; |
49 | 50 | ||
50 | namespace OpenSim.Region.ClientStack.LindenUDP | 51 | namespace OpenSim.Region.ClientStack.LindenUDP |
@@ -1266,7 +1267,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1266 | public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) | 1267 | public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) |
1267 | { | 1268 | { |
1268 | RegionHandshakePacket handshake = (RegionHandshakePacket)PacketPool.Instance.GetPacket(PacketType.RegionHandshake); | 1269 | RegionHandshakePacket handshake = (RegionHandshakePacket)PacketPool.Instance.GetPacket(PacketType.RegionHandshake); |
1269 | 1270 | handshake.RegionInfo = new RegionHandshakePacket.RegionInfoBlock(); | |
1270 | handshake.RegionInfo.BillableFactor = args.billableFactor; | 1271 | handshake.RegionInfo.BillableFactor = args.billableFactor; |
1271 | handshake.RegionInfo.IsEstateManager = args.isEstateManager; | 1272 | handshake.RegionInfo.IsEstateManager = args.isEstateManager; |
1272 | handshake.RegionInfo.TerrainHeightRange00 = args.terrainHeightRange0; | 1273 | handshake.RegionInfo.TerrainHeightRange00 = args.terrainHeightRange0; |
@@ -1292,14 +1293,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1292 | handshake.RegionInfo.TerrainDetail2 = args.terrainDetail2; | 1293 | handshake.RegionInfo.TerrainDetail2 = args.terrainDetail2; |
1293 | handshake.RegionInfo.TerrainDetail3 = args.terrainDetail3; | 1294 | handshake.RegionInfo.TerrainDetail3 = args.terrainDetail3; |
1294 | handshake.RegionInfo.CacheID = UUID.Random(); //I guess this is for the client to remember an old setting? | 1295 | handshake.RegionInfo.CacheID = UUID.Random(); //I guess this is for the client to remember an old setting? |
1295 | 1296 | handshake.RegionInfo2 = new RegionHandshakePacket.RegionInfo2Block(); | |
1296 | handshake.RegionInfo2.RegionID = regionInfo.RegionID; | 1297 | handshake.RegionInfo2.RegionID = regionInfo.RegionID; |
1298 | |||
1299 | handshake.RegionInfo3 = new RegionHandshakePacket.RegionInfo3Block(); | ||
1300 | handshake.RegionInfo3.CPUClassID = 9; | ||
1301 | handshake.RegionInfo3.CPURatio = 1; | ||
1297 | 1302 | ||
1298 | // handshake.RegionInfo3.ColoName = Utils.EmptyBytes; | 1303 | handshake.RegionInfo3.ColoName = Utils.EmptyBytes; |
1299 | // handshake.RegionInfo3.CPUClassID = 0; | 1304 | handshake.RegionInfo3.ProductName = Utils.EmptyBytes; |
1300 | // handshake.RegionInfo3.CPURatio = 0; | 1305 | handshake.RegionInfo3.ProductSKU = Utils.EmptyBytes; |
1301 | // handshake.RegionInfo3.ProductName = Utils.StringToBytes("OpenSim"); | ||
1302 | // handshake.RegionInfo3.ProductSKU = Utils.EmptyBytes; | ||
1303 | 1306 | ||
1304 | OutPacket(handshake, ThrottleOutPacketType.Task); | 1307 | OutPacket(handshake, ThrottleOutPacketType.Task); |
1305 | } | 1308 | } |
@@ -3551,8 +3554,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3551 | rinfoblk.UseEstateSun = args.useEstateSun; | 3554 | rinfoblk.UseEstateSun = args.useEstateSun; |
3552 | rinfoblk.WaterHeight = args.waterHeight; | 3555 | rinfoblk.WaterHeight = args.waterHeight; |
3553 | rinfoblk.SimName = Utils.StringToBytes(args.simName); | 3556 | rinfoblk.SimName = Utils.StringToBytes(args.simName); |
3554 | 3557 | ||
3558 | rinfopack.RegionInfo2 = new RegionInfoPacket.RegionInfo2Block(); | ||
3559 | rinfopack.RegionInfo2.HardMaxAgents = uint.MaxValue; | ||
3560 | rinfopack.RegionInfo2.HardMaxObjects = uint.MaxValue; | ||
3561 | rinfopack.RegionInfo2.MaxAgents32 = uint.MaxValue; | ||
3562 | rinfopack.RegionInfo2.ProductName = Utils.EmptyBytes; | ||
3563 | rinfopack.RegionInfo2.ProductSKU = Utils.EmptyBytes; | ||
3564 | |||
3565 | rinfopack.HasVariableBlocks = true; | ||
3555 | rinfopack.RegionInfo = rinfoblk; | 3566 | rinfopack.RegionInfo = rinfoblk; |
3567 | rinfopack.AgentData = new RegionInfoPacket.AgentDataBlock(); | ||
3568 | rinfopack.AgentData.AgentID = AgentId; | ||
3569 | rinfopack.AgentData.SessionID = SessionId; | ||
3570 | |||
3556 | 3571 | ||
3557 | OutPacket(rinfopack, ThrottleOutPacketType.Task); | 3572 | OutPacket(rinfopack, ThrottleOutPacketType.Task); |
3558 | } | 3573 | } |
@@ -7536,7 +7551,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7536 | LandUpdateArgs args = new LandUpdateArgs(); | 7551 | LandUpdateArgs args = new LandUpdateArgs(); |
7537 | 7552 | ||
7538 | args.AuthBuyerID = parcelPropertiesPacket.ParcelData.AuthBuyerID; | 7553 | args.AuthBuyerID = parcelPropertiesPacket.ParcelData.AuthBuyerID; |
7539 | args.Category = (Parcel.ParcelCategory)parcelPropertiesPacket.ParcelData.Category; | 7554 | args.Category = (ParcelCategory)parcelPropertiesPacket.ParcelData.Category; |
7540 | args.Desc = Utils.BytesToString(parcelPropertiesPacket.ParcelData.Desc); | 7555 | args.Desc = Utils.BytesToString(parcelPropertiesPacket.ParcelData.Desc); |
7541 | args.GroupID = parcelPropertiesPacket.ParcelData.GroupID; | 7556 | args.GroupID = parcelPropertiesPacket.ParcelData.GroupID; |
7542 | args.LandingType = parcelPropertiesPacket.ParcelData.LandingType; | 7557 | args.LandingType = parcelPropertiesPacket.ParcelData.LandingType; |
@@ -10030,8 +10045,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
10030 | 10045 | ||
10031 | // Bit 0: Mature, bit 7: on sale, other bits: no idea | 10046 | // Bit 0: Mature, bit 7: on sale, other bits: no idea |
10032 | reply.Data.Flags = (byte)( | 10047 | reply.Data.Flags = (byte)( |
10033 | ((land.Flags & (uint)Parcel.ParcelFlags.MaturePublish) != 0 ? (1 << 0) : 0) + | 10048 | ((land.Flags & (uint)ParcelFlags.MaturePublish) != 0 ? (1 << 0) : 0) + |
10034 | ((land.Flags & (uint)Parcel.ParcelFlags.ForSale) != 0 ? (1 << 7) : 0)); | 10049 | ((land.Flags & (uint)ParcelFlags.ForSale) != 0 ? (1 << 7) : 0)); |
10035 | 10050 | ||
10036 | Vector3 pos = land.UserLocation; | 10051 | Vector3 pos = land.UserLocation; |
10037 | if (pos.Equals(Vector3.Zero)) | 10052 | if (pos.Equals(Vector3.Zero)) |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs index 4b1a6b7..fad9218 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs | |||
@@ -827,7 +827,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
827 | sendbuffer.Length, SocketFlags.None, m_Client.CircuitCode); | 827 | sendbuffer.Length, SocketFlags.None, m_Client.CircuitCode); |
828 | } | 828 | } |
829 | } | 829 | } |
830 | catch (NullReferenceException) | 830 | catch (NullReferenceException n) |
831 | { | 831 | { |
832 | m_log.Debug("[PACKET] Detected reuse of a returned packet"); | 832 | m_log.Debug("[PACKET] Detected reuse of a returned packet"); |
833 | m_PacketQueue.Cancel(item.Sequence); | 833 | m_PacketQueue.Cancel(item.Sequence); |