diff --git a/core/DHT.c b/core/DHT.c index 1f2db5253..d7299100a 100644 --- a/core/DHT.c +++ b/core/DHT.c @@ -660,7 +660,7 @@ IP_Port getfriendip(char * client_id) -int DHT_recvpacket(char * packet, uint32_t length, IP_Port source) +int DHT_handlepacket(char * packet, uint32_t length, IP_Port source) { switch (packet[0]) { case 0: diff --git a/core/DHT.h b/core/DHT.h index 935c5b731..a66e7bad2 100644 --- a/core/DHT.h +++ b/core/DHT.h @@ -95,7 +95,7 @@ void doDHT(); //if we recieve a DHT packet we call this function so it can be handled. //Return 0 if packet is handled correctly. //return 1 if it didn't handle the packet or if the packet was shit. -int DHT_recvpacket(char * packet, uint32_t length, IP_Port source); +int DHT_handlepacket(char * packet, uint32_t length, IP_Port source); //Use this function to bootstrap the client //Sends a get nodes request to the given ip port diff --git a/testing/DHT_test.c b/testing/DHT_test.c index c8af599a2..be2f01684 100644 --- a/testing/DHT_test.c +++ b/testing/DHT_test.c @@ -123,7 +123,7 @@ int main(int argc, char *argv[]) while(recievepacket(&ip_port, data, &length) != -1) { - if(DHT_recvpacket(data, length, ip_port)) + if(DHT_handlepacket(data, length, ip_port)) { printf("UNHANDLED PACKET RECEIVED\nLENGTH:%u\nCONTENTS:\n", length); printf("--------------------BEGIN-----------------------------\n");