diff options
author | MW | 2007-05-19 14:34:44 +0000 |
---|---|---|
committer | MW | 2007-05-19 14:34:44 +0000 |
commit | df6ec3ba6c47bb55b9c3ba011c3e2e58177f9109 (patch) | |
tree | 6f0cf235e93c0033cfcffef216f14edb77f188ff /OpenSim.Servers/CheckSumServer.cs | |
parent | Moved CheckSumServer (and added UDPServerBase ) to OpenSim.Servers (diff) | |
download | opensim-SC-df6ec3ba6c47bb55b9c3ba011c3e2e58177f9109.zip opensim-SC-df6ec3ba6c47bb55b9c3ba011c3e2e58177f9109.tar.gz opensim-SC-df6ec3ba6c47bb55b9c3ba011c3e2e58177f9109.tar.bz2 opensim-SC-df6ec3ba6c47bb55b9c3ba011c3e2e58177f9109.tar.xz |
Added the echo method for template checksum handling (idea from Hegemons_Login_Analysis page) to the CheckSumServer, but currently it is comment out as enabling it would mean that any version of client could connect which is very likely to lead to problem with pre 1.15 version clients.
Diffstat (limited to '')
-rw-r--r-- | OpenSim.Servers/CheckSumServer.cs | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/OpenSim.Servers/CheckSumServer.cs b/OpenSim.Servers/CheckSumServer.cs index dc83192..2f79b7a 100644 --- a/OpenSim.Servers/CheckSumServer.cs +++ b/OpenSim.Servers/CheckSumServer.cs | |||
@@ -38,21 +38,42 @@ namespace OpenSim.Servers | |||
38 | // do we already have a circuit for this endpoint | 38 | // do we already have a circuit for this endpoint |
39 | if (packet.Type == PacketType.SecuredTemplateChecksumRequest) | 39 | if (packet.Type == PacketType.SecuredTemplateChecksumRequest) |
40 | { | 40 | { |
41 | |||
41 | SecuredTemplateChecksumRequestPacket checksum = (SecuredTemplateChecksumRequestPacket)packet; | 42 | SecuredTemplateChecksumRequestPacket checksum = (SecuredTemplateChecksumRequestPacket)packet; |
42 | TemplateChecksumReplyPacket checkreply = new TemplateChecksumReplyPacket(); | 43 | TemplateChecksumReplyPacket checkreply = new TemplateChecksumReplyPacket(); |
43 | checkreply.DataBlock.Checksum = 180572585; | 44 | checkreply.DataBlock.Checksum = 180572585; |
44 | checkreply.DataBlock.Flags = 0; | 45 | checkreply.DataBlock.Flags = 0; |
45 | checkreply.DataBlock.MajorVersion = 1; | 46 | checkreply.DataBlock.MajorVersion = 1; |
46 | checkreply.DataBlock.MinorVersion = 15; | 47 | checkreply.DataBlock.MinorVersion = 15; |
47 | checkreply.DataBlock.PatchVersion = 0; | 48 | checkreply.DataBlock.PatchVersion = 0; |
48 | checkreply.DataBlock.ServerVersion = 2; | 49 | checkreply.DataBlock.ServerVersion = 0; |
49 | checkreply.TokenBlock.Token = checksum.TokenBlock.Token; | 50 | checkreply.TokenBlock.Token = checksum.TokenBlock.Token; |
50 | this.SendPacket(checkreply, epSender); | 51 | this.SendPacket(checkreply, epSender); |
51 | 52 | ||
53 | /* | ||
54 | //if we wanted to echo the the checksum/ version from the client (so that any client worked) | ||
55 | SecuredTemplateChecksumRequestPacket checkrequest = new SecuredTemplateChecksumRequestPacket(); | ||
56 | checkrequest.TokenBlock.Token = checksum.TokenBlock.Token; | ||
57 | this.SendPacket(checkrequest, epSender); | ||
58 | */ | ||
59 | |||
60 | } | ||
61 | else if (packet.Type == PacketType.TemplateChecksumReply) | ||
62 | { | ||
63 | TemplateChecksumReplyPacket checksum = (TemplateChecksumReplyPacket)packet; | ||
64 | TemplateChecksumReplyPacket checkreply2 = new TemplateChecksumReplyPacket(); | ||
65 | checkreply2.DataBlock.Checksum = checksum.DataBlock.Checksum; | ||
66 | checkreply2.DataBlock.Flags = checksum.DataBlock.Flags; | ||
67 | checkreply2.DataBlock.MajorVersion = checksum.DataBlock.MajorVersion; | ||
68 | checkreply2.DataBlock.MinorVersion = checksum.DataBlock.MinorVersion; | ||
69 | checkreply2.DataBlock.PatchVersion = checksum.DataBlock.PatchVersion; | ||
70 | checkreply2.DataBlock.ServerVersion = checksum.DataBlock.ServerVersion; | ||
71 | checkreply2.TokenBlock.Token = checksum.TokenBlock.Token; | ||
72 | this.SendPacket(checkreply2, epSender); | ||
73 | |||
52 | } | 74 | } |
53 | else | 75 | else |
54 | { // invalid client | 76 | { |
55 | // Console.Error.WriteLine("CheckSumServer.cs:OnReceivedData() - WARNING: Got a invalid packet from an invalid client - " + epSender.ToString()); | ||
56 | } | 77 | } |
57 | 78 | ||
58 | Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); | 79 | Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); |