aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/OpenSimClient.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/OpenSimClient.cs')
-rw-r--r--src/OpenSimClient.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/OpenSimClient.cs b/src/OpenSimClient.cs
index 47f6dbf..696031d 100644
--- a/src/OpenSimClient.cs
+++ b/src/OpenSimClient.cs
@@ -60,6 +60,7 @@ namespace OpenSim
60 private const int MAX_APPENDED_ACKS = 10; 60 private const int MAX_APPENDED_ACKS = 10;
61 private const int RESEND_TIMEOUT = 4000; 61 private const int RESEND_TIMEOUT = 4000;
62 private const int MAX_SEQUENCE = 0xFFFFFF; 62 private const int MAX_SEQUENCE = 0xFFFFFF;
63 private Queue<uint> Inbox;
63 64
64 public void ack_pack(Packet Pack) { 65 public void ack_pack(Packet Pack) {
65 //libsecondlife.Packets.PacketAckPacket ack_it = new PacketAckPacket(); 66 //libsecondlife.Packets.PacketAckPacket ack_it = new PacketAckPacket();
@@ -152,16 +153,22 @@ namespace OpenSim
152 break; 153 break;
153 case PacketType.LogoutRequest: 154 case PacketType.LogoutRequest:
154 Console.WriteLine("OpenSimClient.cs:ProcessInPacket() - Got a logout request"); 155 Console.WriteLine("OpenSimClient.cs:ProcessInPacket() - Got a logout request");
155 OpenSim_Main.local_world.Entities.Remove(this.AgentID); 156 lock(OpenSim_Main.local_world.Entities) {
157 OpenSim_Main.local_world.Entities.Remove(this.AgentID);
158 }
156 WebRequest DeleteSession = WebRequest.Create(OpenSim_Main.cfg.GridURL + "/usersessions/" + OpenSim_Main.cfg.GridSendKey + "/" + this.AgentID.ToString() + this.CircuitCode.ToString() + "/delete"); 159 WebRequest DeleteSession = WebRequest.Create(OpenSim_Main.cfg.GridURL + "/usersessions/" + OpenSim_Main.cfg.GridSendKey + "/" + this.AgentID.ToString() + this.CircuitCode.ToString() + "/delete");
157 WebResponse GridResponse = DeleteSession.GetResponse(); 160 WebResponse GridResponse = DeleteSession.GetResponse();
158 StreamReader sr = new StreamReader(GridResponse.GetResponseStream()); 161 StreamReader sr = new StreamReader(GridResponse.GetResponseStream());
159 String grTest = sr.ReadLine(); 162 String grTest = sr.ReadLine();
160 sr.Close(); 163 sr.Close();
161 GridResponse.Close(); 164 GridResponse.Close();
165 Console.WriteLine("DEBUG: " + grTest);
162 166
163 this.ClientThread.Abort(); 167 this.ClientThread.Abort();
164 break; 168 break;
169 case PacketType.AgentUpdate:
170 ClientAvatar.HandleAgentUpdate((AgentUpdatePacket)Pack);
171 break;
165 } 172 }
166 } 173 }
167 174
@@ -315,6 +322,7 @@ namespace OpenSim
315 { 322 {
316 foreach (uint ack in NewPack.Header.AckList) 323 foreach (uint ack in NewPack.Header.AckList)
317 { 324 {
325 Console.WriteLine("Got appended ack: "+ack);
318 NeedAck.Remove(ack); 326 NeedAck.Remove(ack);
319 } 327 }
320 } 328 }
@@ -329,6 +337,7 @@ namespace OpenSim
329 { 337 {
330 foreach (PacketAckPacket.PacketsBlock block in ackPacket.Packets) 338 foreach (PacketAckPacket.PacketsBlock block in ackPacket.Packets)
331 { 339 {
340 Console.WriteLine("Got PacketAck: "+block.ID);
332 NeedAck.Remove(block.ID); 341 NeedAck.Remove(block.ID);
333 } 342 }
334 } 343 }
@@ -398,6 +407,7 @@ namespace OpenSim
398 private void AuthUser() { 407 private void AuthUser() {
399 Console.WriteLine("OpenSimClient.cs:AuthUser() - Authenticating new user request with grid"); 408 Console.WriteLine("OpenSimClient.cs:AuthUser() - Authenticating new user request with grid");
400 WebRequest CheckSession = WebRequest.Create(OpenSim_Main.cfg.GridURL + "/usersessions/" + OpenSim_Main.cfg.GridSendKey + "/" + cirpack.CircuitCode.ID.ToString() + "/" + cirpack.CircuitCode.Code.ToString() + "/exists"); 409 WebRequest CheckSession = WebRequest.Create(OpenSim_Main.cfg.GridURL + "/usersessions/" + OpenSim_Main.cfg.GridSendKey + "/" + cirpack.CircuitCode.ID.ToString() + "/" + cirpack.CircuitCode.Code.ToString() + "/exists");
410 Console.WriteLine(OpenSim_Main.cfg.GridURL);
401 WebResponse GridResponse = CheckSession.GetResponse(); 411 WebResponse GridResponse = CheckSession.GetResponse();
402 StreamReader sr = new StreamReader(GridResponse.GetResponseStream()); 412 StreamReader sr = new StreamReader(GridResponse.GetResponseStream());
403 String grTest = sr.ReadLine(); 413 String grTest = sr.ReadLine();