aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/UDPServer.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-02-18 07:22:10 +0000
committerTeravus Ovares2008-02-18 07:22:10 +0000
commit81a00dd68f38d0f76abe85fed3c08f7d5150eb65 (patch)
treef9df7135a862d045e668911202e3196ee766dd11 /OpenSim/Region/ClientStack/UDPServer.cs
parent* Added /even more/ debugging messages to the UDP server to help people in re... (diff)
downloadopensim-SC-81a00dd68f38d0f76abe85fed3c08f7d5150eb65.zip
opensim-SC-81a00dd68f38d0f76abe85fed3c08f7d5150eb65.tar.gz
opensim-SC-81a00dd68f38d0f76abe85fed3c08f7d5150eb65.tar.bz2
opensim-SC-81a00dd68f38d0f76abe85fed3c08f7d5150eb65.tar.xz
* Thanks to Ahzz, more verbose error messages on the console and possibly a fix to the b*stard Sakai issue.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/UDPServer.cs83
1 files changed, 50 insertions, 33 deletions
diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs
index 73f2ac1..7b32490 100644
--- a/OpenSim/Region/ClientStack/UDPServer.cs
+++ b/OpenSim/Region/ClientStack/UDPServer.cs
@@ -224,39 +224,6 @@ namespace OpenSim.Region.ClientStack
224 m_log.Debug("[UDPSERVER]: " + e.ToString()); 224 m_log.Debug("[UDPSERVER]: " + e.ToString());
225 } 225 }
226 226
227 if (packet != null)
228 {
229 // do we already have a circuit for this endpoint
230 uint circuit;
231 if (clientCircuits.TryGetValue(epSender, out circuit))
232 {
233 //if so then send packet to the packetserver
234 //m_log.Warn("[UDPSERVER]: ALREADY HAVE Circuit!");
235 m_packetServer.InPacket(circuit, packet);
236 }
237 else if (packet.Type == PacketType.UseCircuitCode)
238 {
239 // new client
240 m_log.Debug("[UDPSERVER]: Adding New Client");
241 try
242 {
243 AddNewClient(packet);
244 }
245 catch (Exception e3)
246 {
247 m_log.Error("[UDPSERVER]: Adding New Client threw exception " + e3.ToString());
248 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender,
249 ReceivedData, null);
250 }
251 }
252 else
253 {
254 // invalid client
255 //CFK: This message seems to have served its usefullness as of 12-15 so I am commenting it out for now
256 //m_log.Warn("[UDPSERVER]: Got a packet from an invalid client - " + packet.ToString());
257
258 }
259 }
260 try 227 try
261 { 228 {
262 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); 229 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
@@ -289,6 +256,56 @@ namespace OpenSim.Region.ClientStack
289 } 256 }
290 257
291 } 258 }
259
260 if (packet != null)
261 {
262 try
263 {
264 // do we already have a circuit for this endpoint
265 uint circuit;
266
267 bool ret = false;
268 lock (clientCircuits)
269 {
270 ret = clientCircuits.TryGetValue(epSender, out circuit);
271 }
272 if (ret)
273 {
274 //if so then send packet to the packetserver
275 //m_log.Warn("[UDPSERVER]: ALREADY HAVE Circuit!");
276 m_packetServer.InPacket(circuit, packet);
277 }
278 else if (packet.Type == PacketType.UseCircuitCode)
279 {
280 // new client
281 m_log.Debug("[UDPSERVER]: Adding New Client");
282 AddNewClient(packet);
283 }
284 else
285 {
286 // invalid client
287 //CFK: This message seems to have served its usefullness as of 12-15 so I am commenting it out for now
288 //m_log.Warn("[UDPSERVER]: Got a packet from an invalid client - " + packet.ToString());
289
290 }
291 }
292 catch (Exception ex)
293 {
294 m_log.Error("[UDPSERVER]: Exception in processing packet.");
295 m_log.Debug("[UDPSERVER]: Adding New Client");
296 try
297 {
298 AddNewClient(packet);
299 }
300 catch (Exception e3)
301 {
302 m_log.Error("[UDPSERVER]: Adding New Client threw exception " + e3.ToString());
303 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender,
304 ReceivedData, null);
305 }
306 }
307 }
308
292 } 309 }
293 310
294 private void CloseEndPoint(EndPoint sender) 311 private void CloseEndPoint(EndPoint sender)