summaryrefslogtreecommitdiff
path: root/core/DHT.c
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-06-27 20:59:16 -0400
committerirungentoo <irungentoo@gmail.com>2013-06-27 20:59:16 -0400
commit457feeed0b49a83b8244d0046e0daf3a632fc092 (patch)
tree691ded6a719cbb97ed3be797bd7b3b1a6e1cfd65 /core/DHT.c
parent3986206de89f7094ba1300e72a7a46916bae7ff4 (diff)
Added current work on Lossless_UDP (Not done do not test it yet)
Lossless_UDP code is probably filled with problems right now. this is normal.
Diffstat (limited to 'core/DHT.c')
-rw-r--r--core/DHT.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/DHT.c b/core/DHT.c
index 05d9d20c..5c63146f 100644
--- a/core/DHT.c
+++ b/core/DHT.c
@@ -492,7 +492,7 @@ int sendnodes(IP_Port ip_port, char * client_id, uint32_t ping_id)
492 492
493//Packet handling functions 493//Packet handling functions
494//One to handle each types of packets we recieve 494//One to handle each types of packets we recieve
495 495//return 0 if handled correctly, 1 if packet is bad.
496int handle_pingreq(char * packet, uint32_t length, IP_Port source)//tested 496int handle_pingreq(char * packet, uint32_t length, IP_Port source)//tested
497{ 497{
498 if(length != 5 + CLIENT_ID_SIZE) 498 if(length != 5 + CLIENT_ID_SIZE)
@@ -561,7 +561,7 @@ int handle_getnodes(char * packet, uint32_t length, IP_Port source)
561 561
562int handle_sendnodes(char * packet, uint32_t length, IP_Port source)//tested 562int handle_sendnodes(char * packet, uint32_t length, IP_Port source)//tested
563{ 563{
564 if(length > (5 + CLIENT_ID_SIZE + MAX_SENT_NODES * (CLIENT_ID_SIZE + sizeof(IP_Port))) || 564 if(length > (5 + CLIENT_ID_SIZE + MAX_SENT_NODES * (CLIENT_ID_SIZE + sizeof(IP_Port))) ||
565 (length - 5 - CLIENT_ID_SIZE) % (CLIENT_ID_SIZE + sizeof(IP_Port)) != 0) 565 (length - 5 - CLIENT_ID_SIZE) % (CLIENT_ID_SIZE + sizeof(IP_Port)) != 0)
566 { 566 {
567 return 1; 567 return 1;