summaryrefslogtreecommitdiff
path: root/core/DHT.c
diff options
context:
space:
mode:
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;