aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.Servers/CheckSumServer.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim.Servers/CheckSumServer.cs29
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);