From baf14f81211dbc63aac13d76ef0fbbacc3391950 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Mon, 24 Jun 2013 07:26:30 -0400 Subject: Merged "wxWidgets VS template for windows" from juryben That big 40MB file is useless so I merged the repos in a way that it dissapears forever from the main repo. --- core/DHT.c | 14 +++++++------- core/DHT.h | 11 +++++------ 2 files changed, 12 insertions(+), 13 deletions(-) (limited to 'core') diff --git a/core/DHT.c b/core/DHT.c index 1b82b860..c6ea6a22 100644 --- a/core/DHT.c +++ b/core/DHT.c @@ -16,10 +16,10 @@ int ping(IP_Port ip_port) char data[37]; data[0] = 00; memcpy(data + 5, self_client_id, 32); - ADDR addr = {.family = AF_INET, .ip = ip_port.ip, .port = ip_port.port}; +//ADDR addr = {.family = AF_INET, .ip = ip_port.ip, .port = ip_port.port}; - return sendto(sock, data, sizeof(data) - 1, 0, (struct sockaddr *)&addr, addrlen); - //sendto(int socket_descriptor, char *buffer, int buffer_length, int flags, struct sockaddr *destination_address, int address_length); +//return sendto(sock, data, sizeof(data) - 1, 0, (struct sockaddr *)&addr, addrlen); + //sendto(int socket_descriptor, char *buffer, int buffer_length, int flags, struct sockaddr *destination_address, int address_length); } @@ -36,7 +36,7 @@ void addfriend(char * client_id) -char delfriend(char * client_id); +char delfriend(char * client_id) { @@ -60,8 +60,7 @@ IP_Port getfriendip(char * client_id) void DHT_recvpacket(char * packet, uint32_t length) { - - + } @@ -83,4 +82,5 @@ void bootstrap(IP_Port ip_port) -} \ No newline at end of file +} + diff --git a/core/DHT.h b/core/DHT.h index f1d2e5ae..f0ccd184 100644 --- a/core/DHT.h +++ b/core/DHT.h @@ -4,13 +4,10 @@ #include #include -#ifdef WIN32 +#ifdef WIN32 //Put win32 includes here - -//Put win32 includes here -#include #include - +#include #else //Linux includes @@ -116,4 +113,6 @@ uint16_t num_friends; //TODO: make this more efficient looping up to 128 times is a bit... Pinged pings[128]; -Pinged send_nodes[64]; \ No newline at end of file +Pinged send_nodes[64]; + + -- cgit v1.2.3